summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 86b2f5e44dea629500b0ef1902af209a8fed4ec7 (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
# Maintainer: Simon Ser <contact@emersion.fr>

pkgname=pixfmtdb-git
_pkgname=pixfmtdb
pkgver=r57.e5dcd7486f15
pkgrel=1
pkgdesc='A pixel format database'
arch=('x86_64')
url='https://gitlab.freedesktop.org/emersion/pixfmtdb'
license=('MIT')
makedepends=('git' 'go')
provides=('pixfmtdb')
conflicts=('pixfmtdb')
source=(
	"git+https://gitlab.freedesktop.org/emersion/pixfmtdb"
	"pixfmtdb.service"
)
sha256sums=(
	'SKIP'
	'203158db28c695a541a6fccd666958f3b7a5aa57b1ec0f3b2b4f3d644cc95994'
)

pkgver() {
	cd "$srcdir/pixfmtdb"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
	cd "$srcdir/pixfmtdb"
	export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
	go build -v -o pixfmtdb .
}

package() {
	cd "$srcdir/pixfmtdb"
	install -Dm755 pixfmtdb "$pkgdir/usr/bin/pixfmtdb"
	install -Dm644 "$srcdir/pixfmtdb.service" "$pkgdir/usr/lib/systemd/system/pixfmtdb.service"
}