~sircmpwn/sr.ht-pkgbuilds

ref: eb016e0678dcb7c4643a8b42e39f7df7ef3b683f sr.ht-pkgbuilds/git.sr.ht/PKGBUILD -rw-r--r-- 2.3 KiB View raw
eb016e06Eli Schwartz git.sr.ht: upgrade to latest version and add the API service 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
61
62
63
64
65
66
67
pkgname=git.sr.ht
pkgver=0.52.0
pkgrel=2
pkgdesc="sr.ht git services"
arch=("any")
license=("AGPL3")
url="https://git.sr.ht/~sircmpwn/git.sr.ht"
depends=("python-srht" "python-pygit2" "python-scmsrht" "python-minio")
makedepends=("python-setuptools" "nodejs" "sassc" "go")
optdepends=(
	"builds.sr.ht: builds.sr.ht integration"
	"python-celery: webhooks and builds.sr.ht integration"
	"redis: webhooks and builds.sr.ht integration"
	"python-redis: webhooks and builds.sr.ht integration"
	"cronie: for git.sr.ht cronjob (recommended)"
)
install=git.sr.ht.install
source=(
	"$pkgname-$pkgver.tar.gz::http://git.sr.ht/~sircmpwn/$pkgname/archive/$pkgver.tar.gz"
	"git.sr.ht.service"
	"git.sr.ht-api.service"
	"git.sr.ht-webhooks.service"
	"sysusers.conf"
	"tmpfiles.conf"
)
sha256sums=('a40571efc0d36378a6c0764b80e37c8a07ffb67dd237e0e9538b327588c06e0f'
            'fdc573980dce542774229ea9036e99e019ee0a382a271c08ddded9a5077a3e4b'
            'a01bf05bb49ee007d4527fa62dd0050507142d081fdeff22fd9aab85fe9c5230'
            '6ca8fe283ec489e618a104120ab1e8334ef68c703f3aa9b714b65698bb8041b3'
            '7ea576c62c70f7a26f135e8ea7aedc82ab2d670b213d8d8e861819bc84e99802'
            '3982d28a0c7581c1f36d78dd91c1cccedb696c18c99862534af3c1b65858ac82')
export PKGVER=$pkgver

build() {
	cd $pkgbase-$pkgver
	python3 setup.py build
	cd gitsrht-dispatch
	go build
	cd ../gitsrht-shell
	go build
	cd ../gitsrht-keys
	go build
	cd ../gitsrht-update-hook
	go build
	cd ../api
	go build -o gitsrht-api
}

package() {
	cd $pkgbase-$pkgver
	install -Dm0644 ../git.sr.ht.service -t "$pkgdir"/usr/lib/systemd/system/
	install -Dm0644 ../git.sr.ht-api.service -t "$pkgdir"/usr/lib/systemd/system/
	install -Dm0644 ../git.sr.ht-webhooks.service -t "$pkgdir"/usr/lib/systemd/system/
	install -Dm0644 ../sysusers.conf "$pkgdir/usr/lib/sysusers.d/git.sr.ht.conf"
	install -Dm0644 ../tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/git.sr.ht.conf"
	python3 setup.py install --root="${pkgdir}" --optimize=1
	cd gitsrht-dispatch
	install -Dm755 gitsrht-dispatch "$pkgdir"/usr/bin/gitsrht-dispatch
	cd ../gitsrht-shell
	install -Dm755 gitsrht-shell "$pkgdir"/usr/bin/gitsrht-shell
	cd ../gitsrht-keys
	install -Dm755 gitsrht-keys "$pkgdir"/usr/bin/gitsrht-keys
	cd ../gitsrht-update-hook
	install -Dm755 gitsrht-update-hook "$pkgdir"/usr/bin/gitsrht-update-hook
	cd ../api
	install -Dm755 gitsrht-api "$pkgdir"/usr/bin/gitsrht-api
}