~dricottone/apkbuilds

ref: 5a83bac6a997f551af88e4bc462e433cdc693ba4 apkbuilds/src/builds.sr.ht/APKBUILD -rwxr-xr-x 3.7 KiB
5a83bac6Dominic Ricottone WIP: nginx-dav-ext-module 7 months ago
                                                                                
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
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=builds.sr.ht
pkgver=0.85.6
pkgrel=0
pkgdesc="sr.ht build service"
url="https://git.sr.ht/~sircmpwn/builds.sr.ht"
arch="all"
license="AGPLv3"
depends="
	py3-ansi2html
	py3-celery
	py3-gunicorn
	py3-lxml
	py3-redis
	py3-srht
	py3-yaml
"
makedepends="py-setuptools sassc go minify"
subpackages="
	$pkgname-images:_images
	$pkgname-worker:_worker
	$pkgname-openrc
	$pkgname-nginx:_nginx:noarch
"
source="
	$pkgname-$pkgver.tar.gz::https://git.sr.ht/~sircmpwn/$pkgname/archive/${pkgver}.tar.gz
	sr.ht-nginx-$pkgver.tar.gz::https://git.sr.ht/~sircmpwn/sr.ht-nginx/archive/master.tar.gz
	builds.sr.ht.confd
	builds.sr.ht.initd
	builds.sr.ht-api.confd
	builds.sr.ht-api.initd
	builds.sr.ht-worker.confd
	builds.sr.ht-worker.initd
	builds.sr.ht.gunicorn.conf.py
"
install="$pkgname.pre-install $pkgname.post-upgrade"
builddir="$srcdir/$pkgname-$pkgver"
export PKGVER=$pkgver
options="$options !check"

build() {
	python3 setup.py build
	pyver="$(python3 --version | cut -d. -f1-2 | cut -d' ' -f2-)"
	make SRHT_PATH=/usr/lib/python$pyver/site-packages/srht
}

package() {
	cd "$builddir"
	python3 setup.py install --root="$pkgdir" --optimize=1
	install -Dm755 api/api "$pkgdir"/usr/bin/buildssrht-api
	install -Dm755 "$srcdir"/builds.sr.ht.initd \
		"$pkgdir"/etc/init.d/builds.sr.ht
	install -Dm644 "$srcdir"/builds.sr.ht.confd \
		"$pkgdir"/etc/conf.d/builds.sr.ht
	install -Dm755 "$srcdir"/builds.sr.ht-api.initd \
		"$pkgdir"/etc/init.d/builds.sr.ht-api
	install -Dm644 "$srcdir"/builds.sr.ht-api.confd \
		"$pkgdir"/etc/conf.d/builds.sr.ht-api
	install -Dm644 "$srcdir"/builds.sr.ht.gunicorn.conf.py \
		"$pkgdir"/etc/sr.ht/builds.sr.ht.gunicorn.conf.py
}

_images() {
	depends="builds.sr.ht"
	pkgdesc="builds.sr.ht build images"
	cd "$builddir"
	mkdir -p "$subpkgdir"/var/lib/
	cp -R images "$subpkgdir"/var/lib/
}

_worker() {
	depends="builds.sr.ht-images"
	pkgdesc="builds.sr.ht build worker"
	cd "$builddir"
	install -Dm755 worker/worker "$subpkgdir"/usr/bin/builds.sr.ht-worker
	install -Dm755 "$srcdir"/builds.sr.ht-worker.initd \
		"$subpkgdir"/etc/init.d/builds.sr.ht-worker
	install -Dm644 "$srcdir"/builds.sr.ht-worker.confd \
		"$subpkgdir"/etc/conf.d/builds.sr.ht-worker
}

_nginx() {
	depends="sr.ht-nginx"
	pkgdesc="nginx configuration for $pkgname"
	install -Dm644 "$srcdir/sr.ht-nginx-master/builds.sr.ht.conf" \
		"$subpkgdir"/etc/nginx/http.d/builds.sr.ht.conf
}

sha512sums="
8c17db53a93e79551370c60379f70a72870b7edb34f93df971255d2f42f15dcf0e88cc42149fbbdaae6553987eaf3ada02f9608b9397e2d9afb5202badd66be8  builds.sr.ht-0.85.6.tar.gz
ccd803d2d87c86a035c36d88f538828cfec2da8f6bd1bd15f3ec0f1fdb6fd006f4f5145700e19eab23fcc0de1ac30c47062698214e3842209c42ea1d4f000377  sr.ht-nginx-0.85.6.tar.gz
d205043f3fe0dc022d25f8714ad5fb095a7dc92a10fe4eb4a1c6d6a500b54692773c1e314e9337a320f9b6043225a9a5a9e50d9a5dc30e7c80305b7ad538ea0f  builds.sr.ht.confd
ea8b25d92e53d62bff2466d048d9a34482d9d06a2d6bdb828ce9d036009cdb2ca7435c288f79b51860539399acdb3c27eda268e8ec7a7fcfa2969961959b2d0e  builds.sr.ht.initd
a507ea33f4e87d41d68b42f816914d357ff687e249e424f2278e3c44e980774080377ca5daa02212776095402ba7e271355d427750270005cf6f6db079040a08  builds.sr.ht-api.confd
e48c2c1ab073a2e8c900bea336004be6f792c5151dc3af4ea3625fd403959b6959d816acfbd8e3f0faae35ed10626c64616fad701bf5212b0c198b554483721d  builds.sr.ht-api.initd
5aa18804ddfee263763b035780679b98cf4877de193c254f24fab7ce56f304556af9a377bfca36635c21b4380892e8d458a420021919934080cc43feda1694c4  builds.sr.ht-worker.confd
074627ee36977e9ded111fa746afab36719065d3eb063b212fefd2371f59cb88a12067ca66951b014dab0d6668c682e3fbd18c7b3cf430e432490aca8e0f1ed4  builds.sr.ht-worker.initd
21f39ea0981d7773eb512e5ba234022364d0f7ee9b6ca897ce4c51e3b127eb2d9a7a5fbcaa06d14f20b2df2439421d7261f200e3f4f13b45a91e78ba77bc363c  builds.sr.ht.gunicorn.conf.py
"