summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD20
-rw-r--r--sanoid.service6
-rw-r--r--sanoid.timer9
4 files changed, 37 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a900c5dfbe7..e239d8649de 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,7 @@
-# Generated by mksrcinfo v8
-# Mon Jul 17 16:01:46 UTC 2017
pkgbase = sanoid
pkgdesc = Sanoid is a policy-driven snapshot management tool for ZFS filesystems.
pkgver = 1.4.14
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/jimsalterjrs/sanoid
arch = any
license = GPL
@@ -16,7 +14,11 @@ pkgbase = sanoid
conflicts = sanoid-git
backup = etc/sanoid/sanoid.conf
source = sanoid-1.4.14.tar.gz::https://github.com/jimsalterjrs/sanoid/archive/v1.4.14.tar.gz
+ source = sanoid.service
+ source = sanoid.timer
sha256sums = 7425e54622f7f270d9a5c3ac4e814e20d2df5307b5e032feb4a6d023a659d516
+ sha256sums = a1f53363c2814a797ed4b19533b31db87e36bf9ffd41487c036570e80f498f76
+ sha256sums = 69f216772f852e2f7ed90633799d2ad8fa04cb0166c2e54eddcf6654047a4beb
pkgname = sanoid
diff --git a/PKGBUILD b/PKGBUILD
index f953e3cb03f..27a485954ca 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=sanoid
pkgver=1.4.14
-pkgrel=1
+pkgrel=2
pkgdesc="Sanoid is a policy-driven snapshot management tool for ZFS filesystems."
arch=('any')
url='https://github.com/jimsalterjrs/sanoid'
@@ -14,17 +14,31 @@ optdepends=('pv: progress bars'
'mbuffer: stream buffering')
conflicts=('sanoid-git')
provides=('sanoid')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/jimsalterjrs/sanoid/archive/v$pkgver.tar.gz")
+source=("$pkgname-$pkgver.tar.gz::https://github.com/jimsalterjrs/sanoid/archive/v$pkgver.tar.gz"
+ 'sanoid.service'
+ 'sanoid.timer')
-sha256sums=('7425e54622f7f270d9a5c3ac4e814e20d2df5307b5e032feb4a6d023a659d516')
+sha256sums=('7425e54622f7f270d9a5c3ac4e814e20d2df5307b5e032feb4a6d023a659d516'
+ 'a1f53363c2814a797ed4b19533b31db87e36bf9ffd41487c036570e80f498f76'
+ '69f216772f852e2f7ed90633799d2ad8fa04cb0166c2e54eddcf6654047a4beb')
package() {
cd "${pkgname}-${pkgver}"
+
+ # Documents
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/sanoid/LICENSE"
install -Dm644 README.md "${pkgdir}/usr/share/doc/sanoid/LICENSE"
+
+ # Configs
install -Dm644 sanoid.conf "${pkgdir}/etc/sanoid/sanoid.conf"
install -Dm644 sanoid.defaults.conf "${pkgdir}/etc/sanoid/sanoid.defaults.conf"
+
+ # Binaries
install -Dm755 sanoid "${pkgdir}/usr/bin/sanoid"
install -Dm755 syncoid "${pkgdir}/usr/bin/syncoid"
install -Dm755 findoid "${pkgdir}/usr/bin/findoid"
+
+ # systemd
+ install -D -m 644 "${srcdir}/sanoid.timer" "${pkgdir}/usr/lib/systemd/system/sanoid.timer"
+ install -D -m 644 "${srcdir}/sanoid.service" "${pkgdir}/usr/lib/systemd/system/sanoid.service"
}
diff --git a/sanoid.service b/sanoid.service
new file mode 100644
index 00000000000..7395501e5f4
--- /dev/null
+++ b/sanoid.service
@@ -0,0 +1,6 @@
+[Unit]
+Description=Sanoid
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/sanoid --cron --verbose
diff --git a/sanoid.timer b/sanoid.timer
new file mode 100644
index 00000000000..5a601da6e41
--- /dev/null
+++ b/sanoid.timer
@@ -0,0 +1,9 @@
+[Unit]
+Description=Sanoid timer
+
+[Timer]
+OnBootSec=0min
+OnCalendar=*:0/1
+
+[Install]
+WantedBy=timers.target