void-packages/srcpkgs/snapper/template
2018-10-22 23:32:07 -03:00

62 lines
1.8 KiB
Bash

# Template file for 'snapper'
pkgname=snapper
version=0.7.2
revision=1
lib32disabled=yes
build_style=gnu-configure
configure_args="--disable-zypp --with-conf=/etc/conf.d"
hostmakedepends="automake docbook-xsl libtool libxml2-devel libxslt pkg-config"
makedepends="acl-devel boost-devel dbus-devel e2fsprogs-devel libbtrfs-devel
libmount-devel libxml2-devel pam-devel"
conf_files="/etc/conf.d/snapper"
make_dirs="/etc/snapper/configs 0755 root root"
short_desc="Tool for Linux filesystem snapshot management"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="GPL-2.0-only"
homepage="http://snapper.io"
distfiles="https://github.com/openSUSE/snapper/archive/v${version}.tar.gz"
checksum=005a848282a40dc1b85dbf6294a3b81aa4fd08ea2e17b294ee40374ceb14f8f7
case "$XBPS_TARGET_MACHINE" in
*-musl) # We define MUSL_LIBC to pick the correct return type
# for strerror_r(2) which is int (XSI-compliant)
CXXFLAGS="-DMUSL_LIBC=1"
esac
pre_configure() {
# rename cron scripts
sed -i -e 's@suse.de-@@g' scripts/Makefile.am
# fix config location in cron scripts
sed -i -e 's@/etc/sysconfig/@/etc/conf.d/@g' scripts/snapper-{daily,hourly}
sed -i -e 's@lboost_thread-mt@lboost_thread@g' snapper/Makefile.am
sed -i -e 's@lboost_system-mt@lboost_system@g' snapper/Makefile.am
# fix pam plugin install location
sed -i -e 's@shell echo /@shell echo /usr/@g' pam/Makefile.am
autoreconf -fi
}
post_install() {
vinstall data/sysconfig.snapper 644 etc/conf.d snapper
vsv snapperd
rm -rf -- "${DESTDIR}"/usr/lib/systemd
}
libsnapper_package() {
short_desc+=" - runtime library"
pkg_install() {
vmove "usr/lib/*.so.*"
}
}
snapper-devel_package() {
short_desc+=" - development files"
depends="libsnapper>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
}
}