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
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=hg.sr.ht
pkgver=0.28.0
pkgrel=0
pkgdesc="sr.ht mercurial service"
url="https://hg.sr.ht/~sircmpwn/hg.sr.ht"
arch="all"
license="AGPLv3"
depends="
py3-hglib
py3-redis
py3-scmsrht
py3-unidiff
hg-evolve
"
makedepends="py-setuptools nodejs sassc go"
subpackages="$pkgname-openrc $pkgname-nginx:_nginx:noarch"
source="
$pkgname-$pkgver.tar.gz::https://hg.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
hg.sr.ht.initd
hg.sr.ht.confd
hg.sr.ht-api.initd
hg.sr.ht-api.confd
hg.sr.ht-webhooks.initd
hg.sr.ht-webhooks.confd
"
export PKGVER=$pkgver
options="$options !check"
install="$pkgname.post-install $pkgname.post-upgrade"
build() {
python3 setup.py build
cd hgsrht-keys
go build
cd ../api
go build
}
package() {
python3 setup.py install --root="$pkgdir" --optimize=1
mkdir -p "$pkgdir"/etc/init.d
install -Dm755 "$srcdir"/hg.sr.ht.initd \
"$pkgdir"/etc/init.d/hg.sr.ht
install -Dm644 "$srcdir"/hg.sr.ht.confd \
"$pkgdir"/etc/conf.d/hg.sr.ht
install -Dm755 "$srcdir"/hg.sr.ht-api.initd \
"$pkgdir"/etc/init.d/hg.sr.ht-api
install -Dm644 "$srcdir"/hg.sr.ht-api.confd \
"$pkgdir"/etc/conf.d/hg.sr.ht-api
install -Dm755 "$srcdir"/hg.sr.ht-webhooks.initd \
"$pkgdir"/etc/init.d/hg.sr.ht-webhooks
install -Dm644 "$srcdir"/hg.sr.ht-webhooks.confd \
"$pkgdir"/etc/conf.d/hg.sr.ht-webhooks
cd hgsrht-keys
install -Dm755 hgsrht-keys "$pkgdir"/usr/bin/hgsrht-keys
cd ../api
install -Dm755 api "$pkgdir"/usr/bin/hgsrht-api
cd ../hgsrht/hgrcs
install -Dm644 global.cfg "$pkgdir"/etc/sr.ht/hgrcs/global.cfg
install -Dm644 nonpublishing.cfg "$pkgdir"/etc/sr.ht/hgrcs/nonpublishing.cfg
}
_nginx() {
depends="sr.ht-nginx"
pkgdesc="nginx configuration for $pkgname"
install -Dm644 "$srcdir/sr.ht-nginx-master/hg.sr.ht.conf" \
"$subpkgdir"/etc/nginx/http.d/hg.sr.ht.conf
}
sha512sums="
a6912e14a41864b94c13505f2dbc96db39d44e6af364340edfd96a899b29ee8692087078236a70a3e1aa1b06da13a7e1de7988ee37e1a695aefc9152bc930c3f hg.sr.ht-0.28.0.tar.gz
31450f1505aa269be6c24e99b971038ee63d74ffced70affa90fe539a03e07ab490f5a5b89b1eab35ca196508919c71710e10b8628c0ef977d46612d047e1bb9 sr.ht-nginx-0.28.0.tar.gz
38923f14ca3cedf4004447ef5ab75d5699a858efdc22866f1da10a82c3a938227c03380b84fae719b84b4751f03fec55be922d950a155e09c7e8e41ff71b3c6b hg.sr.ht.initd
2c3f1776f8bb6bb42f0d240b28561d0bfb1b4638cad169cd5162f9c227028d0d256fd510f8a47c9c0ec111d11e9f54c293fef6c3e3d99d925dcd170294f44472 hg.sr.ht.confd
379d3eca6754aa2fc7526f8ea937061b53f322ebac71635455d6ff056baaf5d61709c43cfdce182e774f8fd0c0b09f02d1ccbebeac6cbfdc07652fcf734d0c42 hg.sr.ht-api.initd
eaed280fc25b88294c5d02893e72b8751afc1db0db3e5f20123239ca28ae6f3e53b22c11992e44a4f8b4943f6326da0ed03ad0bd0a900d10efcb507d35b1b64f hg.sr.ht-api.confd
93f25762da77462c8167ae53ba37ab4f9982c7f3c2d03dde445f0578758b808987c4781912a0fa5b4a4e25ba50c9d27477dfea8e319908ddc124dc836aefd2d6 hg.sr.ht-webhooks.initd
af5bb605d8ba2e848de5755c9c7f1607591068f6ac79ddc1d312873e92218c6b535eb4cbcf10590656239459b7808ba5469d52d32f80e8e2448fc18c22f7a70c hg.sr.ht-webhooks.confd
"