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

pkgname=etckeeper
pkgver=1.18.6
pkgrel=3
pkgdesc="Store /etc in git."
url="http://etckeeper.branchable.com"
arch="noarch"
license="GPL2"
depends="findutils git perl"
subpackages="$pkgname-doc"
options="!check"
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
	0001-30store-metadata-fix-bug-when-listfile-is-empty.patch
	"
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
5db81313cf103c63560726c88ff68575206fb9df3b60050c93b9c4be6033630fac60626a36dbd6ae15eb458e967d07b83b21b3b891149081ff82f62d13c86063  0001-30store-metadata-fix-bug-when-listfile-is-empty.patch"