summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD33
1 files changed, 33 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..c95d7b1a3c6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,33 @@
+# Maintainer: Christian Muehlhaeuser <muesli at gmail dot com>
+
+pkgname=knoxite-git
+pkgver=r551.bfdf2fa
+pkgrel=1
+pkgdesc="A data storage & backup system"
+arch=('x86_64')
+url="https://github.com/knoxite/knoxite"
+license=('MIT')
+makedepends=('go' 'git')
+provides=("knoxite")
+conflicts=("knoxite")
+source=($pkgname::git://github.com/knoxite/knoxite.git)
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/$pkgname"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd "$srcdir"/$pkgname/cmd/knoxite
+ go build \
+ -trimpath \
+ -ldflags "-X main.Version=$pkgver -extldflags $LDFLAGS" \
+ -o "knoxite" .
+}
+
+package() {
+ cd "$srcdir"/$pkgname
+ install -Dm755 "cmd/knoxite/knoxite" "$pkgdir/usr/bin/knoxite"
+ install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}