77 lines
2.2 KiB
Plaintext
77 lines
2.2 KiB
Plaintext
# Template file for 'polkit'
|
|
pkgname=polkit
|
|
version=0.112
|
|
revision=8
|
|
build_style=gnu-configure
|
|
configure_args="--disable-static --with-authfw=pam --with-os-type=void --with-mozjs=mozjs-17.0"
|
|
short_desc="Authorization Toolkit"
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
homepage="http://www.freedesktop.org/wiki/Software/polkit"
|
|
license="GPL-2"
|
|
distfiles="${FREEDESKTOP_SITE}/${pkgname}/releases/${pkgname}-${version}.tar.gz"
|
|
checksum=d695f43cba4748a822fbe864dd32c4887c5da1c71694a47693ace5e88fcf6af6
|
|
|
|
hostmakedepends="pkg-config intltool libxslt docbook-xsl glib-devel"
|
|
makedepends="libglib-devel expat-devel pam-devel mozjs17-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 systemd"
|
|
# Disable gir for cross builds.
|
|
if [ "$CROSS_BUILD" ]; then
|
|
hostmakedepends+=" automake libtool gettext-devel gtk-doc gobject-introspection"
|
|
else
|
|
build_options_default+=" gir"
|
|
fi
|
|
|
|
if [ "$build_option_gir" ]; then
|
|
configure_args+=" --enable-introspection"
|
|
hostmakedepends+=" gobject-introspection"
|
|
else
|
|
configure_args+=" --disable-introspection"
|
|
fi
|
|
|
|
if [ "$build_option_systemd" ]; then
|
|
configure_args+=" --enable-systemd --enable-libsystemd-login --with-systemdsystemunitdir=/usr/lib/systemd/system"
|
|
makedepends+=" systemd-devel"
|
|
else
|
|
configure_args+=" --disable-systemd --disable-libsystemd-login"
|
|
fi
|
|
|
|
pre_configure() {
|
|
if [ "$CROSS_BUILD" ]; then
|
|
autoreconf -fi
|
|
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,/usr/include/js-17.0,${XBPS_CROSS_BASE}/usr/include/js-17.0," -i src/polkitbackend/Makefile
|
|
fi
|
|
}
|
|
|
|
post_install() {
|
|
vinstall ${FILESDIR}/polkit-1.pam 644 etc/pam.d polkit-1
|
|
if [ "$build_option_systemd" ]; then
|
|
vinstall ${FILESDIR}/polkit.tmpfiles 644 usr/lib/tmpfiles.d polkit.conf
|
|
fi
|
|
}
|
|
|
|
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"
|
|
}
|
|
}
|