aboutsummaryrefslogtreecommitdiffstats
path: root/testing/safekeep
diff options
context:
space:
mode:
authorHenrik Riomar <henrik.riomar@gmail.com>2017-03-01 21:59:25 +0100
committerWilliam Pitcock <nenolod@dereferenced.org>2017-03-02 02:17:23 +0000
commitd3043b5cf20df9ef1c275967c6bc340963dda4cc (patch)
tree6a6fa3d1710e4d1d0ac709c54cf1e7c69fbce8d8 /testing/safekeep
parent513bd5e0e4660ab5fc6ca2e783553752d5512e78 (diff)
downloadaports-d3043b5cf20df9ef1c275967c6bc340963dda4cc.tar.bz2
aports-d3043b5cf20df9ef1c275967c6bc340963dda4cc.tar.xz
testing/safekeep: new aport
Diffstat (limited to 'testing/safekeep')
-rw-r--r--testing/safekeep/APKBUILD50
-rw-r--r--testing/safekeep/safekeep-server.post-install6
2 files changed, 56 insertions, 0 deletions
diff --git a/testing/safekeep/APKBUILD b/testing/safekeep/APKBUILD
new file mode 100644
index 0000000000..a81c0edc5a
--- /dev/null
+++ b/testing/safekeep/APKBUILD
@@ -0,0 +1,50 @@
+# Contributor: Henrik Riomar <henrik.riomar@gmail.com>
+# Maintainer: Henrik Riomar <henrik.riomar@gmail.com>
+pkgname=safekeep
+pkgver=1.4.4
+pkgrel=0
+pkgdesc="SafeKeep backup system"
+url="https://github.com/dimipaun/safekeep"
+arch="noarch"
+license="GPL2"
+depends="openssh-client python2 rdiff-backup util-linux"
+makedepends="asciidoc libxml2-utils xmlto"
+install="$pkgname-server.post-install"
+subpackages="$pkgname-doc $pkgname-client $pkgname-server"
+source="$pkgname-$pkgver.tar.gz::https://github.com/dimipaun/$pkgname/archive/$pkgver.tar.gz"
+builddir="$srcdir/$pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+ make man || return 1
+ # ionice from util-linux is in /usr/bin (busybox in /bin)
+ sed -i 's|PATH=/sbin:/bin:/usr/sbin:/usr/bin|PATH=/sbin:/usr/sbin:/usr/bin:/bin|' safekeep.cron || return 1
+}
+
+check() {
+ cd "$builddir"
+ PATH="$PATH:." make check || return 1
+}
+
+client() {
+ pkgdesc="SafeKeep backup system - client"
+ depends="$pkgname"
+ mkdir -p "$subpkgdir"
+ # just a meta package
+}
+
+server() {
+ pkgdesc="SafeKeep backup system - server"
+ depends="$pkgname"
+ mkdir -p "$subpkgdir"
+ mv "$pkgdir"/etc "$subpkgdir"/etc || return 1
+ mkdir "$subpkgdir"/etc/periodic || return 1
+ mv "$subpkgdir"/etc/cron.daily "$subpkgdir"/etc/periodic/daily || return 1
+}
+
+package() {
+ cd "$builddir"
+ make install DESTDIR="$pkgdir" || return 1
+}
+
+sha512sums="2afdf6784ef2033032978554bc4b8703be86b5dde92795f1b7efe0099fc4cd35d215bc390e9b9ee3b3e396435ab1168a81dad1c7051861fb584a31749e63c68d safekeep-1.4.4.tar.gz"
diff --git a/testing/safekeep/safekeep-server.post-install b/testing/safekeep/safekeep-server.post-install
new file mode 100644
index 0000000000..5a208c4aad
--- /dev/null
+++ b/testing/safekeep/safekeep-server.post-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+adduser -S -h /var/lib/safekeep safekeep
+install -d -m 0700 -o safekeep -g nogroup /var/lib/safekeep/.ssh
+
+exit 0