~dricottone/huttese-apk

ref: 636063aed7d0618676a42719b453d08933c083d5 huttese-apk/sr.ht/meta.sr.ht/APKBUILD -rw-r--r-- 2.8 KiB
636063ae — Drew DeVault py3-intervals: bump pkgrel 4 years 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=meta.sr.ht
pkgver=0.43.0
pkgrel=0
pkgdesc="sr.ht account service"
url="https://git.sr.ht/~sircmpwn/meta.sr.ht"
arch="all"
license="AGPLv3"
depends="
	py3-bcrypt
	py3-gunicorn
	py3-pgpy
	py3-pystache
	py3-qrcode
	py3-redis
	py3-srht
	py3-sshpubkeys
	py3-zxcvbn
	redis
"
makedepends="py-setuptools nodejs sassc go"
subpackages="$pkgname-openrc $pkgname-billing:_billing"
source="
	$pkgname-$pkgver.tar.gz::https://git.sr.ht/~sircmpwn/$pkgname/archive/$pkgver.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
"
builddir="$srcdir/$pkgname-$pkgver"
export PKGVER=$pkgver
options="$options !check"
install="$pkgname.post-install $pkgname.post-upgrade"

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

package() {
	cd "$builddir"
	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

	cd api
	install -Dm755 metasrht-api "$pkgdir"/usr/bin/metasrht-api
}

_billing() {
	depends="py3-weasyprint py3-html5lib py3-stripe"
	pkgdesc="Extra meta.sr.ht dependencies for billing"
	mkdir -p "$subpkgdir"/usr/lib/python3.8/site-packages/metasrht
	touch "$subpkgdir"/usr/lib/python3.8/site-packages/metasrht/.billing
}

sha512sums="859264e217a604369f0e8efd93069e506c29defbefb2f54d73dd6f3b8a1bed6d52d76371e7f281e82af070e9fbe23f36c24136ef0d979102d2d9587c5707f732  meta.sr.ht-0.43.0.tar.gz
e216548b27a824d65f7db1fcd6a7381de896b35c98ad75b8dcfc77701941b8472a62f562498941ed6ba5f6c18e5e988d19dc80293db42ed5f0d20e453ecbe554  meta.sr.ht.initd
6ee005b75d1a277a3795a0b91eb88c490f27f4053cad5d74051140e812ee5514c77a334f37cd70a3ef7be02feae4a0688e9c06401cd530d3d56b3441c3d57a54  meta.sr.ht.confd
87a9be9668f6c2675fd692078215898c482cbeae0b173e48923a7941d9a7dac0a58b5febf12637a6c69d924206e65cee7fa5f2f6017723b3cdc24f0b13469292  meta.sr.ht-api.initd
6b29cd7bbbadc4e99e47e42bef843eaa17e5cc8e86999158c810a56f694bfd6c58340959f259108f1f26c4664cf2db8a9fbc1c5dad2f33f653483eae6d709056  meta.sr.ht-api.confd
6f307bfd287d3508b8fb0b7c5dc41b2ce935a98052d9b7f9c8a95148f810a0af11fae7a07918bc115c78a8b33ae88ba9b0a0209f52c7e5228f95cb94ccc992ea  meta.sr.ht-webhooks.initd
b055504df3b8ede19aa50d36d97c255f6310dbc6e4fd62f6776beb8d62d0592b761819ecb3120754dbb8ad0b48c04b41bae95a2264de0d96de9e1bee70bc2693  meta.sr.ht-webhooks.confd"