aboutsummaryrefslogtreecommitdiffstats
path: root/testing/etckeeper/APKBUILD
blob: 831233e16a1a2427b055eb86759679118249985c (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
# Contributor: Henrik Riomar <henrik.riomar@gmail.com>

pkgname=etckeeper
pkgver=1.18.6
pkgrel=1
pkgdesc="Store /etc in git."
url="https://github.com/joeyh/etckeeper"
arch="noarch"
license="GPL2"
depends="findutils git perl"
subpackages="$pkgname-doc"
install="$pkgname.post-install $pkgname.pre-deinstall"
source="$pkgname-$pkgver.tar.gz::https://git.joeyh.name/index.cgi/$pkgname.git/snapshot/$pkgname-$pkgver.tar.gz
	apk-commit_hook
	$pkgname.post-install
	$pkgname.pre-deinstall
	"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd "$builddir"
	sed -i 's|^PYTHON=python$|PYTHON=/bin/false|' Makefile || return 1
	sed -i 's/_PACKAGE_MANAGER=.*/_PACKAGE_MANAGER=apk/' "$builddir"/etckeeper.conf || return 1
}

package() {
	cd "$builddir"
	make install DESTDIR="$pkgdir" || return 1
	rm -rf "$pkgdir"/lib/systemd || return 1
	rmdir "$pkgdir"/lib/ || return 1
	rm -rf "$pkgdir"/etc/apt || return 1

	install -m755 -D "$builddir"/debian/cron.daily \
		"$pkgdir"/etc/periodic/daily/"$pkgname" || return 1

	install -m755 -D "$srcdir"/apk-commit_hook \
		"$pkgdir"/etc/apk/commit_hooks.d/"$pkgname"|| return 1
}

sha512sums="a5a3a4677f31cf1d010ab40ed37ce602c71c2e8ebf2273bf8be6dc8209f603ae0fc6a2c0d5d60d9a9d9aa4f3e7b7c0037534890cbc67b38132e5f654abcda04c  etckeeper-1.18.6.tar.gz
2b1a29d31b6e7cf4ddb05de9b5e088b5747c2abfb2d63f9bddd25f4b7dc8503d457df7fd644afe5bd6fea6a5285a111a47c0489d24378b483c1e026cc11c6bf7  apk-commit_hook
6662bcc15aa9815578442e175c2edaf76f4eba4e73caa739887df9182c2cf6c640709d392087c2c28a8efca5c8fd9369cad4ad1e1c84fa5ccbf52af2bd1751fb  etckeeper.post-install
5a49895ac126150f2939486c4a736339847cc79bee8bb84797a063c924aa643d2b1a8721c91e1fb7107947e817fe4c19f3c55f1d22b29a566daf668bbbb77dc6  etckeeper.pre-deinstall"