core/systemd/PKGBUILD

116 lines
4.1 KiB
Bash
Raw Normal View History

2013-07-15 04:12:54 +08:00
# maintainer: Fabian Kosmale <inkane@chakra-project.org>
2012-09-09 12:17:16 +08:00
pkgname=systemd
2014-03-26 21:54:09 +08:00
pkgver=212
pkgrel=2
2013-04-20 18:49:40 +08:00
pkgdesc="A system and service manager for Linux"
arch=('x86_64')
2012-09-09 12:17:16 +08:00
url="http://www.freedesktop.org/wiki/Software/systemd"
license=('GPL2' 'LGPL2.1' 'MIT')
2014-02-26 07:46:10 +08:00
depends=('acl' 'bash' 'glibc' 'glib2' 'hwids' 'util-linux' 'kbd' 'kmod' 'libcap' 'libxslt'
2013-07-18 06:18:46 +08:00
'linux-api-headers' 'pam' 'xz' 'libgcrypt' 'dbus-core')
2012-09-09 12:17:16 +08:00
makedepends=('docbook-xsl' 'gobject-introspection' 'gperf' 'intltool')
optdepends=('python2-gobject3: systemd-analyze'
'dbus-python: systemd-analyze')
2012-09-09 12:17:16 +08:00
backup=(etc/dbus-1/system.d/org.freedesktop.systemd1.conf
etc/dbus-1/system.d/org.freedesktop.hostname1.conf
etc/dbus-1/system.d/org.freedesktop.login1.conf
etc/dbus-1/system.d/org.freedesktop.locale1.conf
etc/dbus-1/system.d/org.freedesktop.timedate1.conf
etc/systemd/system.conf
etc/systemd/user.conf
etc/systemd/logind.conf
etc/systemd/journald.conf
etc/udev/udev.conf)
provides=("udev=$pkgver")
2013-07-15 04:12:54 +08:00
conflicts=('udev' 'sysvinit' 'initscripts' 'initscripts-systemd')
2012-09-09 12:17:16 +08:00
replaces=('udev')
groups=('base')
2012-09-09 12:17:16 +08:00
install="systemd.install"
options=('!libtool')
source=("http://www.freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz"
'initcpio-hook-udev'
'initcpio-install-udev'
2013-08-28 06:27:36 +08:00
'initcpio-install-systemd'
2013-07-15 04:12:54 +08:00
'99-default.preset')
2014-03-26 21:54:09 +08:00
md5sums=('257a75fff826ff91cb1ce567091cf270'
2013-04-20 18:49:40 +08:00
'e99e9189aa2f6084ac28b8ddf605aeb8'
'fb37e34ea006c79be1c54cbb0f803414'
2013-08-28 06:27:36 +08:00
'9027b31a875e74a45623954b3b23d09f'
2013-07-15 04:12:54 +08:00
'a1bf25da736d3719e9720b2e4caea341')
2012-09-09 12:17:16 +08:00
build() {
2013-07-18 06:18:46 +08:00
2012-09-09 12:17:16 +08:00
cd "$pkgname-$pkgver"
2013-07-15 04:12:54 +08:00
./configure \
2013-03-13 04:03:32 +08:00
PYTHON=python2 \
PYTHON_CONFIG=python2-config \
2012-09-09 12:17:16 +08:00
--libexecdir=/usr/lib \
--localstatedir=/var \
--sysconfdir=/etc \
--enable-introspection \
2014-02-27 05:35:16 +08:00
--enable-compat-libs \
--enable-split-usr \
2012-09-09 12:17:16 +08:00
--disable-gtk-doc \
--disable-audit \
2013-03-13 04:03:32 +08:00
--disable-ima \
2014-02-27 05:35:16 +08:00
--disable-kdbus \
2013-07-15 04:12:54 +08:00
--with-sysvinit-path= \
--with-sysvrcnd-path= \
2013-03-13 04:03:32 +08:00
--with-firmware-path=/usr/lib/firmware/updates:/lib/firmware/updates:/usr/lib/firmware:/lib/firmware
2013-07-15 04:12:54 +08:00
make
2012-09-09 12:17:16 +08:00
}
package() {
make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
printf "d /run/console 0755 root root\n" > "$pkgdir/usr/lib/tmpfiles.d/console.conf"
install -dm755 "$pkgdir/bin"
ln -s ../usr/lib/systemd/systemd "$pkgdir/bin/systemd"
install -dm755 "$pkgdir/sbin"
for tool in runlevel reboot shutdown poweroff halt telinit; do
ln -s '/usr/bin/systemctl' "$pkgdir/sbin/$tool"
done
ln -s '../usr/lib/systemd/systemd' "$pkgdir/sbin/init"
# the path to udevadm is hardcoded in some places
install -d "$pkgdir/sbin"
ln -s ../usr/bin/udevadm "$pkgdir/sbin/udevadm"
# udevd is no longer udevd because systemd. why isn't udevadm now udevctl?
ln -s ../lib/systemd/systemd-udevd "$pkgdir/usr/bin/udevd"
2014-02-27 05:35:16 +08:00
# get rid of RPM macros
rm -r "$pkgdir/usr/lib/rpm"
2012-09-09 12:17:16 +08:00
# add back tmpfiles.d/legacy.conf
install -m644 "systemd-$pkgver/tmpfiles.d/legacy.conf" "$pkgdir/usr/lib/tmpfiles.d"
# Replace dialout/tape/cdrom group in rules with uucp/storage/optical group
sed -i 's#GROUP="dialout"#GROUP="uucp"#g;
s#GROUP="tape"#GROUP="storage"#g;
s#GROUP="cdrom"#GROUP="optical"#g' "$pkgdir"/usr/lib/udev/rules.d/*.rules
# add mkinitcpio hooks
install -Dm644 "$srcdir/initcpio-install-udev" "$pkgdir/usr/lib/initcpio/install/udev"
install -Dm644 "$srcdir/initcpio-hook-udev" "$pkgdir/usr/lib/initcpio/hooks/udev"
2013-08-28 06:27:36 +08:00
install -Dm644 "$srcdir/initcpio-install-systemd" "$pkgdir/usr/lib/initcpio/install/systemd"
2014-02-27 05:35:16 +08:00
# ensure proper permissions for /var/log/journal
chown root:systemd-journal "$pkgdir/var/log/journal"
chmod 2755 "$pkgdir/var/log/journal"
# fix pam file
sed 's|system-auth|system-login|g' -i "$pkgdir/etc/pam.d/systemd-user"
2012-09-09 12:17:16 +08:00
# Chakra specific .preset
install -Dm644 "$srcdir/99-default.preset" "$pkgdir/usr/lib/systemd/system-preset/99-default.preset"
# Make journalctl persistent
install -dm755 "$pkgdir/var/log/journal"
sed -i -e 's/#SystemMaxUse=/SystemMaxUse=25M/' ${pkgdir}/etc/systemd/journald.conf
2012-09-09 12:17:16 +08:00
}