diff options
author | Mario Finelli | 2021-06-08 19:28:38 -0400 |
---|---|---|
committer | Mario Finelli | 2021-06-08 19:28:38 -0400 |
commit | 994dae525387dd4a203de61247d8d05f03af2637 (patch) | |
tree | cbd9550eefc717a747e876e15c6bb1411cf9592e | |
download | aur-time_warrior.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 42 |
3 files changed, 59 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..8c82aa06fae0 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,13 @@ +pkgbase = time_warrior + pkgdesc = A CLI-based time tracking tool + pkgver = 1.3.2 + pkgrel = 1 + url = https://github.com/mrcook/time_warrior + arch = x86_64 + license = MIT + makedepends = go + depends = glibc + source = https://github.com/mrcook/time_warrior/archive/v1.3.2/time_warrior-1.3.2.tar.gz + sha256sums = a8b80082d62f464edc21f00faa98fa4a917f85e0b0878898a2f87ccddc2e971c + +pkgname = time_warrior diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..f71c635dafda --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +* +!.gitignore +!PKGBUILD +!.SRCINFO diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..393fc6b3b8d7 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,42 @@ +# Maintainer: Mario Finelli <mario at finel dot li> + +pkgname=time_warrior +pkgver=1.3.2 +pkgrel=1 +pkgdesc="A CLI-based time tracking tool" +arch=(x86_64) +url=https://github.com/mrcook/time_warrior +license=(MIT) +depends=(glibc) +makedepends=(go) +source=(https://github.com/mrcook/time_warrior/archive/v$pkgver/$pkgname-$pkgver.tar.gz) +sha256sums=('a8b80082d62f464edc21f00faa98fa4a917f85e0b0878898a2f87ccddc2e971c') + +prepare() { + cd $pkgname-$pkgver + export GOPATH="${srcdir}/gopath" + go mod vendor +} + +build() { + cd $pkgname-$pkgver + + export CGO_LDFLAGS="$LDFLAGS" + export CGO_CFLAGS="$CFLAGS" + export CGO_CPPFLAGS="$CPPFLAGS" + export CGO_CXXFLAGS="$CXXFLAGS" + + export GOPATH="${srcdir}/gopath" + + go build -o tw/tw -trimpath -buildmode=pie -mod=readonly \ + -ldflags "-s -w -linkmode external -extldflags \"${LDFLAGS}\"" tw/main.go +} + +package() { + cd $pkgname-$pkgver + install -Dm0755 tw/tw "$pkgdir/usr/bin/tw" + install -Dm0644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md" + install -Dm0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} + +# vim: set ts=2 sw=2 et: |