~sircmpwn/sr.ht-pkgbuilds

ref: 2faa45db0b8d36a62aea5ec7ea713948ed6a5b2d sr.ht-pkgbuilds/meta.sr.ht/PKGBUILD -rw-r--r-- 1.7 KiB
2faa45dbThorben Günther Celery: Update loglevel 8 months 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
pkgname=meta.sr.ht
pkgver=0.44.2
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-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=('c03536a779663b8b9c74053c984cac359870ed131aa9b7fc097403e12cbcb043'
            '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
}