diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..eb7da78f1463 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,31 @@ +pkgname=turengo +pkgver=1.0.0 +pkgrel=1 +pkgdesc='CLI tool for turengo.com' +arch=('x86_64') +url="https://github.com/mesuutt/$pkgname" +license=('MIT') +makedepends=('go') +source=("$url/archive/refs/tags/v$pkgver.tar.gz") +sha256sums=('b4e876e2de19131320d947db30815ec50b2911a79fe3c7777734761ad4edf868') + +prepare(){ + cd "$pkgname-$pkgver" + mkdir -p build/ +} + +build() { + cd "$pkgname-$pkgver" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" + go build -o build +} + +package() { + cd "$pkgname-$pkgver" + install -Dm755 build/$pkgname "$pkgdir"/usr/bin/$pkgname + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} |