summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Ramsden2019-06-05 00:00:46 -0700
committerJohn Ramsden2019-10-12 23:21:52 -0700
commit664070b6574c2a560dd14e03992feee510f30220 (patch)
treef9b22ce0e5e8d63ede05ea87e91a1ab92198ec89
downloadaur-664070b6574c2a560dd14e03992feee510f30220.tar.gz
Create initial package
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD36
3 files changed, 55 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..2f3343a61e73
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = zrepl
+ pkgdesc = One-stop ZFS backup & replication solution
+ pkgver = 0.2.0
+ pkgrel = 1
+ url = https://zrepl.github.io/
+ arch = x86_64
+ license = MIT
+ depends = go-pie
+ depends = dep
+ provides = zrepl
+ conflicts = zrepl-bin
+ source = https://github.com/zrepl/zrepl/archive/v0.2.0.tar.gz
+ sha256sums = 40ceb559059b43e96f61303a43ca0fac80b26f8281a07aa03e235658a6548891
+
+pkgname = zrepl
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..4e9c4d01c420
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+*
+!/PKGBUILD
+!/.SRCINFO
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..0a870b28d9fd
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: John Ramsden <johnramsden [at] riseup [dot] net>
+
+pkgname=zrepl
+pkgver=0.2.0
+pkgrel=1
+pkgdesc='One-stop ZFS backup & replication solution'
+arch=('x86_64')
+url='https://zrepl.github.io/'
+license=('MIT')
+provides=('zrepl')
+conflicts=('zrepl-bin')
+depends=('go-pie')
+source=("https://github.com/${pkgname}/${pkgname}/archive/v${pkgver}.tar.gz")
+sha256sums=('40ceb559059b43e96f61303a43ca0fac80b26f8281a07aa03e235658a6548891')
+
+build() {
+ cd "${pkgname}-${pkgver}"
+ go build \
+ -trimpath \
+ -ldflags "-extldflags ${LDFLAGS}" \
+ -o "${pkgname}" .
+}
+
+package() {
+ cd "${pkgname}-${pkgver}"
+ install -Dm755 "${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
+ install -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -d "${pkgdir}/usr/share/${pkgname}"
+ install -d "${pkgdir}/usr/lib/systemd/system"
+
+ install -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -m644 "dist/systemd/${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
+ cp -r "config/samples" "${pkgdir}/usr/share/${pkgname}/samples"
+
+ sed -i s:/usr/local/bin/:/usr/bin/:g "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
+}