# Maintainer: David P. # Maintainer (Artix): artoo pkgbase=elogind pkgname=('elogind' 'libelogind') pkgver=246.10 pkgrel=7 pkgdesc="The systemd project's logind, extracted to a standalone package" arch=('x86_64') arch+=('i686' 'armv7h') url="https://github.com/elogind/elogind" license=('GPL' 'LGPL2.1') makedepends=('acl' 'intltool' 'libtool' 'gperf' 'gtk-doc' 'polkit' 'dbus' 'libseccomp' 'meson' 'kexec-tools' 'openrc' 'libcap') options=('!libtool') source=("${pkgbase}-${pkgver}.tar.gz::https://github.com/elogind/elogind/archive/v${pkgver}.tar.gz" dbus-exit.patch::https://github.com/pierre-labastie/elogind/commit/04d76bc0f087640bedc6ee52525529ccfdc6ae78.patch fix-p-opt.patch::https://github.com/njhanley/elogind/commit/850797eaf482d7f1ada051730eeeca53676ca43e.patch) sha256sums=('c490dc158c8f5bca8d00ecfcc7ad5af24d1c7b9e59990a0b3b1323996221a922' 'cccbbe6bf6603d81c307ad670994fe058ff630b37c218041c4ca877ef0486843' '5d39f9d9edd6fb0e9e93bae004ca47bb0973c7570c8dd840f98cda3348bddd7f') prepare() { cd ${pkgbase}-${pkgver} patch -Np 1 -i ../dbus-exit.patch patch -Np 1 -i ../fix-p-opt.patch } build() { local meson_options=( -Drootlibdir=/usr/lib -Drootlibexecdir=/usr/lib/elogind -Ddbuspolicydir=/usr/share/dbus-1/system.d -Ddocdir=/usr/share/doc/elogind -Ddefault-hierarchy=hybrid -Dcgroup-controller=openrc -Ddefault-kill-user-processes=false -Dman=true ) arch-meson "$pkgbase-${pkgver}" build "${meson_options[@]}" meson compile -C build } check(){ meson test -C build --print-errorlogs } package_elogind() { pkgdesc="The systemd project's logind, extracted to a standalone package" provides=('logind') depends=('acl' 'dbus' 'libseccomp' 'libelogind' 'kexec-tools' 'udev') optdepends=('polkit: polkit support') backup=('etc/elogind/logind.conf') # systemd compatibility provides+=("systemd=$pkgver") conflicts+=('systemd') DESTDIR="$pkgdir" meson install -C build ln -sfv libelogind.pc "${pkgdir}"/usr/lib/pkgconfig/libsystemd.pc install -dm755 "${srcdir}"/_libelogind mv -v "${pkgdir}"/usr/lib/libelogind*.so* "${srcdir}"/_libelogind install -d "${pkgdir}"/{etc,usr/lib}/elogind/{logind,sleep}.conf.d } package_libelogind(){ pkgdesc="elogind client libraries" provides=('libelogind.so' 'liblogind') depends=('libcap' 'libudev') # libsystemd compatibility provides+=('libsystemd.so' "libsystemd=${pkgver}" "systemd-libs=${pkgver}") conflicts+=('libsystemd.so' 'libsystemd' 'systemd-libs') cd "${pkgbase}-${pkgver}" install -dm755 "${pkgdir}"/usr/lib mv "${srcdir}"/_libelogind/libelogind*.so* "${pkgdir}"/usr/lib #ln -sfv libelogind.so "${pkgdir}"/usr/lib/libsystemd.so ln -sfv libsystemd.so "${pkgdir}"/usr/lib/libsystemd.so.0 # libsystemd compatibility # HACK: (re)install libelogind.so as libsystemd.so so their lib versions match install -m755 "${pkgdir}"/usr/lib/libelogind.so "${pkgdir}"/usr/lib/libsystemd.so }