]>
Commit | Line | Data |
---|---|---|
c8ef6def | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
c8ef6def SS |
4 | ############################################################################### |
5 | ||
802ea3af | 6 | name = systemd |
2d01364a SS |
7 | version = 185 |
8 | release = 1 | |
c8ef6def | 9 | |
802ea3af MT |
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. | |
c8ef6def | 15 | |
802ea3af MT |
16 | description |
17 | systemd is a system and service manager for Linux, compatible with | |
c8ef6def | 18 | SysV and LSB init scripts. |
802ea3af MT |
19 | end |
20 | ||
5e38e9bb | 21 | source_dl = http://cgit.freedesktop.org/systemd/systemd/snapshot/ |
802ea3af MT |
22 | |
23 | build | |
6793fec1 MT |
24 | unitdir = %{prefix}/lib/systemd/system |
25 | ||
802ea3af MT |
26 | requires |
27 | audit-devel | |
28 | automake | |
29 | autoconf | |
2d01364a | 30 | cryptsetup-luks-devel >= 1.4.2 |
802ea3af | 31 | dbus-devel |
fe6e3719 SS |
32 | docbook-utils |
33 | docbook-xsl | |
bfabb323 | 34 | gettext-devel |
2d01364a SS |
35 | glib2-devel |
36 | gobject-introspection-devel >= 1.31 | |
37 | gperf | |
38 | hwdata | |
802ea3af | 39 | intltool |
6793fec1 | 40 | kmod-devel >= 5 |
2a824e90 | 41 | libacl-devel |
2d01364a | 42 | libblkid-devel |
802ea3af MT |
43 | libcap-devel |
44 | libselinux-devel | |
45 | libtool | |
802ea3af | 46 | pam-devel |
2d01364a SS |
47 | pciutils-devel |
48 | usbutils | |
53a325cb | 49 | vala |
6793fec1 | 50 | xz-devel |
802ea3af MT |
51 | end |
52 | ||
53 | configure_options += \ | |
2d01364a SS |
54 | --with-distro=ipfire \ |
55 | --disable-static | |
802ea3af MT |
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. | |
6793fec1 MT |
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 | |
802ea3af MT |
74 | |
75 | # Create empty machine-id file. | |
76 | touch %{BUILDROOT}/etc/machine-id | |
77 | ||
78 | # Copy locale and console settings | |
6793fec1 MT |
79 | mkdir -pv %{BUILDROOT}%{sysconfdir} |
80 | cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir} | |
802ea3af MT |
81 | |
82 | # Recreate all targets | |
0976fbe4 SS |
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 | |
6793fec1 | 87 | done |
802ea3af MT |
88 | |
89 | # Remove runlevel targets and graphical.target | |
6793fec1 MT |
90 | rm -rfv %{BUILDROOT}%{unitdir}/runlevel* |
91 | rm -rfv %{BUILDROOT}%{unitdir}/graphical.target | |
802ea3af | 92 | |
2d01364a SS |
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 | ||
802ea3af | 97 | # Set default target to multi-user |
6793fec1 | 98 | ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target |
802ea3af MT |
99 | |
100 | # Replace absolute symlinks by relative ones. | |
6793fec1 MT |
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 | ||
802ea3af MT |
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} | |
2d01364a SS |
116 | groups += Base |
117 | ||
6793fec1 MT |
118 | prerequires += authconfig |
119 | ||
514357ad SS |
120 | requires |
121 | dbus | |
2d01364a | 122 | hwdata |
514357ad | 123 | python-cairo |
1d40b321 | 124 | python-dbus |
214d8f27 | 125 | %{name}-units=%{thisver} |
514357ad SS |
126 | util-linux>=2.19 |
127 | end | |
1d40b321 | 128 | |
216fde50 SS |
129 | provides |
130 | /bin/systemd | |
131 | /sbin/halt | |
132 | /sbin/init | |
133 | /sbin/poweroff | |
134 | /sbin/reboot | |
135 | /sbin/shutdown | |
2d01364a SS |
136 | |
137 | udev = %{thisver} | |
216fde50 SS |
138 | end |
139 | ||
6793fec1 | 140 | conflicts |
2d01364a | 141 | dracut < 019 |
6793fec1 MT |
142 | filesystem < 002 |
143 | upstart | |
144 | end | |
ef438375 | 145 | |
2d01364a SS |
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 | ||
1d40b321 SS |
169 | script postin |
170 | # Generate Machine ID. | |
6793fec1 | 171 | /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || : |
1d40b321 SS |
172 | |
173 | # Reexec systemd daemon. | |
6793fec1 | 174 | /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || : |
1d40b321 SS |
175 | |
176 | # Make sure pam_systemd is enabled | |
6793fec1 MT |
177 | if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then |
178 | authconfig --update --nostart >/dev/null 2>&1 || : | |
1d40b321 SS |
179 | |
180 | # Try harder | |
6793fec1 | 181 | grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || : |
1d40b321 | 182 | fi |
5e462903 MT |
183 | |
184 | /usr/bin/systemctl enable \ | |
185 | getty@.service \ | |
50affca1 | 186 | remote-fs.target \ |
5e462903 MT |
187 | systemd-readahead-replay.service \ |
188 | systemd-readahead-collect.service \ | |
189 | >/dev/null 2>&1 || : | |
1d40b321 SS |
190 | end |
191 | ||
2d01364a SS |
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 | ||
1d40b321 SS |
198 | script postup |
199 | # Restart login service after update | |
5e462903 | 200 | /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : |
6793fec1 | 201 | /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || : |
1d40b321 | 202 | end |
2d01364a SS |
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 | |
802ea3af | 208 | end |
1f9bc2f0 | 209 | |
802ea3af MT |
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 | |
1f9bc2f0 | 217 | |
5e38e9bb SS |
218 | prerequires |
219 | /bin/sh | |
220 | coreutils | |
221 | end | |
222 | ||
6793fec1 | 223 | provides |
802ea3af | 224 | /bin/systemctl |
802ea3af | 225 | end |
1d40b321 | 226 | |
6793fec1 MT |
227 | conflicts |
228 | filesystem < 002 | |
1d40b321 SS |
229 | end |
230 | ||
6793fec1 MT |
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.* | |
1d40b321 SS |
239 | end |
240 | ||
241 | script postup | |
242 | # Reload service files | |
6793fec1 | 243 | /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || : |
1d40b321 | 244 | end |
802ea3af | 245 | end |
1f9bc2f0 | 246 | |
802ea3af MT |
247 | package %{name}-devel |
248 | template DEVEL | |
6793fec1 MT |
249 | |
250 | files += %{prefix}/lib/pakfire/macros/ | |
802ea3af | 251 | end |
1f9bc2f0 | 252 | |
2d01364a SS |
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/gudev* | |
286 | %{includedir}/gudev* | |
287 | %{datadir}/gir-* | |
288 | %{datadir}/gtk-doc/html/gudev | |
289 | end | |
290 | end | |
291 | ||
1f9bc2f0 MT |
292 | package %{name}-debuginfo |
293 | template DEBUGINFO | |
294 | end | |
802ea3af | 295 | end |