aboutsummaryrefslogtreecommitdiffstats
path: root/community/safekeep/APKBUILD
blob: d080437bb9f898605e4c76218d67a4655580c01b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Contributor: Henrik Riomar <henrik.riomar@gmail.com>
# Maintainer: Henrik Riomar <henrik.riomar@gmail.com>
pkgname=safekeep
pkgver=1.5.0
pkgrel=0
pkgdesc="SafeKeep backup system"
url="https://github.com/dimipaun/safekeep"
arch="noarch"
license="GPL-2.0-or-later"
depends="openssh-client python3 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
	# 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
}

check() {
	cd "$builddir"
	PATH="$PATH:." make check
}

client() {
	pkgdesc="SafeKeep backup system - client"
	depends="$pkgname=$pkgver-r$pkgrel"

	mkdir -p "$subpkgdir"
	# just a meta package
}

server() {
	pkgdesc="SafeKeep backup system - server"
	depends="$pkgname=$pkgver-r$pkgrel"

	mkdir -p "$subpkgdir"
	mv "$pkgdir"/etc "$subpkgdir"/etc
	mkdir "$subpkgdir"/etc/periodic
	mv "$subpkgdir"/etc/cron.daily "$subpkgdir"/etc/periodic/daily
}

package() {
	cd "$builddir"
	make install DESTDIR="$pkgdir"
}

sha512sums="f08c0880ea10bab81dedb8e5601e089344e9a5655a57f0f78d940483bed42c039e62514922c05714a296214d0e7f943cb8da476ee57efc1f7095715af70b3a91  safekeep-1.5.0.tar.gz"