summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD38
2 files changed, 55 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b1c5ae314f36
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = ctree-git
+ pkgdesc = A Christmas tree right from your terminal (git)
+ pkgver = 1.0.0.r0.g68cc90e
+ pkgrel = 1
+ url = https://github.com/Matt-Gleich/ctree
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = go
+ depends = glibc
+ provides = ctree
+ conflicts = ctree
+ source = git+https://github.com/Matt-Gleich/ctree
+ sha256sums = SKIP
+
+pkgname = ctree-git
+
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"
+}