summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorgenofire2020-09-21 09:44:10 +0200
committergenofire2020-09-21 09:44:10 +0200
commitb4dfe84dbbda4a2ce46d3ff263a266aadede7475 (patch)
tree3f3656aaa28afb9ef70911e7f9ed55ab8e402a38
downloadaur-b4dfe84dbbda4a2ce46d3ff263a266aadede7475.tar.gz
Init
-rw-r--r--.SRCINFO24
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD43
-rw-r--r--zsnapd.install16
4 files changed, 87 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..9293621aaced
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = zsnapd
+ pkgdesc = ZFS Snapshot Daemon
+ pkgver = 0.8.11c
+ pkgrel = 1
+ url = https://github.com/grantma/zsnapd
+ install = zsnapd.install
+ arch = any
+ license = MIT
+ depends = zfs
+ depends = mbuffer
+ depends = python3
+ depends = python-setproctitle
+ depends = python-psutil
+ depends = python-magcode-core
+ optdepends = openssh: transfer snapshots
+ backup = etc/zsnapd/dataset.conf
+ backup = etc/zsnapd/process.conf
+ backup = etc/zsnapd/template.conf
+ backup = etc/zsnapd/zsnapd-rcmd.conf
+ source = https://github.com/genofire/zsnapd/archive/master.zip
+ sha256sums = SKIP
+
+pkgname = zsnapd
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..b83fbe71e087
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+src/
+pkg/
+/*.zip
+/*.pkg.tar*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..46129789ee94
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Kenneth Henderick <kenneth@ketronic.be>
+
+pkgname=zsnapd
+pkgver=0.8.11c
+pkgrel=1
+pkgdesc="ZFS Snapshot Daemon"
+arch=('any')
+url="https://github.com/grantma/zsnapd"
+license=('MIT')
+depends=('zfs' 'mbuffer' 'python3' 'python-setproctitle' 'python-psutil' 'python-magcode-core')
+optdepends=('openssh: transfer snapshots')
+#source=("https://github.com/grantma/$pkgname/archive/v$pkgver.zip")
+#sha256sums=('7aca24e007fc9599ce558d9be9d88e9691515717e4ec50709c99797e160c5bbc')
+source=("https://github.com/genofire/zsnapd/archive/master.zip")
+sha256sums=('SKIP')
+install=$pkgname.install
+
+backup=(
+ etc/zsnapd/dataset.conf
+ etc/zsnapd/process.conf
+ etc/zsnapd/template.conf
+ etc/zsnapd/zsnapd-rcmd.conf
+)
+
+build () {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ python setup.py build
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
+
+ mkdir -p ${pkgdir}/etc/zsnapd
+
+ install -Dm 644 etc/zsnapd/dataset.conf ${pkgdir}/etc/zsnapd/dataset.conf
+ install -Dm 644 etc/zsnapd/process.conf ${pkgdir}/etc/zsnapd/process.conf
+ install -Dm 644 etc/zsnapd/template.conf ${pkgdir}/etc/zsnapd/template.conf
+ install -Dm 644 etc/zsnapd/zsnapd-rcmd.conf ${pkgdir}/etc/zsnapd/zsnapd-rcmd.conf
+
+ mkdir -p ${pkgdir}/usr/lib/systemd/system
+ install -Dm 644 system/zsnapd.service ${pkgdir}/usr/lib/systemd/system/zsnapd.service
+}
diff --git a/zsnapd.install b/zsnapd.install
new file mode 100644
index 000000000000..f1dc1a978a83
--- /dev/null
+++ b/zsnapd.install
@@ -0,0 +1,16 @@
+post_install() {
+ systemctl daemon-reload
+}
+
+post_upgrade() {
+ systemctl daemon-reload
+ systemctl restart zsnapd
+}
+
+pre_remove() {
+ systemctl disable zsnapd
+}
+
+post_remove() {
+ systemctl daemon-reload
+}