aboutsummaryrefslogtreecommitdiffstats
path: root/testing/snapper/APKBUILD
blob: fed70a291753a7fcb13fb95098a26c72c173cb76 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=snapper
pkgver=0.8.3
pkgrel=0
pkgdesc="Manage filesystem snapshots and allow undo of system modifications"
url="https://snapper.io"
arch="all !armhf !armv7"  # armhf: fails to build
license="GPL-2.0"
# 3 tests are failing
options="!check"
depends="dbus"
makedepends="automake autoconf libtool bash
	btrfs-progs-dev e2fsprogs-dev dbus-dev acl-dev
	lvm2-dev libxml2-dev boost-dev bsd-compat-headers
	boost-thread gettext-dev libxslt docbook-xsl"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
source="$pkgname-$pkgver.tar.gz::https://github.com/openSUSE/snapper/archive/v$pkgver.tar.gz
	musl-posix.patch
	musl-mode_t.patch
	musl-mktime.patch
	musl-stdout_stderr.patch
	musl-_nl_msg_cat_cntr.patch
	musl-__isleap.patch
	musl-types.patch
	remove-systemd.patch
	fix-poll_h.patch
	regex.patch"

builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	default_prepare
	autoreconf -fi
	# rename cron scripts
	sed -i -e 's@suse.de-@@g' scripts/Makefile.am
	# copy cron scripts to /etc/periodic/* instead of /etc/cron.*
	sed -i -e 's/cron\./periodic\//g' scripts/Makefile.am
	# fix config location in cron scripts
	sed -i -e 's@/etc/sysconfig/@/etc/conf.d/@g' scripts/snapper-daily
	sed -i -e 's@/etc/sysconfig/@/etc/conf.d/@g' scripts/snapper-hourly
}

build() {
	cd "$builddir"
	export LDFLAGS="$LDFLAGS -lintl"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sbindir=/usr/sbin \
		--disable-silent-rules \
		--with-conf=/etc/conf.d \
		--disable-pam \
		--disable-zypp \
		--disable-ext4
	make
}

check() {
	cd "$builddir"
	make check
}

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

	install -Dm644 data/sysconfig.snapper "$pkgdir"/etc/conf.d/$pkgname
}

sha512sums="60d82854a323d4a872344a147efca7344a1bbcd9f9c5e607d037f335472f83070d7d4662c53b0fbcbaedea1bf008b63226beec7318a85b7b7343eff7009f34af  snapper-0.8.3.tar.gz
a9eec8105e94c4eb097aa293754b0de45420a297ad845933a7be66b3ff49af409dd427e9bd1de569c49982c619211d1e90183ed8bf8550acb0fa9d83176e22bf  musl-posix.patch
ddcd279f77007fe905df27b904dc84c8c2eebf0cf42c9f992fdc992e2912ddaab59712c13a798243c4f81727c04ef8e0993773686ab0c682e41726a2bcad962b  musl-mode_t.patch
f2581e1b5f05a43daea77b27b0c383d4f201bffb485ef1af9e6fcbe26e8dfa44bab36c23ca2d8ea7963fba0c3507d014bdbf1bc0c582c790b9e627fc97b62820  musl-mktime.patch
ed393b476a679ebc8f130e34826958a30aa98dc7ac77c0c324a486cc3ed8539584552a305e2ddcb810626c6ab3478e634c77762395e2560abc935cd18e882beb  musl-stdout_stderr.patch
d5305df362df7db3b882cb491d32d11f479d1d56b21a39bc5e0cbdf7cdf70341eb566e7374bb9acc6d4fa1db027d4f009857fed21ef48ed311efaaa1be7b6329  musl-_nl_msg_cat_cntr.patch
8278c469def65e58cb2aee039882d1d237b4b404386472f9540da11a1d3cddd60dda08a99074f9f418b328ce2c4ac73d3190a74a6fe3e00eab9adb4fed87a4ec  musl-__isleap.patch
8bc2b42bbee927ce88f77e71a9594da3b6e54e92008e5603c6d8db35b3ec37add456bcc52d7d6a913c69a395c73bd3f6a3934ea549d4cc0097cb65613f61ed48  musl-types.patch
61401ac8e91b838231e018490af61e7fe8c954750eaff4a9ff4e435aea78531cfa2882e354cb088a3a43951d869bdf7c516969a437195362f700e655878bcd71  remove-systemd.patch
2730b5d3d627e5d6140df1509a4676e4a8429f73a12804b88f0ef7dab46097f35ac209f3456bb0094a09843ebb810887a6392c3a6a308d27f43f2ea9621e586d  fix-poll_h.patch
6f70b20b1fdc4e935deaef9bc8978068041732e5296d0c9924cbd09f1b3bd0a46e4579f6b3542d7e1f17081dd88960cad7d19e56420f8d91ba906fa1f19f4842  regex.patch"