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
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=meta.sr.ht
pkgver=0.69.4
pkgrel=0
pkgdesc="sr.ht account service"
url="https://git.sr.ht/~sircmpwn/meta.sr.ht"
arch="all"
license="AGPLv3"
depends="
py3-bcrypt
py3-dnspython
py3-gunicorn
py3-qrcode
py3-redis
py3-srht
py3-zxcvbn
redis
"
makedepends="py-setuptools sassc go minify"
subpackages="$pkgname-openrc $pkgname-billing:_billing:noarch $pkgname-nginx:_nginx:noarch"
# XXX: Is this sr.ht-nginx URL acceptable? I'm not sure how to version it
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
meta.sr.ht.initd
meta.sr.ht.confd
meta.sr.ht-api.initd
meta.sr.ht-api.confd
meta.sr.ht-webhooks.initd
meta.sr.ht-webhooks.confd
meta.sr.ht.gunicorn.conf.py
"
builddir="$srcdir/$pkgname-$pkgver"
export PKGVER=$pkgver
options="$options !check"
install="$pkgname.post-install $pkgname.post-upgrade"
build() {
python3 setup.py build
}
package() {
python3 setup.py install --root="$pkgdir" --optimize=1
install -Dm755 "$srcdir"/meta.sr.ht.initd \
"$pkgdir"/etc/init.d/meta.sr.ht
install -Dm644 "$srcdir"/meta.sr.ht.confd \
"$pkgdir"/etc/conf.d/meta.sr.ht
install -Dm755 "$srcdir"/meta.sr.ht-api.initd \
"$pkgdir"/etc/init.d/meta.sr.ht-api
install -Dm644 "$srcdir"/meta.sr.ht-api.confd \
"$pkgdir"/etc/conf.d/meta.sr.ht-api
install -Dm755 "$srcdir"/meta.sr.ht-webhooks.initd \
"$pkgdir"/etc/init.d/meta.sr.ht-webhooks
install -Dm644 "$srcdir"/meta.sr.ht-webhooks.confd \
"$pkgdir"/etc/conf.d/meta.sr.ht-webhooks
install -Dm644 "$srcdir"/meta.sr.ht.gunicorn.conf.py \
"$pkgdir"/etc/sr.ht/meta.sr.ht.gunicorn.conf.py
install -Dm755 api/api "$pkgdir"/usr/bin/metasrht-api
}
_billing() {
depends="py3-stripe"
pkgdesc="Extra meta.sr.ht dependencies for billing"
mkdir -p "$subpkgdir"/etc/srht
touch "$subpkgdir"/etc/srht/.billing
}
_nginx() {
depends="sr.ht-nginx"
pkgdesc="nginx configuration for $pkgname"
install -Dm644 "$srcdir/sr.ht-nginx-master/meta.sr.ht.conf" \
"$subpkgdir"/etc/nginx/http.d/meta.sr.ht.conf
}
sha512sums="
6a8e2ffa7c900f76bd139f39604d4ed75c898c4c71a7e362c30d3cb7b2bcd71fadad8a2fd1e193adbc4d3803aa7fb964ee32ac148b114a489703668e3dcfe683 meta.sr.ht-0.69.4.tar.gz
ccd803d2d87c86a035c36d88f538828cfec2da8f6bd1bd15f3ec0f1fdb6fd006f4f5145700e19eab23fcc0de1ac30c47062698214e3842209c42ea1d4f000377 sr.ht-nginx-0.69.4.tar.gz
f84bb7c0532a27b1a2425726a79b329d4782eb459571c289d793beabfe9334ffbca53bcb19a699e1f0a7d696fe57cf8c0692f72576351d9cf4b9f8f325222eaf meta.sr.ht.initd
fbff1755c572da66c351004690530d875c882a65576cc641399e07dfb39e818105be1370f6ba28c6e2774e3868fe3aa3aa17dec51d14547c8db7f1aa685b0ac8 meta.sr.ht.confd
8377026251395fa74980a6733a6715c5dcfa6b893ad846d556479d3170605ba7cbe5dcc1c482f90a20e0b6332732cba9480d198dfcc9d73d2d6e338e5276bc65 meta.sr.ht-api.initd
36550c28b15fbdf32051591a9231035852916ae701521afa00b7da5959ec08c6eca74714ecea3b8d5f35d41c388aadd61ddfeee9a270cefdadf9be32b0ced145 meta.sr.ht-api.confd
26db23b2302c5a3a3dcb6068f0bc57d932a24ff8bcf288b8d8e1ca2385ee05603eded26e19b73c40adc96b8a0d2fad64c4f28526d69bcbc61981df8acc3efb11 meta.sr.ht-webhooks.initd
0091092a0f0f77158c571e0731470239034cd1480657755ca0537ab4d00002d60b444bcd7df12bfc86b4ca79f5cfed51722079a46a44abc8bf2ba6a7e1111a7c meta.sr.ht-webhooks.confd
39c12898976aa3b5896ed8287216cf4f2ed4998722891e1b5e507070df86f9111286396eb82cc01b3faaf1016b51db47d077fc4b1b7d72e3782f936c89fb3e37 meta.sr.ht.gunicorn.conf.py
"