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} \
50 --with-udevrulesdir=%{prefix}/lib/udev/rules.d \
62 # Create sysv compatible symlinks.
63 mkdir -pv %{BUILDROOT}%{sbindir}
64 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init
65 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd
66 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot
67 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt
68 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff
69 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown
71 # Create empty machine-id file.
72 touch %{BUILDROOT}/etc/machine-id
74 # Copy locale and console settings
75 mkdir -pv %{BUILDROOT}%{sysconfdir}
76 cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir}
78 # Recreate all targets
79 rm -rfv %{BUILDROOT}/%{sysconfdir}/systemd/system/*.target.wants
80 for i in basic.target.wants default.target.wants dbus.target.wants getty.target.wants \
81 multi-user.target.wants syslog.target.wants; do
82 mkdir -pv %{BUILDROOT}/%{sysconfdir}/systemd/system/${i} || exit 1
85 # Remove runlevel targets and graphical.target
86 rm -rfv %{BUILDROOT}%{unitdir}/runlevel*
87 rm -rfv %{BUILDROOT}%{unitdir}/graphical.target
89 # Set default target to multi-user
90 ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target
92 # Replace absolute symlinks by relative ones.
93 cd %{BUILDROOT}%{unitdir}/../user
94 for i in bluetooth local-fs printer remote-fs shutdown sockets sound swap; do
95 ln -svf ../system/${i}.target ${i}.target || exit 1
98 # Remove tmpfile for X11
99 rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf
101 # Remove unneeded symlink for xdg
102 rm -rfv %{BUILDROOT}/etc/xdg/systemd
108 prerequires += authconfig
114 %{name}-units=%{thisver}
134 # Generate Machine ID.
135 /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || :
137 # Reexec systemd daemon.
138 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
140 # Make sure pam_systemd is enabled
141 if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
142 authconfig --update --nostart >/dev/null 2>&1 || :
145 grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || :
148 /usr/bin/systemctl enable \
151 systemd-readahead-replay.service \
152 systemd-readahead-collect.service \
157 # Restart login service after update
158 /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
159 /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
163 # Package information for systemd-units
164 package %{name}-units
165 summary = Configuration files, directories and installation tool for systemd.
167 This package contains all needed configuration files, directories
168 and installation / configuration tool for systemd.
185 %{sysconfdir}/etc/systemd/system
186 %{sysconfdir}/tmpfiles.d
187 %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh
190 %{bindir}/systemd-tmpfiles
191 %{mandir}/man1/systemctl.*
195 # Reload service files
196 /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || :
200 package %{name}-devel
203 files += %{prefix}/lib/pakfire/macros/
206 package %{name}-debuginfo