void-packages/srcpkgs/polkit-elogind/template

63 lines
1.9 KiB
Bash

# Template file for 'polkit-elogind'
pkgname=polkit-elogind
_pkgname=polkit
version=0.113.0.2018.03.19
revision=2
build_style=gnu-configure
configure_args="$(vopt_enable gir introspection)
--disable-static --with-authfw=pam --with-os-type=void --with-mozjs=mozjs-24.0"
short_desc="Authorization Toolkit"
maintainer="Enno Boland <gottox@voidlinux.eu>"
homepage="http://www.freedesktop.org/wiki/Software/polkit"
license="GPL-2"
#distfiles="${FREEDESKTOP_SITE}/${_pkgname}/releases/${_pkgname}-${version}.tar.gz"
#checksum=e1c095093c654951f78f8618d427faf91cf62abdefed98de40ff65eca6413c81
#wrksrc="${_pkgname}-${version}"
wrksrc=$_pkgname
_hash=29ba7afba1b79a325183a71966f35926dfdf506e
provides="${_pkgname}-${version}_${revision}"
replaces="polkit>=0"
hostmakedepends="automake libtool gettext-devel pkg-config intltool libxslt
docbook-xsl glib-devel gtk-doc gobject-introspection git"
makedepends="libglib-devel expat-devel pam-devel mozjs24-devel elogind-devel"
system_accounts="polkitd"
make_dirs="
/etc/polkit-1/rules.d 0700 polkitd polkitd
/usr/share/polkit-1/rules.d 0700 polkitd polkitd"
# Package build options
build_options="gir"
# Disable gir for cross builds.
if [ -z "$CROSS_BUILD" ]; then
build_options_default+=" gir"
fi
do_fetch() {
git clone https://anongit.freedesktop.org/git/polkit || :
cd $_pkgname
git checkout $_hash
}
pre_configure() {
NOCONFIGURE=1 ./autogen.sh
# 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-24/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
rm -r $DESTDIR/usr/include
rm -r $DESTDIR/usr/lib/pkgconfig
if [ "$build_option_gir" ]; then
rm -r $DESTDIR/usr/share/gir-*
fi
rm -r $DESTDIR/usr/lib/*.so
}