~sircmpwn/sr.ht-pkgbuilds

ref: d0435ce55aa19915f809aa8145320639257da5dc sr.ht-pkgbuilds/git.sr.ht/PKGBUILD -rw-r--r-- 2.1 KiB View raw
d0435ce5Eli Schwartz Don't use "Unknown Packager" for the official built packages. 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=git.sr.ht
pkgver=0.20.0
pkgrel=3
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-webhooks.service"
	"sysusers.conf"
	"tmpfiles.conf"
)
sha256sums=('6549d78608a7b05bbfcca9f1c1d43dde635765e5625e7a39bc9bd247b02f1e62'
            'fdc573980dce542774229ea9036e99e019ee0a382a271c08ddded9a5077a3e4b'
            '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
}

package() {
	cd $pkgbase-$pkgver
	install -Dm0644 ../git.sr.ht.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
}