Steal Arch's pkgbuild and strip it
Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
parent
2a84869366
commit
4e071be0a5
177
PKGBUILD
177
PKGBUILD
@ -1,68 +1,147 @@
|
|||||||
# Maintainer: Jack L. Frost <fbt@fleshless.org>
|
# PKGBUILD stripped to only provide libsystemd and libsystemd-udev.
|
||||||
# % Trigger: 1434722047 %
|
# Original Arch maintainers:
|
||||||
# vim: ft=sh
|
# Maintainer: Christian Hesse <mail@eworm.de>
|
||||||
|
# Maintainer: Dave Reisner <dreisner@archlinux.org>
|
||||||
|
# Maintainer: Tom Gundersen <teg@jklm.no>
|
||||||
|
|
||||||
pkgdesc="Standalone systemd libs"
|
pkgbase=libsystemd-standalone
|
||||||
pkgname=('libsystemd-standalone' 'libsystemd-udev')
|
pkgname=('libsystemd-standalone' 'libsystemd-udev')
|
||||||
pkgver=235
|
# latest commit on stable branch
|
||||||
pkgrel=1
|
_commit='743b771c559c6101544f7358a42c8c519fe4b0db'
|
||||||
arch=('i686' 'x86_64')
|
# Bump this to latest major release for signed tag verification,
|
||||||
url="http://www.freedesktop.org/wiki/Software/systemd"
|
# the commit count is handled by pkgver() function.
|
||||||
license=('GPL2' 'LGPL2.1' 'MIT')
|
pkgver=235.38
|
||||||
makedepends=('acl' 'cryptsetup' 'docbook-xsl' 'gobject-introspection' 'gperf'
|
pkgrel=2
|
||||||
'gtk-doc' 'intltool' 'kmod' 'libcap' 'libgcrypt' 'libmicrohttpd' 'libxslt'
|
arch=('x86_64')
|
||||||
'linux-api-headers' 'pam' 'python' 'python-lxml' 'quota-tools' 'xz')
|
url="https://www.github.com/systemd/systemd"
|
||||||
|
makedepends=('acl' 'cryptsetup' 'docbook-xsl' 'gperf' 'lz4' 'xz' 'pam' 'libelf'
|
||||||
|
'intltool' 'iptables' 'kmod' 'libcap' 'libidn' 'libgcrypt'
|
||||||
|
'libmicrohttpd' 'libxslt' 'util-linux' 'linux-api-headers'
|
||||||
|
'python-lxml' 'quota-tools' 'shadow' 'gnu-efi-libs' 'git'
|
||||||
|
'meson' 'libseccomp')
|
||||||
options=('strip')
|
options=('strip')
|
||||||
source=( "https://github.com/systemd/systemd/archive/v${pkgver}.tar.gz" )
|
validpgpkeys=('63CDA1E5D3FC22B998D20DD6327F26951A015CC4') # Lennart Poettering <lennart@poettering.net>
|
||||||
|
source=('git://github.com/systemd/systemd-stable.git'
|
||||||
|
'git://github.com/systemd/systemd.git') # pull in for tags, backports & reverts
|
||||||
|
|
||||||
|
_backports=(
|
||||||
|
# Fix typo in statx macro (#7180) (FS#56289)
|
||||||
|
'8e6a7a8b2be409d356bcaface00f6d44390c07ff'
|
||||||
|
)
|
||||||
|
|
||||||
|
_reverts=(
|
||||||
|
)
|
||||||
|
|
||||||
|
_validate_tag() {
|
||||||
|
local success fingerprint trusted status tag=v${pkgver%.*}
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
pkgver() {
|
||||||
|
local version count
|
||||||
|
|
||||||
|
cd "systemd-stable"
|
||||||
|
|
||||||
|
version="$(git describe --abbrev=0 --tags)"
|
||||||
|
count="$(git rev-list --count ${version}..)"
|
||||||
|
printf '%s.%s' "${version#v}" "${count}"
|
||||||
|
}
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd "systemd-stable"
|
||||||
|
|
||||||
|
git remote add upstream ../systemd/
|
||||||
|
git fetch --all
|
||||||
|
|
||||||
|
git checkout "${_commit}"
|
||||||
|
|
||||||
|
_validate_tag || return
|
||||||
|
|
||||||
|
local _commit
|
||||||
|
for _commit in "${_backports[@]}"; do
|
||||||
|
git cherry-pick -n "$_commit"
|
||||||
|
done
|
||||||
|
for _commit in "${_reverts[@]}"; do
|
||||||
|
git revert -n "$_commit"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "systemd-$pkgver"
|
local timeservers=({0..3}.arch.pool.ntp.org)
|
||||||
|
|
||||||
./autogen.sh
|
local meson_options=(
|
||||||
./configure
|
-Daudit=false
|
||||||
|
-Dgnuefi=true
|
||||||
|
-Dima=false
|
||||||
|
-Dlz4=true
|
||||||
|
|
||||||
make
|
-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=
|
||||||
|
)
|
||||||
|
|
||||||
|
arch-meson "systemd-stable" build "${meson_options[@]}"
|
||||||
|
|
||||||
|
ninja -C build
|
||||||
|
|
||||||
|
DESTDIR="$srcdir"/full-install ninja -C build install
|
||||||
}
|
}
|
||||||
|
|
||||||
package_libsystemd-standalone() {
|
package_libsystemd-standalone() {
|
||||||
install='libsystemd.install'
|
pkgdesc="systemd client libraries"
|
||||||
provides=( 'libsystemd.so' 'libsystemd' )
|
depends=('glibc' 'libcap' 'libgcrypt' 'lz4' 'xz')
|
||||||
|
license=('GPL2')
|
||||||
|
provides=('libsystemd' 'libsystemd.so')
|
||||||
|
|
||||||
make -C "systemd-$pkgver" DESTDIR="$pkgdir" install-rootlibLTLIBRARIES
|
install -dm755 "$pkgdir"/usr/lib/
|
||||||
|
cp --archive "$srcdir"/full-install/usr/lib/lib{nss_*,systemd}.so* "$pkgdir"/usr/lib/
|
||||||
|
|
||||||
# Headers
|
install -dm755 "$pkgdir"/usr/lib/pkgconfig/
|
||||||
cd "systemd-$pkgver"
|
cp --archive "$srcdir"/full-install/usr/lib/pkgconfig/libsystemd.pc "$pkgdir"/usr/lib/pkgconfig/
|
||||||
install -Dm644 src/systemd/_sd-common.h "${pkgdir}/usr/include/systemd/_sd-common.h"
|
|
||||||
install -Dm644 src/systemd/sd-messages.h "${pkgdir}/usr/include/systemd/sd-messages.h"
|
|
||||||
install -Dm644 src/systemd/sd-event.h "${pkgdir}/usr/include/systemd/sd-event.h"
|
|
||||||
install -Dm644 src/systemd/sd-bus.h "${pkgdir}/usr/include/systemd/sd-bus.h"
|
|
||||||
install -Dm644 src/systemd/sd-bus-protocol.h "${pkgdir}/usr/include/systemd/sd-bus-protocol.h"
|
|
||||||
install -Dm644 src/systemd/sd-bus-vtable.h "${pkgdir}/usr/include/systemd/sd-bus-vtable.h"
|
|
||||||
install -Dm644 src/systemd/sd-daemon.h "${pkgdir}/usr/include/systemd/sd-daemon.h"
|
|
||||||
install -Dm644 src/systemd/sd-id128.h "${pkgdir}/usr/include/systemd/sd-id128.h"
|
|
||||||
install -Dm644 src/systemd/sd-journal.h "${pkgdir}/usr/include/systemd/sd-journal.h"
|
|
||||||
install -Dm644 src/systemd/sd-login.h "${pkgdir}/usr/include/systemd/sd-login.h"
|
|
||||||
|
|
||||||
# pkg-config
|
|
||||||
install -Dm644 src/libsystemd/libsystemd.pc "${pkgdir}/usr/lib/pkgconfig/libsystemd.pc"
|
|
||||||
|
|
||||||
# remove libudev stuff
|
|
||||||
cd "$pkgdir/usr/lib"
|
|
||||||
rm libudev.so* libudev.la
|
|
||||||
}
|
}
|
||||||
|
|
||||||
package_libsystemd-udev() {
|
package_libsystemd-udev() {
|
||||||
_libudev_version='1.6.6'
|
pkgdesc="udev client libraries"
|
||||||
install='libsystemd.install'
|
depends=('glibc' 'libcap' 'libgcrypt' 'lz4' 'xz')
|
||||||
provides=( 'libudev.so' 'libudev' )
|
license=('GPL2')
|
||||||
|
provides=('libudev' 'libudev.so')
|
||||||
|
|
||||||
install -Dm644 "systemd-$pkgver/.libs/libudev.la" "${pkgdir}/usr/lib/libudev.la"
|
install -dm755 "$pkgdir"/usr/lib/
|
||||||
install -Dm644 "systemd-$pkgver/.libs/libudev.so.$_libudev_version" "${pkgdir}/usr/lib/libudev.so.$_libudev_version"
|
cp --archive "$srcdir"/full-install/usr/lib/libudev.so* "$pkgdir"/usr/lib/
|
||||||
ln -s "libudev.so.$_libudev_version" "$pkgdir/usr/lib/libudev.so.1"
|
|
||||||
ln -s "libudev.so.$_libudev_version" "$pkgdir/usr/lib/libudev.so"
|
|
||||||
|
|
||||||
install -Dm644 "systemd-$pkgver/src/libudev/libudev.pc" "$pkgdir/usr/lib/pkgconfig/libudev.pc"
|
install -dm755 "$pkgdir"/usr/lib/pkgconfig/
|
||||||
install -Dm644 "systemd-$pkgver/src/libudev/libudev.h" "$pkgdir/usr/include/libudev.h"
|
cp --archive "$srcdir"/full-install/usr/lib/pkgconfig/libudev.pc "$pkgdir"/usr/lib/pkgconfig/
|
||||||
}
|
}
|
||||||
|
|
||||||
sha1sums=('bda1bd1cb09bba798c3e125fb902f6c9e75308c4')
|
# vim: ft=sh syn=sh et
|
||||||
|
sha1sums=('SKIP'
|
||||||
|
'SKIP')
|
||||||
|
Reference in New Issue
Block a user