summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuentin Bazin2019-11-18 04:02:17 +0900
committerQuentin Bazin2019-11-18 04:02:17 +0900
commitf03c395171b9b84eb175689743b79775a06d14c6 (patch)
tree90d2bf589d416b90bcda01530cdf1577806e6678
downloadaur-f03c395171b9b84eb175689743b79775a06d14c6.tar.gz
First commit.
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD26
-rw-r--r--aniproject-git.install28
3 files changed, 73 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d0ed89231fb5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = aniproject-git
+ pkgdesc = Unarelith's aniproject
+ pkgver = 0.0.1
+ pkgrel = 1
+ url = https://git.unarelith.net/Unarelith/aniproject
+ install = aniproject-git.install
+ arch = i686
+ arch = x86_64
+ depends = apache
+ depends = mod_wsgi
+ depends = python
+ depends = python-pip
+ depends = python-virtualenv
+ provides = aniproject
+ source = aniproject::git+https://git.unarelith.net/Unarelith/aniproject.git
+ md5sums = SKIP
+
+pkgname = aniproject-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..8a91f7df5588
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,26 @@
+# Maintainer: Quentin Bazin <quent42340 at gmail dot com>
+
+_pkgname=aniproject
+pkgname="${_pkgname}-git"
+pkgver=0.0.1
+pkgrel=1
+pkgdesc="Unarelith's aniproject"
+arch=("i686" "x86_64")
+url="https://git.unarelith.net/Unarelith/aniproject"
+depends=("apache" "mod_wsgi" "python" "python-pip" "python-virtualenv")
+provides=("aniproject")
+source=("${_pkgname}::git+${url}.git")
+md5sums=("SKIP")
+install=aniproject-git.install
+
+pkgver() {
+ cd "${_pkgname}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+package() {
+ # Copy files to package
+ mkdir -p "${pkgdir}/usr/share/webapps/aniproject/"
+ cp -r "${_pkgname}"/* "${pkgdir}/usr/share/webapps/aniproject/"
+}
+
diff --git a/aniproject-git.install b/aniproject-git.install
new file mode 100644
index 000000000000..c552c259750e
--- /dev/null
+++ b/aniproject-git.install
@@ -0,0 +1,28 @@
+post_install() {
+ cd /usr/share/webapps/aniproject
+
+ bash scripts/setup_prod.sh
+
+ # Set permissions
+ chown http:http . db.sqlite3
+ chown http:http -R static myenv
+
+ sed -i "s/^DEBUG = .*$/DEBUG = False/" aniproject/settings.py
+
+ echo "==>"
+ echo "==>"
+ echo "==> Check /usr/share/webapps/aniproject/misc/apache.conf"
+ echo "==>"
+ echo "==>"
+}
+
+post_upgrade() {
+ cd /usr/share/webapps/aniproject
+
+ bash scripts/update_prod.sh
+
+ sed -i "s/^DEBUG = .*$/DEBUG = False/" aniproject/settings.py
+
+ sudo systemctl restart httpd
+}
+