aboutsummaryrefslogtreecommitdiffstats
path: root/main/patchwork/APKBUILD
blob: f67f40c1d1da52f19b0bb595dd9b2b246eb35a8e (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
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=patchwork
pkgver=0_git20150420
pkgrel=7
pkgdesc="Web-based patch tracking system "
url="http://jk.ozlabs.org/projects/patchwork/"
arch="noarch"
license="GPL"
depends="py-django1.5 py-django-registration git"
depends_dev=""
makedepends="$depends_dev"
install=""
subpackages="$pkgname-doc $pkgname-apache2-wsgi:apache2_wsgi $pkgname-mysql
	$pkgname-postgresql pwclient:pwclient"
source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz
	0001-support-busybox-readlink.patch
	0001-use-webapps-dir-structure.patch
	0001-pwclient-set-default-url-to-alpine-patchwork.patch
	0001-remove-uneeded-bashism-from-tools-and-change-path.patch"
giturl="git://ozlabs.org/home/jk/git/patchwork"
disturl="dev.alpinelinux.org:/archive/$pkgname/"
_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 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
}

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
}

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/apps/patchwork/bin/pwclient \
		"$subpkgdir"/usr/bin/pwclient || return 1
}

md5sums="d327c8ca2f219f597855afadaa520c1d  patchwork-0_git20150420.tar.gz
597e39e9742fa8352b3d34f59f8d404e  0001-support-busybox-readlink.patch
629ebd3fa8ed122b319a73161367c9c1  0001-use-webapps-dir-structure.patch
82d64c7d30a19789798af8630b7b4da7  0001-pwclient-set-default-url-to-alpine-patchwork.patch
3b601b5cc3f21ec76011a292c38759f6  0001-remove-uneeded-bashism-from-tools-and-change-path.patch"
sha256sums="769f6839f4e25321ecedaf8e7561e1a5e71e2fdb942c33aefb0798f651ed0914  patchwork-0_git20150420.tar.gz
b87b6ab985e30e75d641d31cfae76420eb3dc5e90b7484f217dd92454e3495af  0001-support-busybox-readlink.patch
6266599432e20b2c638023417346d94840e4fbaaedd1899895904315376ad50f  0001-use-webapps-dir-structure.patch
dc188344123594add1a3140e8f02d8fc453b06dc0237110f11e7d43791b9a00d  0001-pwclient-set-default-url-to-alpine-patchwork.patch
179c7fc763d9fa6dd684be4f4c056441d27c23a7ab0262416b0ba1732ab579f4  0001-remove-uneeded-bashism-from-tools-and-change-path.patch"
sha512sums="5e0f93afa3d9afbb97a7e44e355f0f6fae87e77ea8a7d960637984f8f33751a0acd937efc583e6ec6405ca3ff7eb86d100b8ae66e565961afac572fd72587a25  patchwork-0_git20150420.tar.gz
09fc0d88ce766bce53a0789276e6ad3e52049771e3945ae6a9e6b61cc706f5a44d398de5ae23055b2d205fd3844b84fca538617142e194c5ca149263b9afa0bb  0001-support-busybox-readlink.patch
429df7faef59701d3754b001a0834fe4a91c13f20a2f50d407d21b145f167ce241fea046e8c251b1993c2e8b7e0aeb29bf69227446ca2236db0e5dd576f38477  0001-use-webapps-dir-structure.patch
1a5007f28ca7f1ed98dfa7c43e4388d76833d6f80b102e30f850517d8ceb1c86277c0c9c048a8987ede20001bc208e2be8147d20ec9354216bd2e751c72ebc97  0001-pwclient-set-default-url-to-alpine-patchwork.patch
5ecc911e60cf75f1885339785a8ce805114c722871069268af494cc24dc73d5d8af608a0f16c2ea15684f709770d031b5c02295f19fdf896599e1b50f0cf6e5b  0001-remove-uneeded-bashism-from-tools-and-change-path.patch"