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
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=builds.sr.ht
pkgver=0.91.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-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
"
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
}
_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="
c794d2a599ad79cc6f39cba17aa85dff81c4e436533940145b3bcf573ace2c9367dd6a891e1a9d04fc65308fd53457749c304664b84ec98c6e1c626472ec9628 builds.sr.ht-0.91.10.tar.gz
cfece31d18db3bb2253aea80a39250bd9bb8ad891586cacb0e67f78e721b76b12364d896dbdbce420e0a5cd9d4a8afb6fcc501b8d896ba0d53c6b66137193c79 sr.ht-nginx-0.91.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
"