1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
10 maintainer = Stefan Schantl <stefan.schantl@ipfire.org>
12 url = http://www.freedesktop.org/wiki/Software/systemd
14 summary = A System and Service Manager.
17 systemd is a system and service manager for Linux, compatible with
18 SysV and LSB init scripts.
21 source_dl = http://cgit.freedesktop.org/systemd/systemd/snapshot/
24 unitdir = %{prefix}/lib/systemd/system
48 configure_options += \
49 --libexecdir=%{libdir} \
61 # Create sysv compatible symlinks.
62 mkdir -pv %{BUILDROOT}%{sbindir}
63 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init
64 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd
65 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot
66 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt
67 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff
68 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown
70 # Create empty machine-id file.
71 touch %{BUILDROOT}/etc/machine-id
73 # Copy locale and console settings
74 mkdir -pv %{BUILDROOT}%{sysconfdir}
75 cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir}
77 # Recreate all targets
78 rm -rfv %{BUILDROOT}%{unitdir}/*.target.wants
79 for i in basic.target.wants default.target.wants dbus.target.wants syslog.target.wants; do
80 mkdir -pv %{BUILDROOT}%{unitdir}/${i} || exit 1
83 # Remove runlevel targets and graphical.target
84 rm -rfv %{BUILDROOT}%{unitdir}/runlevel*
85 rm -rfv %{BUILDROOT}%{unitdir}/graphical.target
87 # Set default target to multi-user
88 ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target
90 # Replace absolute symlinks by relative ones.
91 cd %{BUILDROOT}%{unitdir}/../user
92 for i in bluetooth local-fs printer remote-fs shutdown sockets sound swap; do
93 ln -svf ../system/${i}.target ${i}.target || exit 1
96 # Replace absolute symlink for getty@tty1.service.
97 ln -svf ../../../../%{unitdir}/getty@.service \
98 %{BUILDROOT}%{sysconfdir}/systemd/system/getty.target.wants/getty@tty1.service
100 # Replace absolute symlink for remote-fs.target.
101 ln -svf ../../../../%{unitdir}/remote-fs.target \
102 %{BUILDROOT}%{sysconfdir}/systemd/system/multi-user.target.wants/remote-fs.target
104 # Remove tmpfile for X11
105 rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf
107 # Remove unneeded symlink for xdg
108 rm -rfv %{BUILDROOT}/etc/xdg/systemd
114 prerequires += authconfig
120 %{name}-units=%{thisver}
140 # Generate Machine ID.
141 /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || :
143 # Reexec systemd daemon.
144 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
146 # Make sure pam_systemd is enabled
147 if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
148 authconfig --update --nostart >/dev/null 2>&1 || :
151 grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || :
156 # Restart login service after update
157 /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
161 # Package information for systemd-units
162 package %{name}-units
163 summary = Configuration files, directories and installation tool for systemd.
165 This package contains all needed configuration files, directories
166 and installation / configuration tool for systemd.
183 %{sysconfdir}/etc/systemd/system
184 %{sysconfdir}/tmpfiles.d
185 %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh
188 %{bindir}/systemd-tmpfiles
189 %{mandir}/man1/systemctl.*
193 # Reload service files
194 /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || :
198 package %{name}-devel
201 files += %{prefix}/lib/pakfire/macros/
204 package %{name}-debuginfo