############################################################################### # IPFire.org - An Open Source Firewall Solution # # Copyright (C) - IPFire Development Team # ############################################################################### name = systemd version = 44 release = 4 maintainer = Stefan Schantl groups = System/Base url = http://www.freedesktop.org/wiki/Software/systemd license = GPLv2+ summary = A System and Service Manager. description systemd is a system and service manager for Linux, compatible with SysV and LSB init scripts. end source_dl = http://cgit.freedesktop.org/systemd/systemd/snapshot/ build unitdir = %{prefix}/lib/systemd/system requires audit-devel automake autoconf cryptsetup-luks-devel dbus-devel docbook-utils docbook-xsl gperf gettext-devel intltool kmod-devel >= 5 libacl-devel libcap-devel libselinux-devel libtool libudev-devel >= 172 pam-devel vala xz-devel end configure_options += \ --libexecdir=%{libdir} \ --with-udevrulesdir=%{prefix}/lib/udev/rules.d \ --with-distro=ipfire prepare_cmds ./autogen.sh ac end test make check end install_cmds # Create sysv compatible symlinks. mkdir -pv %{BUILDROOT}%{sbindir} ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown # Create empty machine-id file. touch %{BUILDROOT}/etc/machine-id # Copy locale and console settings mkdir -pv %{BUILDROOT}%{sysconfdir} cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir} # Recreate all targets rm -rfv %{BUILDROOT}/%{sysconfdir}/systemd/system/*.target.wants for i in basic.target.wants default.target.wants dbus.target.wants getty.target.wants \ multi-user.target.wants syslog.target.wants; do mkdir -pv %{BUILDROOT}/%{sysconfdir}/systemd/system/${i} || exit 1 done # Remove runlevel targets and graphical.target rm -rfv %{BUILDROOT}%{unitdir}/runlevel* rm -rfv %{BUILDROOT}%{unitdir}/graphical.target # Set default target to multi-user ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target # Replace absolute symlinks by relative ones. cd %{BUILDROOT}%{unitdir}/../user for i in bluetooth local-fs printer remote-fs shutdown sockets sound swap; do ln -svf ../system/${i}.target ${i}.target || exit 1 done # Replace absolute symlink for getty@tty1.service. ln -svf ../../../../%{unitdir}/getty@.service \ %{BUILDROOT}%{sysconfdir}/systemd/system/getty.target.wants/getty@tty1.service # Replace absolute symlink for remote-fs.target. ln -svf ../../../../%{unitdir}/remote-fs.target \ %{BUILDROOT}%{sysconfdir}/systemd/system/multi-user.target.wants/remote-fs.target # Remove tmpfile for X11 rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf # Remove unneeded symlink for xdg rm -rfv %{BUILDROOT}/etc/xdg/systemd end end packages package %{name} prerequires += authconfig requires dbus python-cairo python-dbus %{name}-units=%{thisver} udev>=172 util-linux>=2.19 end provides /bin/systemd /sbin/halt /sbin/init /sbin/poweroff /sbin/reboot /sbin/shutdown end conflicts filesystem < 002 upstart end script postin # Generate Machine ID. /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || : # Reexec systemd daemon. /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || : # Make sure pam_systemd is enabled if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then authconfig --update --nostart >/dev/null 2>&1 || : # Try harder grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || : fi end script postup # Restart login service after update /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || : end end # Package information for systemd-units package %{name}-units summary = Configuration files, directories and installation tool for systemd. description This package contains all needed configuration files, directories and installation / configuration tool for systemd. end prerequires /bin/sh coreutils end provides /bin/systemctl end conflicts filesystem < 002 end files %{sysconfdir}/etc/systemd/system %{sysconfdir}/tmpfiles.d %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh %{unitdir} %{bindir}/systemctl %{bindir}/systemd-tmpfiles %{mandir}/man1/systemctl.* end script postup # Reload service files /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || : end end package %{name}-devel template DEVEL files += %{prefix}/lib/pakfire/macros/ end package %{name}-debuginfo template DEBUGINFO end end