~sircmpwn/sr.ht-pkgbuilds

ref: b415bd470736179a0d8d3a0a89de6500c58ce3eb sr.ht-pkgbuilds/meta.sr.ht/PKGBUILD -rw-r--r-- 1.7 KiB
b415bd47Roshless add missing python-dnspython dependency a month 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
pkgname=meta.sr.ht
pkgver=0.52.15
pkgrel=2
pkgdesc="sr.ht core account services"
arch=("x86_64")
license=("AGPL3")
url="https://git.sr.ht/~sircmpwn/meta.sr.ht"
install=meta.sr.ht.install
depends=(
	"python-dnspython"
	"python-bcrypt"
	"python-prometheus_client"
	"python-pgpy"
	"python-pystache"
	"python-qrcode"
	"python-redis"
	"python-srht"
	"python-sshpubkeys"
	"python-zxcvbn"
	"redis"
	"gunicorn"
)
optdepends=(
	"python-psycopg2: for PostgreSQL databases"
	"python-stripe: for billing"
	"python-weasyprint: for billing"
)
makedepends=("python-setuptools" "nodejs" "sassc" "go")
source=(
	"$pkgname-$pkgver.tar.gz::http://git.sr.ht/~sircmpwn/$pkgname/archive/$pkgver.tar.gz"
	"meta.sr.ht.service"
	"meta.sr.ht-api.service"
	"meta.sr.ht-webhooks.service"
	"sysusers.conf"
)
sha256sums=('df187f8e0275d6805d563f091b093eadb7690db8d07fb274c7dd586a0a180567'
            '79b30d4b2275005a78cf29a185fab07301455557d631d6263ee28a2592a75067'
            'ac04fff6a22f1b194cf84f3a296cf2225f38c393e437f24bc3af3e3b677017a1'
            'ab67c3a803d8a06606584e0923223336c1bb297eb1384f77d00a035e68dbb7a3'
            'b98af4986b4a470cf80d8651563946706717fb556cf31433581f22173ada93db')
export PKGVER=$pkgver

build() {
	cd $pkgbase-$pkgver
	python3 setup.py build
	cd api
	go build -o metasrht-api
}

package() {
	cd $pkgbase-$pkgver
	install -Dm0644 ../meta.sr.ht.service -t "$pkgdir"/usr/lib/systemd/system/
	install -Dm0644 ../meta.sr.ht-api.service -t "$pkgdir"/usr/lib/systemd/system/
	install -Dm0644 ../meta.sr.ht-webhooks.service \
		-t "$pkgdir"/usr/lib/systemd/system/
	install -Dm0644 ../sysusers.conf "$pkgdir/usr/lib/sysusers.d/meta.sr.ht.conf"
	python3 setup.py install --root="${pkgdir}" --optimize=1
	cd api
	install -Dm755 metasrht-api "$pkgdir"/usr/bin/metasrht-api
}