aboutsummaryrefslogtreecommitdiffstats
path: root/main/patchwork/APKBUILD
blob: 7243ed96383e35728daa878238651bb8eb3dfb4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=patchwork
pkgver=1.1.1
pkgrel=0
pkgdesc="Web-based patch tracking system "
url="http://jk.ozlabs.org/projects/patchwork/"
arch="noarch"
license="GPL"
depends="py-django py-django-registration git py-psycopg2"
depends_dev=""
makedepends="$depends_dev"
install=""
subpackages="$pkgname-doc $pkgname-apache2-wsgi:apache2_wsgi $pkgname-nginx_wsgi $pkgname-mysql
	$pkgname-postgresql pwclient:pwclient"
source="$pkgname-$pkgver.tar.gz::https://github.com/getpatchwork/$pkgname/archive/v$pkgver.tar.gz
	0001-support-busybox-readlink.patch
	0002-remove-uneeded-bashism-from-tools-and-change-path.patch
	nginx-uwsgi-patchwork-conf.ini
	uwsgi.patchwork.confd"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
        local i
        cd "$_builddir"
        for i in $source; do
                case $i in
                *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
                esac
        done
}

build() {
	cd "$_builddir"
	return 0
}

package() {
	cd "$_builddir"
	mkdir -p "$pkgdir"/usr/share/webapps/$pkgname
	install -Dm644 COPYING \
		"$pkgdir"/usr/share/doc/$pkgname/COPYING || return 1
	rm -f COPYING
	install -Dm644 patchwork/settings/production.example.py \
		"$pkgdir"/etc/$pkgname/production.py || return 1
	mv * "$pkgdir"/usr/share/webapps/$pkgname
	cd "$pkgdir"/usr/share/webapps/patchwork/patchwork/settings
	ln -sf /etc/patchwork/production.py || return 1
}

apache2_wsgi() {
	pkgdesc="$pkgname apache2 wsgi support"
	depends="apache2 apache2-mod-wsgi"
	install_if="$pkgname=$pkgver-r$pkgrel apache2-mod-wsgi"
	install -Dm644 "$pkgdir"/usr/share/webapps/patchwork/lib/apache2/patchwork.wsgi.conf \
		"$subpkgdir"/etc/apache2/conf.d/patchwork.wsgi.conf || return 1
}

nginx_wsgi() {
	pkgdesc="$pkgname nginx wsgi support"
	depends="nginx uwsgi-python"
	install -Dm644 "$pkgdir"/usr/share/webapps/patchwork/lib/nginx/patchwork.conf \
		"$subpkgdir"/etc/nginx/conf.d/patchwork.conf || return 1
	install -Dm644 "$srcdir"/nginx-uwsgi-patchwork-conf.ini \
		"$subpkgdir"/etc/patchwork/patchwork.ini || return 1
	install -Dm644 "$srcdir"/uwsgi.patchwork.confd \
		"$subpkgdir"/etc/conf.d/uwsgi.patchwork || return 1
}

mysql() {
	pkgdesc="$pkgname mysql support"
	depends="py-mysqldb"
	mkdir -p "$subpkgdir"
}

postgresql() {
	pkgdesc="$pkgname postgresql support"
	depends="py-psycopg2"
	mkdir -p "$subpkgdir"
}

pwclient() {
	pkgdesc="command-line client for patchwork"
	depends="python"
	install -Dm775 "$pkgdir"/usr/share/webapps/patchwork/patchwork/bin/pwclient \
		"$subpkgdir"/usr/bin/pwclient || return 1
}

md5sums="9d665f68edc1afc6883873bb89dafe48  patchwork-1.1.1.tar.gz
c0bf2a78294773e6a5dc5fb5c9b525cf  0001-support-busybox-readlink.patch
2dde450ee27a24ea4b0448b1331e7cc9  0002-remove-uneeded-bashism-from-tools-and-change-path.patch
698b5d0dedc03e76b6f9a33738c44e79  nginx-uwsgi-patchwork-conf.ini
e3b6d46baf11e59a6547c8c0ff11935e  uwsgi.patchwork.confd"
sha256sums="e5bb8c453b2d042d13f87b51cba10360bd1d84ff181d6f2ee011c3b600c613f0  patchwork-1.1.1.tar.gz
43159a12dbbd4161ae1476c38b5435517dbc7260a1e25aa6263038cc4c267b99  0001-support-busybox-readlink.patch
499fc47ac715901fe0a5f5043f7ee722ab39e694451c70982830e1c728ea136d  0002-remove-uneeded-bashism-from-tools-and-change-path.patch
51c1f9c32aff324b685b2d34200f528953d9f0e774eefd69d3b7788c1b16b3d8  nginx-uwsgi-patchwork-conf.ini
e9054b0b7510f40e240619d6edf58200d3a759f3d87cbf78bcf4a5177ece1569  uwsgi.patchwork.confd"
sha512sums="2f2f9114a2185ca34d493a87d34f16cfb4bc05f4c6c261f533faa9cbaded7b77a37f202715668bb428462848733ff042a130271addb28f89445ad22e212376d7  patchwork-1.1.1.tar.gz
a5d4e24741b66092a39c1ef4fdc76dffa1ddf87a69544ab0c374fb0701b0f7340a62ead86835d9bb412df5713f3ea3c0218e9e2e0cd01d9a1aad9414a3cc75fa  0001-support-busybox-readlink.patch
12d1b184c6cb1d3f2c51adab6b60638e4869e055e677897bb66ee1a52312e77817bec543842324e2cbc2c226f3ab9d11c3782b5ef3a6f5f5712996cadbc6c9c9  0002-remove-uneeded-bashism-from-tools-and-change-path.patch
6bafda9fbd067b8f54fbff13cb28afe99ee1f26bb1b6f212264a8c9f3eb2723394b9c9ccea2fe97677505f32b324462f1646ac1990f1cce41cfbbbd19de9f701  nginx-uwsgi-patchwork-conf.ini
a06c6176e44f5e2c04eb8609e3b8595ea59782e6f6167dcbb50a0af3163e484096c876bcb0cd67b18cb826eef4665f368aa8d9e5ccd32eab9bd5ca2ca8e2d080  uwsgi.patchwork.confd"