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/snapshot/
40 configure_options += \
42 --libexecdir=/usr/lib \
45 --with-sysvinit-path= \
46 --with-sysvrcd-path= \
47 --with-udevrulesdir=/lib/udev/rules.d/ \
48 --with-pamlibdir=/lib/security
59 # Create sysv compatible symlinks.
60 mkdir -pv %{BUILDROOT}/sbin
61 ln -svf ../bin/systemd %{BUILDROOT}/sbin/init
62 ln -svf ../bin/systemctl %{BUILDROOT}/sbin/reboot
63 ln -svf ../bin/systemctl %{BUILDROOT}/sbin/halt
64 ln -svf ../bin/systemctl %{BUILDROOT}/sbin/poweroff
65 ln -svf ../bin/systemctl %{BUILDROOT}/sbin/shutdown
67 # Create empty machine-id file.
68 touch %{BUILDROOT}/etc/machine-id
70 # Copy locale and console settings
71 mkdir -pv %{BUILDROOT}/etc
72 cp -vf %{DIR_SOURCE}/locale.conf %{BUILDROOT}/etc/
73 cp -vf %{DIR_SOURCE}/vconsole.conf %{BUILDROOT}/etc/
75 # Recreate all targets
76 rm -rfv %{BUILDROOT}/etc/systemd/system/*.target.wants
77 mkdir -pv %{BUILDROOT}/lib/systemd/system/basic.target.wants
78 mkdir -pv %{BUILDROOT}/lib/systemd/system/default.target.wants
79 mkdir -pv %{BUILDROOT}/lib/systemd/system/dbus.target.wants
80 mkdir -pv %{BUILDROOT}/lib/systemd/system/syslog.target.wants
82 # Remove runlevel targets and graphical.target
83 rm -rfv %{BUILDROOT}/lib/systemd/system/runlevel*
84 rm -rfv %{BUILDROOT}/lib/systemd/system/graphical.target
86 # Set default target to multi-user
87 cd %{BUILDROOT}/lib/systemd/system && ln -svf multi-user.target default.target
89 # Replace absolute symlinks by relative ones.
90 cd %{BUILDROOT}/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/bluetooth.target bluetooth.target
91 cd %{BUILDROOT}/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/local-fs.target local-fs.target
92 cd %{BUILDROOT}/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/printer.target printer.target
93 cd %{BUILDROOT}/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/shutdown.target shutdown.target
94 cd %{BUILDROOT}/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/sockets.target sockets.target
95 cd %{BUILDROOT}/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/sound.target sound.target
96 cd %{BUILDROOT}/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/swap.target swap.target
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
112 %{name}-units=%{thisver}
117 prerequires += authconfig
121 # Generate Machine ID.
122 /bin/systemd-machine-id-setup > /dev/null 2>&1 || :
124 # Reexec systemd daemon.
125 /bin/systemctl daemon-reexec > /dev/null 2>&1 || :
127 # Make sure pam_systemd is enabled
128 if ! /bin/grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
129 /usr/sbin/authconfig --update --nostart >/dev/null 2>&1 || :
132 /bin/grep -q pam_systemd /etc/pam.d/system-auth-ac || /usr/sbin/authconfig --updateall --nostart >/dev/null 2>&1 || :
137 # Restart login service after update
138 /bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
142 # Package information for systemd-units
143 package %{name}-units
144 summary = Configuration files, directories and installation tool for systemd.
146 This package contains all needed configuration files, directories
147 and installation / configuration tool for systemd.
153 /etc/bash_completion.d/systemctl-bash-completion.sh
156 /bin/systemd-tmpfiles
157 /usr/share/man/man1/systemctl.*
161 # Enable default services.
164 remote-fs.target > /dev/null 2>&1 || :
168 # Disable default services.
171 remote-fs.target > /dev/null 2>&1 || :
175 # Reload service files
176 systemctl daemon-reload > /dev/null 2>&1 || :
180 package %{name}-devel