summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b30251a96885f46a43156b4f553f93ade1565085 (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 Paul <simonpaul@mailbox.org>

pkgname=twad-git
_pkgname=twad
pkgver=v0.30.0
pkgrel=1
pkgdesc='Manage DOOM engines and mods with the terminal wad launcher'
arch=('any')
url="https://github.com/zmnpl/twad"
license=('MIT')
makedepends=('go' 'git')
source=("git+https://github.com/zmnpl/twad.git")
sha256sums=('SKIP')

pgkver() {
	cd "${srcdir}"/${_pkgname}
	git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
  #echo "v0.26.0"
}

build() {
  cd "${srcdir}"/${_pkgname}
  #git checkout rc
  #export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
  export CGO_CPPFLAGS="${CPPFLAGS}"
  export CGO_CFLAGS="${CFLAGS}"
  export CGO_CXXFLAGS="${CXXFLAGS}"
  export CGO_LDFLAGS="${LDFLAGS}"
  export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"

  CGO_ENABLED=0 go build -o $pkgname .
}

package() {
  cd "${srcdir}"/${_pkgname}
  install -Dm755 $pkgname "$pkgdir"/usr/bin/$_pkgname
  install -Dm644 "${srcdir}/${_pkgname}"/LICENSE     "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
}