]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - systemd/systemd.nm
Merge remote-tracking branch 'stevee/plymouth'
[people/ms/ipfire-3.x.git] / systemd / systemd.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = systemd
7 version = 185
8 release = 3
9
10 maintainer = Stefan Schantl <stefan.schantl@ipfire.org>
11 groups = System/Base
12 url = http://www.freedesktop.org/wiki/Software/systemd
13 license = GPLv2+
14 summary = A System and Service Manager.
15
16 description
17 systemd is a system and service manager for Linux, compatible with
18 SysV and LSB init scripts.
19 end
20
21 source_dl = http://cgit.freedesktop.org/systemd/systemd/snapshot/
22
23 build
24 unitdir = %{prefix}/lib/systemd/system
25
26 requires
27 audit-devel
28 automake
29 autoconf
30 cryptsetup-luks-devel >= 1.4.2
31 dbus-devel
32 docbook-utils
33 docbook-xsl
34 gettext-devel
35 glib2-devel
36 gobject-introspection-devel >= 1.31
37 gperf
38 hwdata
39 intltool
40 kmod-devel >= 5
41 libacl-devel
42 libblkid-devel
43 libcap-devel
44 libselinux-devel
45 libtool
46 pam-devel
47 pciutils-devel
48 usbutils
49 vala
50 xz-devel
51 end
52
53 configure_options += \
54 --with-distro=ipfire \
55 --disable-static
56
57 prepare_cmds
58 ./autogen.sh ac
59 end
60
61 test
62 make check
63 end
64
65 install_cmds
66 # Create sysv compatible symlinks.
67 mkdir -pv %{BUILDROOT}%{sbindir}
68 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init
69 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd
70 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot
71 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt
72 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff
73 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown
74
75 # Create empty machine-id file.
76 touch %{BUILDROOT}/etc/machine-id
77
78 # Copy locale and console settings
79 mkdir -pv %{BUILDROOT}%{sysconfdir}
80 cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir}
81
82 # Recreate all targets
83 rm -rfv %{BUILDROOT}/%{sysconfdir}/systemd/system/*.target.wants
84 for i in basic.target.wants default.target.wants dbus.target.wants getty.target.wants \
85 multi-user.target.wants syslog.target.wants; do
86 mkdir -pv %{BUILDROOT}/%{sysconfdir}/systemd/system/${i} || exit 1
87 done
88
89 # Remove runlevel targets and graphical.target
90 rm -rfv %{BUILDROOT}%{unitdir}/runlevel*
91 rm -rfv %{BUILDROOT}%{unitdir}/graphical.target
92
93 # Remove service files for utmp update.
94 rm -rvf %{BUILDROOT}%{unitdir}/systemd-update-utmp-*.service
95 rm -rvf %{BUILDROOT}%{unitdir}/shutdown.target.wants/systemd-update-utmp-*.service
96
97 # Set default target to multi-user
98 ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target
99
100 # Replace absolute symlinks by relative ones.
101 cd %{BUILDROOT}%{unitdir}/../user
102 for i in bluetooth local-fs printer remote-fs shutdown sockets sound swap; do
103 ln -svf ../system/${i}.target ${i}.target || exit 1
104 done
105
106 # Remove tmpfile for X11
107 rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf
108
109 # Remove unneeded symlink for xdg
110 rm -rfv %{BUILDROOT}/etc/xdg/systemd
111 end
112 end
113
114 packages
115 package %{name}
116 groups += Base
117
118 prerequires += authconfig
119
120 requires
121 dbus
122 hwdata
123 python-cairo
124 python-dbus
125 %{name}-units=%{thisver}
126 util-linux>=2.19
127 end
128
129 provides
130 /bin/systemd
131 /sbin/halt
132 /sbin/init
133 /sbin/poweroff
134 /sbin/reboot
135 /sbin/shutdown
136
137 udev = %{thisver}
138 end
139
140 conflicts
141 dracut < 019
142 filesystem < 002
143 upstart
144 end
145
146 obsoletes
147 udev < 183
148 end
149
150 configfiles
151 /etc/locale.conf
152 /etc/machine-id
153 /etc/systemd/journald.conf
154 /etc/systemd/logind.conf
155 /etc/systemd/system.conf
156 /etc/systemd/user.conf
157 /etc/udev/udev.conf
158 /etc/vconsole.conf
159 end
160
161 script prein
162 # Create groups for udev.
163 getent group cdrom >/dev/null || groupadd -g 11 cdrom || :
164 getent group tape >/dev/null || groupadd -g 33 tape || :
165 getent group dialout >/dev/null || groupadd -g 18 dialout || :
166 getent group floppy >/dev/null || groupadd -g 19 floppy || :
167 end
168
169 script postin
170 # Generate Machine ID.
171 /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || :
172
173 # Reexec systemd daemon.
174 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
175
176 # Make sure pam_systemd is enabled
177 if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
178 authconfig --update --nostart >/dev/null 2>&1 || :
179
180 # Try harder
181 grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || :
182 fi
183
184 /usr/bin/systemctl enable \
185 getty@.service \
186 remote-fs.target \
187 systemd-readahead-replay.service \
188 systemd-readahead-collect.service \
189 >/dev/null 2>&1 || :
190 end
191
192 script preup
193 # Be sure to stop the old udev before updating.
194 /usr/bin/systemctl stop udev.service udev-trigger.service \
195 udev-control.socket udev-kernel.socket >/dev/null 2>&1 || :
196 end
197
198 script postup
199 # Restart login service after update
200 /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
201 /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
202 end
203
204 # Be sure to start the new udev after everything is done.
205 script posttransup
206 /usr/bin/systemctl start systemd-udev.service >/dev/null 2>&1 || :
207 end
208 end
209
210 # Package information for systemd-units
211 package %{name}-units
212 summary = Configuration files, directories and installation tool for systemd.
213 description
214 This package contains all needed configuration files, directories
215 and installation / configuration tool for systemd.
216 end
217
218 prerequires
219 /bin/sh
220 coreutils
221 end
222
223 provides
224 /bin/systemctl
225 end
226
227 conflicts
228 filesystem < 002
229 end
230
231 files
232 %{sysconfdir}/etc/systemd/system
233 %{sysconfdir}/tmpfiles.d
234 %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh
235 %{unitdir}
236 %{bindir}/systemctl
237 %{bindir}/systemd-tmpfiles
238 %{mandir}/man1/systemctl.*
239 end
240
241 script postup
242 # Reload service files
243 /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || :
244 end
245 end
246
247 package %{name}-devel
248 template DEVEL
249
250 files += %{prefix}/lib/pakfire/macros/
251 end
252
253 package libudev
254 summary = Libraries for adding libudev support to applications.
255 description
256 This package contains the libraries that make it easier to use libudev
257 functionality from applications.
258 end
259 license = LGPLv2+
260
261 conflicts
262 filesystem < 002
263 end
264
265 files
266 %{libdir}/libgudev*.so.*
267 %{libidr}/girepository*/
268 end
269 end
270
271 package libudev-devel
272 summary = Header files for adding libudev support to applications.
273 description
274 This package contains the header and pkg-config files for developing
275 applications using libudev functionality.
276 end
277 license = LGPLv2+
278
279 conflicts
280 filesystem < 002
281 end
282
283 files
284 %{libdir}/libgudev*.so
285 %{libdir}/pkgconfig/lib*udev.pc
286 %{libdir}/pkgconfig/gudev*
287 %{includedir}/gudev*
288 %{datadir}/gir-*
289 %{datadir}/gtk-doc/html/gudev
290 end
291 end
292
293 package %{name}-debuginfo
294 template DEBUGINFO
295 end
296 end