summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuentin Bazin2019-05-28 10:48:21 +0200
committerQuentin Bazin2019-05-28 10:49:42 +0200
commited30ef9b0faf3058fa3c0f8987165046cc10d607 (patch)
tree32ab1bd161e6a2da009c581ae0f1cf1983f2f59e
downloadaur-ed30ef9b0faf3058fa3c0f8987165046cc10d607.tar.gz
Repository initialized.
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD26
-rw-r--r--dtfp-git.install28
3 files changed, 73 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..fd6fc4db4d38
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = dtfp-git
+ pkgdesc = Tool for partners
+ pkgver = 0.0.1
+ pkgrel = 1
+ url = https://git.unarelith.net/Unarelith/dtfp
+ install = dtfp-git.install
+ arch = i686
+ arch = x86_64
+ depends = apache
+ depends = mod_wsgi
+ depends = python
+ depends = python-pip
+ depends = python-virtualenv
+ provides = dtfp
+ source = dtfp::git+https://git.unarelith.net/Unarelith/dtfp.git
+ md5sums = SKIP
+
+pkgname = dtfp-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ae66d9a83fb0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,26 @@
+# Maintainer: Quentin Bazin <quent42340 at gmail dot com>
+
+_pkgname=dtfp
+pkgname="${_pkgname}-git"
+pkgver=0.0.1
+pkgrel=1
+pkgdesc="Tool for partners"
+arch=("i686" "x86_64")
+url="https://git.unarelith.net/Unarelith/dtfp"
+depends=("apache" "mod_wsgi" "python" "python-pip" "python-virtualenv")
+provides=("dtfp")
+source=("${_pkgname}::git+${url}.git")
+md5sums=("SKIP")
+install=dtfp-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/dtfp/"
+ cp -r "${_pkgname}"/* "${pkgdir}/usr/share/webapps/dtfp/"
+}
+
diff --git a/dtfp-git.install b/dtfp-git.install
new file mode 100644
index 000000000000..fa6f724b3716
--- /dev/null
+++ b/dtfp-git.install
@@ -0,0 +1,28 @@
+post_install() {
+ cd /usr/share/webapps/dtfp
+
+ bash scripts/setup_prod.sh
+
+ # Set permissions
+ chown http:http . db.sqlite3
+ chown http:http -R static myenv
+
+ sed -i "s/^DEBUG = .*$/DEBUG = False/" dtfp/settings.py
+
+ echo "==>"
+ echo "==>"
+ echo "==> Check /usr/share/webapps/dtfp/misc/apache.conf"
+ echo "==>"
+ echo "==>"
+}
+
+post_upgrade() {
+ cd /usr/share/webapps/dtfp
+
+ bash scripts/update_prod.sh
+
+ sed -i "s/^DEBUG = .*$/DEBUG = False/" dtfp/settings.py
+
+ sudo systemctl restart httpd
+}
+