PKGBUILD
Tuesday 13 December 2022

archlinux

 1# Maintainer: Emad Elsaid <emad.elsaid.hamed@gmail.com>
 2pkgname=xlog-git
 3_pkgname="xlog"
 4pkgver=0.41.0.r5.gf79e299
 5pkgrel=1
 6pkgdesc="Xlog is a static site generator for digital gardening written in Go"
 7arch=('i686' 'pentium4' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
 8url="https://github.com/emad-elsaid/xlog"
 9license=('MIT')
10depends=('git')
11makedepends=('go>=1.19')
12provides=('xlog')
13conflicts=('xlog')
14source=(xlog::git+https://github.com/emad-elsaid/xlog.git#branch=master)
15sha256sums=("SKIP")
16
17pkgver() {
18    cd "$srcdir/$_pkgname"
19    git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
20}
21
22build() {
23    export GOPATH="$srcdir"/gopath
24    cd "$srcdir/$_pkgname"
25    go build -modcacherw -o xlog ./cmd/xlog
26}
27
28package() {
29    cd "$srcdir/$_pkgname"
30    install -Dm755 xlog $pkgdir/usr/bin/xlog
31}

See Also