~sircmpwn/sr.ht-pkgbuilds

eb016e0678dcb7c4643a8b42e39f7df7ef3b683f — Eli Schwartz 2 months ago d0435ce
git.sr.ht: upgrade to latest version and add the API service
2 files changed, 23 insertions(+), 3 deletions(-)

M git.sr.ht/PKGBUILD
A git.sr.ht/git.sr.ht-api.service
M git.sr.ht/PKGBUILD => git.sr.ht/PKGBUILD +10 -3
@@ 1,6 1,6 @@
pkgname=git.sr.ht
pkgver=0.20.0
pkgrel=3
pkgver=0.52.0
pkgrel=2
pkgdesc="sr.ht git services"
arch=("any")
license=("AGPL3")


@@ 18,12 18,14 @@ 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=('6549d78608a7b05bbfcca9f1c1d43dde635765e5625e7a39bc9bd247b02f1e62'
sha256sums=('a40571efc0d36378a6c0764b80e37c8a07ffb67dd237e0e9538b327588c06e0f'
            'fdc573980dce542774229ea9036e99e019ee0a382a271c08ddded9a5077a3e4b'
            'a01bf05bb49ee007d4527fa62dd0050507142d081fdeff22fd9aab85fe9c5230'
            '6ca8fe283ec489e618a104120ab1e8334ef68c703f3aa9b714b65698bb8041b3'
            '7ea576c62c70f7a26f135e8ea7aedc82ab2d670b213d8d8e861819bc84e99802'
            '3982d28a0c7581c1f36d78dd91c1cccedb696c18c99862534af3c1b65858ac82')


@@ 40,11 42,14 @@ build() {
	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"


@@ 57,4 62,6 @@ package() {
	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
}

A git.sr.ht/git.sr.ht-api.service => git.sr.ht/git.sr.ht-api.service +13 -0
@@ 0,0 1,13 @@
[Unit]
Description=git.sr.ht API service
Requires=redis.service postgresql.service
After=redis.service postgresql.service network.target

[Service]
Type=simple
User=gitsrht
Restart=always
ExecStart=/usr/bin/gitsrht-api -b :5101

[Install]
WantedBy=multi-user.target