~dricottone/huttese-apk

ref: 37705be3da581e08500b5c711825e2a83b704304 huttese-apk/sr.ht/builds.sr.ht/APKBUILD -rwxr-xr-x 3.7 KiB
37705be3 — Drew DeVault py3-stripe: upgrade to 2.68.0 2 years 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
100
101
102
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=builds.sr.ht
pkgver=0.74.10
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-pgpy
	py3-redis
	py3-srht
	py3-yaml
"
makedepends="py-setuptools nodejs sassc go"
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
	cd worker
	go build
	cd ../api
	go build
}

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="
668ea5cda4ff65b6c3de87dffe993dd33232ae7ace0f45630410c991cd54038e82f8088bb039db5360125a87b650af47e9e5491ded0148bc067fc2a1c7b7e695  builds.sr.ht-0.74.10.tar.gz
917bbc9a493f6aa756af3f3597f9edf2e25227efe30f6ab635f99a7d9f4ecd6e9f36a7f2b9b40cc95b6e584dd62e1a0badb46e4ff9d3c3d5ce959455b15a95b6  sr.ht-nginx-0.74.10.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
"