```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
76 lines
2.6 KiB
Bash
76 lines
2.6 KiB
Bash
# Template file for 'elogind'
|
|
pkgname=elogind
|
|
reverts="246.10_1"
|
|
version=246.9.2
|
|
revision=3
|
|
build_style=meson
|
|
configure_args="-Dcgroup-controller=elogind -Dhalt-path=/usr/bin/halt
|
|
-Drootlibexecdir=/usr/libexec/elogind -Dreboot-path=/usr/bin/reboot
|
|
-Dkexec-path=/usr/bin/kexec -Ddefault-hierarchy=legacy
|
|
-Ddefault-kill-user-processes=false -Dman=true"
|
|
hostmakedepends="docbook-xsl gettext-devel gperf intltool libxslt m4
|
|
pkg-config shadow glib-devel"
|
|
makedepends="acl-devel eudev-libudev-devel gettext-devel libglib-devel libcap-devel
|
|
libseccomp-devel pam-devel"
|
|
depends="dbus"
|
|
short_desc="Standalone logind fork"
|
|
maintainer="Enno Boland <gottox@voidlinux.org>"
|
|
license="GPL-2.0-or-later, LGPL-2.0-or-later"
|
|
homepage="https://github.com/elogind/elogind"
|
|
distfiles="https://github.com/${pkgname}/${pkgname}/archive/v${version}.tar.gz"
|
|
checksum=dd2fcf22a89a078cad22e633d2f14a4cc9f4a9c8bae25c0e39fc4aec3e273bc9
|
|
conf_files="/etc/elogind/*.conf"
|
|
# tests fail differently due to containerization and kernel features
|
|
make_check=ci-skip
|
|
|
|
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
|
|
configure_args+=" -Dutmp=false"
|
|
fi
|
|
|
|
pre_check() {
|
|
# test-fs-util checks for /etc/machine-id/foo and expects ENOTDIR
|
|
# since /etc/machine-id is expected to be a file.
|
|
# test-id128 tries to get a id generated by dbus-uuidgen from
|
|
# /etc/machine-id, since we don't want to add a checkdependency
|
|
# on dbus we just provide a string generated from dbus-uuidgen
|
|
# for use in all cases.
|
|
echo 'dcb30309cd6c8b7cc20383d85a5c7012' > /etc/machine-id
|
|
|
|
# test-copy searches for /etc/os-release but this file is provided
|
|
# by runit-void, create a dummy file to avoid a dependency on runit-void
|
|
echo 'dummy-file' > /etc/os-release
|
|
}
|
|
|
|
post_check() {
|
|
rm -f /etc/machine-id /etc/os-release
|
|
}
|
|
|
|
post_install() {
|
|
ln -s libelogind.pc $DESTDIR/usr/lib/pkgconfig/libsystemd.pc
|
|
ln -s libelogind.pc $DESTDIR/usr/lib/pkgconfig/libsystemd-logind.pc
|
|
ln -sr $DESTDIR/usr/include/elogind $DESTDIR/usr/include/systemd
|
|
vinstall ./src/systemd/sd-id128.h 644 usr/include
|
|
vinstall ./src/systemd/_sd-common.h 644 usr/include
|
|
vinstall $FILESDIR/elogind.wrapper 755 usr/libexec/elogind
|
|
vmkdir usr/lib/dracut/dracut.conf.d
|
|
echo "install_items+=\" /usr/libexec/elogind/elogind-uaccess-command \"" >> ${DESTDIR}/usr/lib/dracut/dracut.conf.d/elogind.conf
|
|
vsv elogind
|
|
}
|
|
|
|
elogind-devel_package() {
|
|
depends="libelogind-${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove "usr/lib/*.so"
|
|
vmove usr/share/man/man3
|
|
vmove usr/lib/pkgconfig
|
|
}
|
|
}
|
|
|
|
libelogind_package() {
|
|
short_desc+=" - elogind library"
|
|
pkg_install() {
|
|
vmove "usr/lib/libelogind.so.*"
|
|
}
|
|
}
|