diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2015-04-22 13:54:22 +0200 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2015-04-22 13:54:22 +0200 |
commit | 83ef974548b2c7202744b30bdcd4cd8108ce5c92 (patch) | |
tree | 2a554ea561696295da8def97102bfc8e34fb243f /testing | |
parent | 8bf03a1113ba09b48f82919737e9de7c198e231c (diff) | |
download | aports-83ef974548b2c7202744b30bdcd4cd8108ce5c92.tar.bz2 aports-83ef974548b2c7202744b30bdcd4cd8108ce5c92.tar.xz |
testing/patchwork: add mysql and apache2 support
Diffstat (limited to 'testing')
-rw-r--r-- | testing/patchwork/0001-support-busybox-readlink.patch | 25 | ||||
-rw-r--r-- | testing/patchwork/APKBUILD | 49 | ||||
-rw-r--r-- | testing/patchwork/patchwork.wsgi.conf | 21 |
3 files changed, 83 insertions, 12 deletions
diff --git a/testing/patchwork/0001-support-busybox-readlink.patch b/testing/patchwork/0001-support-busybox-readlink.patch new file mode 100644 index 0000000000..9bc3f9dda0 --- /dev/null +++ b/testing/patchwork/0001-support-busybox-readlink.patch @@ -0,0 +1,25 @@ +From 44204d6be590cc7ad721be0b08d95c17355c0fda Mon Sep 17 00:00:00 2001 +From: Carlo Landmeter <clandmeter@gmail.com> +Date: Wed, 22 Apr 2015 11:32:52 +0200 +Subject: [PATCH] support busybox readlink + +--- + apps/patchwork/bin/parsemail.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/apps/patchwork/bin/parsemail.sh b/apps/patchwork/bin/parsemail.sh +index 246c2a1..53fb24c 100755 +--- a/apps/patchwork/bin/parsemail.sh ++++ b/apps/patchwork/bin/parsemail.sh +@@ -20,7 +20,7 @@ + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + BIN_DIR=`dirname $0` +-PATCHWORK_BASE=`readlink -e $BIN_DIR/../../..` ++PATCHWORK_BASE=`readlink -f $BIN_DIR/../../..` + + PYTHONPATH="$PATCHWORK_BASE/apps":"$PATCHWORK_BASE/lib/python:$PYTHONPATH" \ + DJANGO_SETTINGS_MODULE=settings \ +-- +2.3.5 + diff --git a/testing/patchwork/APKBUILD b/testing/patchwork/APKBUILD index 0411d1e8aa..c66d1d7a48 100644 --- a/testing/patchwork/APKBUILD +++ b/testing/patchwork/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Francesco Colista <fcolista@alpinelinux.org> pkgname=patchwork pkgver=0_git20150420 -pkgrel=0 +pkgrel=1 pkgdesc="Web-based patch tracking system " url="http://jk.ozlabs.org/projects/patchwork/" arch="noarch" @@ -11,8 +11,10 @@ depends="py-django1.5 py-psycopg2 py-django-registration git" depends_dev="" makedepends="$depends_dev" install="" -subpackages="" -source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz" +subpackages="$pkgname-doc $pkgname-apache2-wsgi:apache2_wsgi $pkgname-mysql" +source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz + 0001-support-busybox-readlink.patch + patchwork.wsgi.conf" giturl="git://ozlabs.org/home/jk/git/patchwork" disturl="dev.alpinelinux.org:/archive/$pkgname/" _builddir="$srcdir"/$pkgname-$pkgver @@ -24,15 +26,38 @@ build() { package() { cd "$_builddir" - mkdir -p "$pkgdir"/etc/$pkgname mkdir -p "$pkgdir"/usr/share/webapps/$pkgname - for file in apps docs htdocs lib templates tools; do - cp -r $file "$pkgdir"/usr/share/webapps/$pkgname - done - cp apps/settings.py "$pkgdir"/etc/$pkgname/local_settings.py - ln -s /etc/patchwork/local_settings.py "$pkgdir"/usr/share/webapps/patchwork/apps/local_settings.py + install -Dm644 COPYING \ + "$pkgdir"/usr/share/doc/$pkgname/COPYING || return 1 + rm -f COPYING + install -Dm644 apps/settings.py \ + "$pkgdir"/etc/$pkgname/local_settings.py || return 1 + mv * "$pkgdir"/usr/share/webapps/$pkgname + cd "$pkgdir"/usr/share/webapps/patchwork/apps + ln -sf /etc/patchwork/local_settings.py || return 1 } -md5sums="d327c8ca2f219f597855afadaa520c1d patchwork-0_git20150420.tar.gz" -sha256sums="769f6839f4e25321ecedaf8e7561e1a5e71e2fdb942c33aefb0798f651ed0914 patchwork-0_git20150420.tar.gz" -sha512sums="5e0f93afa3d9afbb97a7e44e355f0f6fae87e77ea8a7d960637984f8f33751a0acd937efc583e6ec6405ca3ff7eb86d100b8ae66e565961afac572fd72587a25 patchwork-0_git20150420.tar.gz" +apache2_wsgi() { + pkgdesc="$pkgname apache2 wsgi support" + depends="apache2 apache2-mod-wsgi" + install_if="apache2-mod-wsgi" + install -Dm644 "$srcdir"/patchwork.wsgi.conf \ + "$subpkgdir"/etc/apache2/conf.d/patchwork.wsgi.conf || return 1 +} + +mysql() { + pkgdesc="$pkgname mysql support" + depends="py-mysqldb" + install_if="py-mysqldb" + mkdir -p "$subpkgdir" +} + +md5sums="d327c8ca2f219f597855afadaa520c1d patchwork-0_git20150420.tar.gz +597e39e9742fa8352b3d34f59f8d404e 0001-support-busybox-readlink.patch +17ca0f41552a80e2a1110a181b78c41b patchwork.wsgi.conf" +sha256sums="769f6839f4e25321ecedaf8e7561e1a5e71e2fdb942c33aefb0798f651ed0914 patchwork-0_git20150420.tar.gz +b87b6ab985e30e75d641d31cfae76420eb3dc5e90b7484f217dd92454e3495af 0001-support-busybox-readlink.patch +e7b63c9cd749f3d055ddb6d32e95e04fd34891992bb97bac86385fdbb87f252a patchwork.wsgi.conf" +sha512sums="5e0f93afa3d9afbb97a7e44e355f0f6fae87e77ea8a7d960637984f8f33751a0acd937efc583e6ec6405ca3ff7eb86d100b8ae66e565961afac572fd72587a25 patchwork-0_git20150420.tar.gz +09fc0d88ce766bce53a0789276e6ad3e52049771e3945ae6a9e6b61cc706f5a44d398de5ae23055b2d205fd3844b84fca538617142e194c5ca149263b9afa0bb 0001-support-busybox-readlink.patch +fc63ad24751d7c7e8beabc7a84034b2086c251be3dfcda26c02aefdd5b369bcda32962f80ddf2d9fa775d625d5d33fde04e2c80485fc9aa3cae886bf363e15f1 patchwork.wsgi.conf" diff --git a/testing/patchwork/patchwork.wsgi.conf b/testing/patchwork/patchwork.wsgi.conf new file mode 100644 index 0000000000..2efd67460e --- /dev/null +++ b/testing/patchwork/patchwork.wsgi.conf @@ -0,0 +1,21 @@ +<IfModule mod_alias.c> + Alias /images/ "/usr/share/webapps/patchwork/htdocs/images/" + Alias /css/ "/usr/share/webapps/patchwork/htdocs/css/" + Alias /js/ "/usr/share/webapps/patchwork/htdocs/js/" + Alias /robots.txt "/usr/share/webapps/patchwork/htdocs/robots.txt" + <Directory "/usr/share/webapps/patchwork/htdocs"> + Order allow,deny + Allow from all + </Directory> + + Alias /static/admin/ "/usr/lib/python2.7/site-packages/django/contrib/admin/static/admin/" + + <Directory "/usr/lib/python2.7/site-packages/django/contrib/admin/static/admin/"> + Order allow,deny + Allow from all + </Directory> +</IfModule> + +WSGIScriptAlias / "/usr/share/webapps/patchwork/lib/apache2/patchwork.wsgi" +WSGIPassAuthorization On + |