summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: da2c40dbea86f66b57dcf6993b6a3bf1129e8609 (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
# Maintainer: Fernando Nunez <me@fernandonunez.io>
pkgname=yaylog-git
pkgver=3.7.0.r2.g10a2934
pkgrel=1
pkgdesc="A CLI utility to list installed packages with filtering and sorting, written in Go."
arch=("any")
url="https://github.com/Zweih/yaylog"
license=("MIT")
makedepends=("go" "git")
provides=("yaylog")
conflicts=("yaylog" "yaylog-bin")
source=("git+https://github.com/Zweih/yaylog.git")
sha256sums=('SKIP')

_binaryname="yaylog"

pkgver() {
  cd "$srcdir/yaylog"
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "$srcdir/yaylog"
  export CGO_ENABLED=0
  go build -trimpath -o ${_binaryname} ./cmd/${_binaryname}
}

package() {
  cd "$srcdir/yaylog"
  install -Dm755 "${_binaryname}" "$pkgdir/usr/bin/${_binaryname}"
  install -Dm644 "${_binaryname}.1" "$pkgdir/usr/share/man/man1/${_binaryname}.1"
}