summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 27ecaed48012c1c48c69d2eec8b2d5df8b6636f4 (plain)
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
# Maintainer: shtrophic <aur at shtrophic dot net>

pkgname=gmlgcd
pkgver=2.2
pkgrel=2
pkgdesc='The gemlog comment daemon'
arch=('x86_64' 'aarch64')
url='https://git.sr.ht/~shtrophic/gmlgcd'
license=('AGPL-3.0-or-later')
makedepends=('meson' 'scdoc')
checkdepends=('fish')
depends=(
    'confuse'
    'curl'
    'imsg-compat'
    'libbsd'
    'libevent'
)

backup=('etc/gmlgcd.conf' 'etc/gmlgcd.conf.d/help-template.gmi')
source=(
	"$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz"
	"$pkgname-$pkgver.tar.gz.asc::$url/archive/$pkgver.tar.gz.asc"
	"sysusers-gmlgcd.conf"
        "tmpfiles-gmlgcd.conf"
)
validpgpkeys=(10F1CC925057D456798EBF9C1B3EB6FE2D338B4A)
sha256sums=('22fdf0cbfce5eff5e424d66ac4b11d3e96168f7d1cce94a540e005d5b8c60278'
            'SKIP'
            'e071442fbd90cf80ce528344d4849f6372c8e75d236f3dca9a56c03f3586d92d'
            'd5414cc42d81608d0d8267d3d2d1e7ef7323abdecf96a33af54bae9416f0050e')

prepare() {
	sed -i 's|/usr/local|/usr|g' "$srcdir/$pkgname-$pkgver/$pkgname.service"
}

build() {
	cd "$srcdir/$pkgname-$pkgver"

	meson setup builddir --buildtype release --prefix=/usr
	meson compile -C builddir
}

check() {
	cd "$srcdir/$pkgname-$pkgver"
	meson test -C builddir
}

package() {
	cd "$srcdir/$pkgname-$pkgver"

	meson install -C builddir --destdir "$pkgdir"

	install -Dm 644 gmlgcd.service -t "$pkgdir/usr/lib/systemd/system"
	install -Dm 644 "$srcdir/sysusers-gmlgcd.conf" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
        install -Dm 644 "$srcdir/tmpfiles-gmlgcd.conf" "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"

	install -Dm 640 gmlgcd.conf -t "$pkgdir/etc"
	install -Dm 644 help-template.gmi -t "$pkgdir/etc/$pkgname.conf.d"

	install -Dm 644 template.gmi README.md -t "$pkgdir/usr/share/doc/$pkgname"
	install -Dm 644 COPYING -t "$pkgdir/usr/share/licenses/$pkgname"
}