mirror of
https://gitdl.cn/https://github.com/chakralinux/lib32.git
synced 2025-02-16 16:20:29 +08:00
146 lines
3.5 KiB
Bash
146 lines
3.5 KiB
Bash
pkgname=lib32-systemd
|
|
_pkgbasename=systemd
|
|
# latest commit on stable branch
|
|
_commit='c58ab03f64890e7db88745a843bd4520e307099b'
|
|
# Bump this to latest major release for signed tag verification,
|
|
# the commit count is handled by pkgver() function.
|
|
pkgver=238.51
|
|
pkgrel=2
|
|
pkgdesc="system and service manager (32-bit)"
|
|
arch=('x86_64')
|
|
url="https://www.github.com/systemd/systemd"
|
|
license=('GPL2' 'LGPL2.1')
|
|
depends=('lib32-gcc-libs' 'lib32-libcap' 'lib32-libgcrypt' 'lib32-xz' "$_pkgbasename=$pkgver")
|
|
makedepends=('gcc-multilib' 'git' 'gperf' 'intltool' 'lib32-acl' 'lib32-bzip2'
|
|
'lib32-curl' 'lib32-libdbus' 'lib32-gcc-libs' 'lib32-glib2'
|
|
'lib32-gnutls' 'lib32-libelf' 'lib32-libidn' 'lib32-pcre2'
|
|
'libxslt' 'meson')
|
|
options=('strip')
|
|
validpgpkeys=('63CDA1E5D3FC22B998D20DD6327F26951A015CC4' # Lennart Poettering <lennart@poettering.net>
|
|
'5C251B5FC54EB2F80F407AAAC54CA336CFEB557E') # Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
|
|
source=('git+https://github.com/systemd/systemd-stable'
|
|
'git+https://github.com/systemd/systemd')
|
|
sha256sums=('SKIP'
|
|
'SKIP')
|
|
|
|
_backports=(
|
|
)
|
|
|
|
_reverts=(
|
|
)
|
|
|
|
_validate_tag() (
|
|
local success fingerprint trusted status tag=v${pkgver%.*}
|
|
|
|
cd "$srcdir/$_pkgbasename-stable"
|
|
parse_gpg_statusfile /dev/stdin < <(git verify-tag --raw "$tag" 2>&1)
|
|
|
|
if (( ! success )); then
|
|
error 'failed to validate tag %s\n' "$tag"
|
|
return 1
|
|
fi
|
|
|
|
if ! in_array "$fingerprint" "${validpgpkeys[@]}" && (( ! trusted )); then
|
|
error 'unknown or untrusted public key: %s\n' "$fingerprint"
|
|
return 1
|
|
fi
|
|
|
|
case $status in
|
|
'expired')
|
|
warning 'the signature has expired'
|
|
;;
|
|
'expiredkey')
|
|
warning 'the key has expired'
|
|
;;
|
|
esac
|
|
|
|
return 0
|
|
)
|
|
|
|
prepare() {
|
|
cd "$_pkgbasename-stable"
|
|
|
|
git remote rm upstream || true
|
|
git remote add -f upstream ../systemd
|
|
git checkout "$_commit"
|
|
|
|
local c
|
|
for c in "${_backports[@]}"; do
|
|
git cherry-pick -n "$c"
|
|
done
|
|
for c in "${_reverts[@]}"; do
|
|
git revert -n "$c"
|
|
done
|
|
}
|
|
|
|
pkgver() {
|
|
local version count
|
|
|
|
cd "$_pkgbasename-stable"
|
|
|
|
git checkout "$_commit"
|
|
|
|
version="$(git describe --abbrev=0 --tags)"
|
|
count="$(git rev-list --count ${version}..)"
|
|
printf '%s.%s' "${version#v}" "${count}"
|
|
}
|
|
|
|
build() {
|
|
_validate_tag || return
|
|
|
|
export CC="gcc -m32"
|
|
export CXX="g++ -m32"
|
|
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
|
|
|
|
local timeservers=({0..3}.chakra.pool.ntp.org)
|
|
|
|
local meson_options=(
|
|
--libexecdir /usr/lib32
|
|
--libdir /usr/lib32
|
|
|
|
-Daudit=false
|
|
-Dgnuefi=false
|
|
-Dima=false
|
|
-Dlz4=false
|
|
-Dblkid=false
|
|
-Dkmod=false
|
|
-Dlibcryptsetup=false
|
|
-Dlibiptc=false
|
|
-Dmanpages=false
|
|
-Dnetworkd=false
|
|
-Dpam=false
|
|
-Dpython=false
|
|
-Dseccomp=false
|
|
-Dman=false
|
|
-Dhtml=false
|
|
-Dmicrohttpd=false
|
|
-Dqrencode=false
|
|
-Dxkbcommon=false
|
|
|
|
-Ddbuspolicydir=/usr/share/dbus-1/system.d
|
|
-Ddefault-dnssec=no
|
|
# TODO(dreisner): consider changing this to unified
|
|
-Ddefault-hierarchy=hybrid
|
|
-Ddefault-kill-user-processes=false
|
|
-Dfallback-hostname='archlinux'
|
|
-Dntp-servers="${timeservers[*]}"
|
|
-Drpmmacrosdir=no
|
|
-Dsysvinit-path=
|
|
-Dsysvrcnd-path=
|
|
)
|
|
|
|
chakra-meson "$_pkgbasename-stable" build "${meson_options[@]}"
|
|
|
|
ninja -C build
|
|
}
|
|
|
|
package() {
|
|
DESTDIR="$pkgdir" ninja -C build install
|
|
|
|
rm -rf "${pkgdir}"/{etc,var}
|
|
rm -rf "${pkgdir}"/usr/{bin,sbin,include,lib,share}
|
|
|
|
install -m755 -d "${pkgdir}/usr/share/licenses"
|
|
ln -s systemd "$pkgdir/usr/share/licenses/lib32-systemd"
|
|
}
|