void-packages/srcpkgs/snapper/template
Mek101 c4852a64dd snapper: add dbus dependency.
Snapper requires dbus to work, as reported in #27047.

Fixes: #27047
Closes: #27049 [via git-merge-pr]
2020-12-10 10:33:47 -03:00

64 lines
1.7 KiB
Bash

# Template file for 'snapper'
pkgname=snapper
version=0.8.14
revision=2
build_style=gnu-configure
configure_args="--disable-zypp --with-conf=/etc/conf.d"
conf_files="/etc/conf.d/snapper"
make_dirs="/etc/snapper/configs 0755 root root"
hostmakedepends="automake docbook-xsl libtool libxml2-devel libxslt
gettext pkg-config"
makedepends="acl-devel boost-devel dbus-devel e2fsprogs-devel libbtrfs-devel
libmount-devel libxml2-devel pam-devel"
depends="dbus"
short_desc="Tool for Linux filesystem snapshot management"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-only"
homepage="http://snapper.io"
distfiles="https://github.com/openSUSE/snapper/archive/v${version}.tar.gz"
checksum=d3abe4d542dade06b361e7c89b5de03bb5202853bc5e314ca74080caa24923f6
lib32disabled=yes
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"
# We also link against libintl
makedepends+=" gettext-devel"
LDFLAGS="-lintl"
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}
# 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"
}
}