diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..55bc468c7038 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: orhun <orhunparmaksiz@gmail.com> +# https://github.com/orhun/pkgbuilds + +pkgname=ctree-git +pkgver=1.0.0.r0.g68cc90e +pkgrel=1 +pkgdesc="A Christmas tree right from your terminal (git)" +arch=('x86_64') +url="https://github.com/Matt-Gleich/ctree" +license=('MIT') +depends=('glibc') +makedepends=('git' 'go') +conflicts=("${pkgname%-git}") +provides=("${pkgname%-git}") +source=("git+$url") +sha256sums=('SKIP') + +pkgver() { + cd "${pkgname%-git}" + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd "${pkgname%-git}" + 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 "${pkgname%-git}" . +} + +package() { + cd "${pkgname%-git}" + install -Dm 755 "${pkgname%-git}" -t "$pkgdir/usr/bin" + install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname" + install -Dm 644 LICENSE.md -t "$pkgdir/usr/share/licenses/$pkgname" +} |