summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 59c924dcc10ed48922976ed777df37353f409117 (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
# Maintainer: deadc0de6 <info@deadc0de.ch>

_pkgname=gocatcli
pkgname="${_pkgname}-git"
pkgver=1.0.3.r1.g9db735a
pkgrel=1
pkgdesc='The command line catalog tool for your offline data'
arch=('x86_64')
url="https://github.com/deadc0de6/gocatcli"
license=('GPL')
makedepends=('go' 'git')
provides=('gocatcli')
conflicts=('gocatcli')
source=("git+https://github.com/deadc0de6/gocatcli.git")
sha256sums=('SKIP')

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

build() {
  cd "${_pkgname}"
  go mod tidy
  make build
}

package() {
  install -Dm755 "${srcdir}/${_pkgname}/bin/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"

  install -Dm644 "${srcdir}/${_pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
  install -Dm644 "${srcdir}/${_pkgname}/README.md" "${pkgdir}/usr/share/doc/${_pkgname}/README.md"
}