void-packages/srcpkgs/polkit/template
Jürgen Buchmüller f7107d38eb cross gir: hook to fix wrong cross install path
When cross building the gir files (*.gir, *.typelib) are installed
at ${DESTDIR}/usr/${XBPS_CROROSS_TRIPLET}/usr/* while they need to
be at ${DESTDIR}/usr/*
This hook is a temporary workaround until we can fix the cross gir
install to not insert the (as it seems) host's ${DESTDIR} into the
target's destination path.

Remove the temporary hack in polkit which is now handled by the hook.
2019-04-28 14:37:40 +02:00

57 lines
1.7 KiB
Bash

# Template file for 'polkit'
pkgname=polkit
version=0.115
revision=5
build_style=gnu-configure
build_helper="gir"
configure_args="$(vopt_enable gir introspection) --disable-systemd
--disable-libsystemd-login --disable-libelogind --disable-static
--with-authfw=pam --with-os-type=void --with-mozjs=mozjs-52.0"
make_dirs="
/etc/polkit-1/rules.d 0700 polkitd polkitd
/usr/share/polkit-1/rules.d 0700 polkitd polkitd"
hostmakedepends="autoconf-archive automake gettext-devel git glib-devel
gobject-introspection gtk-doc intltool libtool pkg-config"
makedepends="mozjs52-devel pam-devel"
short_desc="Authorization Toolkit"
maintainer="Rasmus Thomsen <rasmus.thomsen@protonmail.com>"
license="GPL-2.0-or-later"
homepage="https://www.freedesktop.org/wiki/Software/polkit"
distfiles="${FREEDESKTOP_SITE}/${pkgname}/releases/${pkgname}-${version}.tar.gz"
checksum=2f87ecdabfbd415c6306673ceadc59846f059b18ef2fce42bac63fe283f12131
system_accounts="polkitd"
# Package build options
build_options="gir"
build_options_default="gir"
pre_configure() {
autoreconf -fi
# Drop requirement of /sys/fs/cgroup/systemd test in configure... WTF.
sed -e 's,/sys/fs/cgroup/systemd/,/sys/fs/cgroup,g' -i configure
}
post_configure() {
if [ "$CROSS_BUILD" ]; then
sed -e "s#-include \(/usr/include/mozjs-52/js/RequiredDefines\.h\)#-include ${XBPS_CROSS_BASE}\1#" \
-i $(find -name Makefile)
fi
}
post_install() {
vinstall ${FILESDIR}/polkit-1.pam 644 etc/pam.d polkit-1
vsv polkitd
}
polkit-devel_package() {
depends="libglib-devel polkit>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
if [ "$build_option_gir" ]; then
vmove "usr/share/gir-*"
fi
vmove "usr/lib/*.so"
}
}