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
53 configure_options += \
54 --with-distro=ipfire \
62 # Create folder in log to store the journal.
63 mkdir -pv %{BUILDROOT}/var/log/journal
65 # Create sysv compatible symlinks.
66 mkdir -pv %{BUILDROOT}%{sbindir}
67 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init
68 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd
69 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot
70 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt
71 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff
72 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown
74 # Create empty machine-id file.
75 touch %{BUILDROOT}/etc/machine-id
77 # Copy locale and console settings
78 mkdir -pv %{BUILDROOT}%{sysconfdir}
79 cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir}
81 # Recreate all targets
82 rm -rfv %{BUILDROOT}/%{sysconfdir}/systemd/system/*.target.wants
83 for i in basic.target.wants default.target.wants dbus.target.wants getty.target.wants \
84 multi-user.target.wants syslog.target.wants; do
85 mkdir -pv %{BUILDROOT}/%{sysconfdir}/systemd/system/${i} || exit 1
88 # Remove runlevel targets and graphical.target
89 rm -rfv %{BUILDROOT}%{unitdir}/runlevel*
90 rm -rfv %{BUILDROOT}%{unitdir}/graphical.target
92 # Remove service files for utmp update.
93 rm -rvf %{BUILDROOT}%{unitdir}/systemd-update-utmp-*.service
94 rm -rvf %{BUILDROOT}%{unitdir}/shutdown.target.wants/systemd-update-utmp-*.service
96 # Set default target to multi-user
97 ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target
99 # Replace absolute symlinks by relative ones.
100 cd %{BUILDROOT}%{unitdir}/../user
101 for i in bluetooth local-fs printer remote-fs shutdown sockets sound swap; do
102 ln -svf ../system/${i}.target ${i}.target || exit 1
105 # Remove tmpfile for X11
106 rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf
108 # Remove unneeded symlink for xdg
109 rm -rfv %{BUILDROOT}/etc/xdg/systemd
111 # Use journald. Enable the import of kernel messages.
112 # Stop forwarding to a syslog daemon.
114 -e "s/^#ForwardToSyslog=.*$/ForwardToSyslog=no/" \
115 -e "s/^#ImportKernel=.*$/ImportKernel=yes/" \
116 -i %{BUILDROOT}/etc/systemd/journald.conf
124 prerequires += authconfig
131 %{name}-units=%{thisver}
161 /etc/systemd/journald.conf
162 /etc/systemd/logind.conf
163 /etc/systemd/system.conf
164 /etc/systemd/user.conf
170 # Create groups for udev.
171 getent group cdrom >/dev/null || groupadd -g 11 cdrom || :
172 getent group tape >/dev/null || groupadd -g 33 tape || :
173 getent group dialout >/dev/null || groupadd -g 18 dialout || :
174 getent group floppy >/dev/null || groupadd -g 19 floppy || :
178 # Generate Machine ID.
179 /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || :
181 # Reexec systemd daemon.
182 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
184 # Make sure pam_systemd is enabled
185 if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
186 authconfig --update --nostart >/dev/null 2>&1 || :
189 grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || :
192 /usr/bin/systemctl enable \
195 systemd-readahead-replay.service \
196 systemd-readahead-collect.service \
201 # Be sure to stop the old udev before updating.
202 /usr/bin/systemctl stop udev.service udev-trigger.service \
203 udev-control.socket udev-kernel.socket >/dev/null 2>&1 || :
207 # Restart login service after update
208 /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
209 /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
211 # Use the new journald configuration file and restart the service.
212 if ! grep -xq ImportKernel=yes /etc/systemd/journald.conf ; then
213 mv /etc/systemd/journald.conf.paknew /etc/systemd/journald.conf
214 /usr/bin/systemctl restart systemd-journald.service >/dev/null 2>&1 || :
218 # Be sure to start the new udev after everything is done.
220 /usr/bin/systemctl start systemd-udev.service >/dev/null 2>&1 || :
224 # Package information for systemd-units
225 package %{name}-units
226 summary = Configuration files, directories and installation tool for systemd.
228 This package contains all needed configuration files, directories
229 and installation / configuration tool for systemd.
246 %{sysconfdir}/etc/systemd/system
247 %{sysconfdir}/tmpfiles.d
248 %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh
251 %{bindir}/systemd-tmpfiles
252 %{mandir}/man1/systemctl.*
256 # Reload service files
257 /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || :
261 package %{name}-devel
264 files += %{prefix}/lib/pakfire/macros/
268 summary = Libraries for adding libudev support to applications.
270 This package contains the libraries that make it easier to use libudev
271 functionality from applications.
280 %{libdir}/libgudev*.so.*
281 %{libidr}/girepository*/
285 package libudev-devel
286 summary = Header files for adding libudev support to applications.
288 This package contains the header and pkg-config files for developing
289 applications using libudev functionality.
298 %{libdir}/lib*udev*.so
299 %{libdir}/pkgconfig/lib*udev.pc
300 %{libdir}/pkgconfig/gudev*
301 %{includedir}/lib*udev.h
304 %{datadir}/gtk-doc/html/gudev
308 package %{name}-debuginfo