systemd-libs-systemd/PKGBUILD

139 lines
4.0 KiB
Bash

# Maintainer: Christian Hesse <mail@eworm.de>
# Maintainer: Dave Reisner <dreisner@archlinux.org>
# Maintainer: Tom Gundersen <teg@jklm.no>
# Stripped by fbt@fleshless.org to only provide the libs.
pkgbase=systemd
pkgname=('systemd-libs-systemd' 'systemd-libs-udev')
# Can be from either systemd or systemd-stable
_commit='a09c170122cf3b37c3e4431bf082f9dbdc07fc70'
pkgver=242.29
pkgrel=1
arch=('x86_64')
url='https://www.github.com/systemd/systemd'
makedepends=('acl' 'cryptsetup' 'docbook-xsl' 'gperf' 'lz4' 'xz' 'pam' 'libelf'
'intltool' 'iptables' 'kmod' 'libcap' 'libidn2' 'libgcrypt'
'libmicrohttpd' 'libxslt' 'util-linux' 'linux-api-headers'
'python-lxml' 'quota-tools' 'shadow' 'gnu-efi-libs' 'git'
'meson' 'libseccomp' 'pcre2' 'audit' 'kexec-tools' 'libxkbcommon'
'bash-completion')
options=('strip')
validpgpkeys=('63CDA1E5D3FC22B998D20DD6327F26951A015CC4' # Lennart Poettering <lennart@poettering.net>
'5C251B5FC54EB2F80F407AAAC54CA336CFEB557E') # Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
source=(# fragment is latest tag for source verification, final merge in prepare()
"git+https://github.com/systemd/systemd-stable#tag=v${pkgver%.*}?signed"
"git+https://github.com/systemd/systemd#tag=v${pkgver%.*}?signed"
'0001-Use-Arch-Linux-device-access-groups.patch')
_backports=(
)
_reverts=(
)
prepare() {
cd "$pkgbase-stable"
# add upstream repository for cherry-picking
git remote add -f upstream ../systemd
# merge the latest stable commit (fast-foward only to make sure
# the verified tag is in)
git merge --ff-only "${_commit}"
local _c
for _c in "${_backports[@]}"; do
git cherry-pick -n "${_c}"
done
for _c in "${_reverts[@]}"; do
git revert -n "${_c}"
done
# Replace cdrom/dialout/tape groups with optical/uucp/storage
patch -Np1 -i ../0001-Use-Arch-Linux-device-access-groups.patch
}
pkgver() {
cd "systemd-stable"
local _version _count
_version="$(git describe --abbrev=0 --tags)"
_count="$(git rev-list --count ${_version}..)"
printf '%s.%s' "${_version#v}" "${_count}"
}
build() {
local _timeservers=({0..3}.arch.pool.ntp.org)
local _nameservers=(
# We use these public name services, ordered by their
# privacy policy (hopefully):
# * Cloudflare (https://1.1.1.1/)
# * Quad9 without filtering (https://www.quad9.net/)
# * Google (https://developers.google.com/speed/public-dns/)
1.1.1.1
9.9.9.10
8.8.8.8
2606:4700:4700::1111
2620:fe::10
2001:4860:4860::8888
)
local _meson_options=(
-Dversion-tag="${pkgver}-${pkgrel}-arch"
-Dgnu-efi=true
-Dima=false
-Dlibidn2=true
-Dlz4=true
-Ddbuspolicydir=/usr/share/dbus-1/system.d
-Ddefault-hierarchy=hybrid
-Ddefault-locale=C
-Ddefault-kill-user-processes=false
-Dfallback-hostname='archlinux'
-Dntp-servers="${_timeservers[*]}"
-Ddns-servers="${_nameservers[*]}"
-Drpmmacrosdir=no
-Dsysvinit-path=
-Dsysvrcnd-path=
)
arch-meson "systemd-stable" build "${_meson_options[@]}"
ninja -C build
}
#check() {
# meson test -C build
#}
package_systemd-libs-systemd() {
pkgdesc='systemd client libraries'
depends=('glibc' 'libcap' 'libgcrypt' 'lz4' 'xz')
license=('LGPL2.1')
provides=('libsystemd' 'libsystemd.so' 'systemd-libs')
conflicts=('libsystemd' 'systemd-libs' 'libsystemd-standalone')
replaces=('libsystemd' 'libsystemd-standalone')
DESTDIR="$srcdir/full-install" meson install -C build
# runtime libraries shipped with systemd-libs
install -d -m0755 "$pkgdir"/usr/lib
mv "$srcdir/full-install/usr/lib/"lib{nss,systemd}*.so* "$pkgdir/usr/lib/"
}
package_systemd-libs-udev() {
pkgdesc="udev client libraries"
depends=('glibc' 'libcap' 'libgcrypt' 'lz4' 'xz')
license=('LGPL2.1')
provides=('libudev' 'libudev.so')
# udev libs
install -d -m0755 "$pkgdir"/usr/lib
cp --archive "$srcdir/full-install/usr/lib/"libudev* "$pkgdir/usr/lib/"
}
# vim:ft=sh syn=sh et sw=2:
sha1sums=('SKIP'
'SKIP'
'35da29351a3aae0d30579e271adb14a1ae23a9c4')