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
30 cryptsetup-luks-devel >= 1.4.2
36 gobject-introspection-devel >= 1.31
55 configure_options += \
56 --with-distro=ipfire \
64 # Create folder in log to store the journal.
65 mkdir -pv %{BUILDROOT}/var/log/journal
67 # Create sysv compatible symlinks.
68 mkdir -pv %{BUILDROOT}%{sbindir}
69 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init
70 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd
71 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot
72 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt
73 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff
74 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown
76 # Create empty machine-id file.
77 touch %{BUILDROOT}/etc/machine-id
79 # Copy locale and console settings
80 mkdir -pv %{BUILDROOT}%{sysconfdir}
81 cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir}
83 # Recreate all targets
84 rm -rfv %{BUILDROOT}/%{sysconfdir}/systemd/system/*.target.wants
85 for i in basic.target.wants default.target.wants dbus.target.wants getty.target.wants \
86 multi-user.target.wants syslog.target.wants; do
87 mkdir -pv %{BUILDROOT}/%{sysconfdir}/systemd/system/${i} || exit 1
90 # Remove runlevel targets and graphical.target
91 rm -rfv %{BUILDROOT}%{unitdir}/runlevel*
92 rm -rfv %{BUILDROOT}%{unitdir}/graphical.target
94 # Remove service files for utmp update.
95 rm -rvf %{BUILDROOT}%{unitdir}/systemd-update-utmp-*.service
96 rm -rvf %{BUILDROOT}%{unitdir}/shutdown.target.wants/systemd-update-utmp-*.service
98 # Set default target to multi-user
99 ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target
101 # Replace absolute symlinks by relative ones.
102 cd %{BUILDROOT}%{unitdir}/../user
103 for i in bluetooth local-fs printer remote-fs shutdown sockets sound swap; do
104 ln -svf ../system/${i}.target ${i}.target || exit 1
107 # Remove tmpfile for X11
108 rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf
110 # Remove unneeded symlink for xdg
111 rm -rfv %{BUILDROOT}/etc/xdg/systemd
113 # Use journald. Enable the import of kernel messages.
114 # Stop forwarding to a syslog daemon.
116 -e "s/^#ForwardToSyslog=.*$/ForwardToSyslog=no/" \
117 -e "s/^#ImportKernel=.*$/ImportKernel=yes/" \
118 -i %{BUILDROOT}/etc/systemd/journald.conf
126 prerequires += authconfig
133 %{name}-units=%{thisver}
163 /etc/systemd/journald.conf
164 /etc/systemd/logind.conf
165 /etc/systemd/system.conf
166 /etc/systemd/user.conf
172 # Create groups for udev.
173 getent group cdrom >/dev/null || groupadd -g 11 cdrom || :
174 getent group tape >/dev/null || groupadd -g 33 tape || :
175 getent group dialout >/dev/null || groupadd -g 18 dialout || :
176 getent group floppy >/dev/null || groupadd -g 19 floppy || :
180 # Generate Machine ID.
181 /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || :
183 # Reexec systemd daemon.
184 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
186 # Make sure pam_systemd is enabled
187 if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
188 authconfig --update --nostart >/dev/null 2>&1 || :
191 grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || :
194 /usr/bin/systemctl enable \
197 systemd-readahead-replay.service \
198 systemd-readahead-collect.service \
203 # Be sure to stop the old udev before updating.
204 /usr/bin/systemctl stop udev.service udev-trigger.service \
205 udev-control.socket udev-kernel.socket >/dev/null 2>&1 || :
209 # Restart login service after update
210 /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
211 /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
213 # Use the new journald configuration file and restart the service.
214 if ! grep -xq ImportKernel=yes /etc/systemd/journald.conf ; then
215 mv /etc/systemd/journald.conf.paknew /etc/systemd/journald.conf
216 /usr/bin/systemctl restart systemd-journald.service >/dev/null 2>&1 || :
220 # Be sure to start the new udev after everything is done.
222 /usr/bin/systemctl start systemd-udev.service >/dev/null 2>&1 || :
226 # Package information for systemd-units
227 package %{name}-units
228 summary = Configuration files, directories and installation tool for systemd.
230 This package contains all needed configuration files, directories
231 and installation / configuration tool for systemd.
248 %{sysconfdir}/etc/systemd/system
249 %{sysconfdir}/tmpfiles.d
250 %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh
253 %{bindir}/systemd-tmpfiles
254 %{mandir}/man1/systemctl.*
258 # Reload service files
259 /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || :
263 package %{name}-devel
266 files += %{prefix}/lib/pakfire/macros/
270 summary = Libraries for adding libudev support to applications.
272 This package contains the libraries that make it easier to use libudev
273 functionality from applications.
282 %{libdir}/libgudev*.so.*
283 %{libidr}/girepository*/
287 package libudev-devel
288 summary = Header files for adding libudev support to applications.
290 This package contains the header and pkg-config files for developing
291 applications using libudev functionality.
300 %{libdir}/lib*udev*.so
301 %{libdir}/pkgconfig/lib*udev.pc
302 %{libdir}/pkgconfig/gudev*
303 %{includedir}/lib*udev.h
306 %{datadir}/gtk-doc/html/gudev
310 package %{name}-debuginfo