]>
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 |
e633b4ff | 7 | version = 187 |
a8aa3ead | 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 | ||
802ea3af MT |
61 | install_cmds |
62 | # Create sysv compatible symlinks. | |
6793fec1 MT |
63 | mkdir -pv %{BUILDROOT}%{sbindir} |
64 | ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init | |
65 | ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd | |
66 | ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot | |
67 | ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt | |
68 | ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff | |
69 | ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown | |
802ea3af MT |
70 | |
71 | # Create empty machine-id file. | |
72 | touch %{BUILDROOT}/etc/machine-id | |
73 | ||
74 | # Copy locale and console settings | |
6793fec1 MT |
75 | mkdir -pv %{BUILDROOT}%{sysconfdir} |
76 | cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir} | |
802ea3af MT |
77 | |
78 | # Recreate all targets | |
0976fbe4 SS |
79 | rm -rfv %{BUILDROOT}/%{sysconfdir}/systemd/system/*.target.wants |
80 | for i in basic.target.wants default.target.wants dbus.target.wants getty.target.wants \ | |
81 | multi-user.target.wants syslog.target.wants; do | |
82 | mkdir -pv %{BUILDROOT}/%{sysconfdir}/systemd/system/${i} || exit 1 | |
6793fec1 | 83 | done |
802ea3af MT |
84 | |
85 | # Remove runlevel targets and graphical.target | |
6793fec1 MT |
86 | rm -rfv %{BUILDROOT}%{unitdir}/runlevel* |
87 | rm -rfv %{BUILDROOT}%{unitdir}/graphical.target | |
802ea3af | 88 | |
2d01364a SS |
89 | # Remove service files for utmp update. |
90 | rm -rvf %{BUILDROOT}%{unitdir}/systemd-update-utmp-*.service | |
91 | rm -rvf %{BUILDROOT}%{unitdir}/shutdown.target.wants/systemd-update-utmp-*.service | |
92 | ||
802ea3af | 93 | # Set default target to multi-user |
6793fec1 | 94 | ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target |
802ea3af MT |
95 | |
96 | # Replace absolute symlinks by relative ones. | |
6793fec1 MT |
97 | cd %{BUILDROOT}%{unitdir}/../user |
98 | for i in bluetooth local-fs printer remote-fs shutdown sockets sound swap; do | |
99 | ln -svf ../system/${i}.target ${i}.target || exit 1 | |
100 | done | |
101 | ||
802ea3af MT |
102 | # Remove tmpfile for X11 |
103 | rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf | |
104 | ||
105 | # Remove unneeded symlink for xdg | |
106 | rm -rfv %{BUILDROOT}/etc/xdg/systemd | |
107 | end | |
108 | end | |
109 | ||
110 | packages | |
111 | package %{name} | |
2d01364a SS |
112 | groups += Base |
113 | ||
6793fec1 MT |
114 | prerequires += authconfig |
115 | ||
514357ad SS |
116 | requires |
117 | dbus | |
2d01364a | 118 | hwdata |
514357ad | 119 | python-cairo |
1d40b321 | 120 | python-dbus |
214d8f27 | 121 | %{name}-units=%{thisver} |
514357ad SS |
122 | util-linux>=2.19 |
123 | end | |
1d40b321 | 124 | |
216fde50 SS |
125 | provides |
126 | /bin/systemd | |
127 | /sbin/halt | |
128 | /sbin/init | |
129 | /sbin/poweroff | |
130 | /sbin/reboot | |
131 | /sbin/shutdown | |
2d01364a SS |
132 | |
133 | udev = %{thisver} | |
216fde50 SS |
134 | end |
135 | ||
6793fec1 | 136 | conflicts |
2d01364a | 137 | dracut < 019 |
6793fec1 MT |
138 | filesystem < 002 |
139 | upstart | |
140 | end | |
ef438375 | 141 | |
2d01364a SS |
142 | obsoletes |
143 | udev < 183 | |
144 | end | |
145 | ||
146 | configfiles | |
147 | /etc/locale.conf | |
148 | /etc/machine-id | |
149 | /etc/systemd/journald.conf | |
150 | /etc/systemd/logind.conf | |
151 | /etc/systemd/system.conf | |
152 | /etc/systemd/user.conf | |
153 | /etc/udev/udev.conf | |
154 | /etc/vconsole.conf | |
155 | end | |
156 | ||
157 | script prein | |
158 | # Create groups for udev. | |
159 | getent group cdrom >/dev/null || groupadd -g 11 cdrom || : | |
160 | getent group tape >/dev/null || groupadd -g 33 tape || : | |
161 | getent group dialout >/dev/null || groupadd -g 18 dialout || : | |
162 | getent group floppy >/dev/null || groupadd -g 19 floppy || : | |
163 | end | |
164 | ||
1d40b321 SS |
165 | script postin |
166 | # Generate Machine ID. | |
6793fec1 | 167 | /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || : |
1d40b321 SS |
168 | |
169 | # Reexec systemd daemon. | |
6793fec1 | 170 | /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || : |
1d40b321 SS |
171 | |
172 | # Make sure pam_systemd is enabled | |
6793fec1 MT |
173 | if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then |
174 | authconfig --update --nostart >/dev/null 2>&1 || : | |
1d40b321 SS |
175 | |
176 | # Try harder | |
6793fec1 | 177 | grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || : |
1d40b321 | 178 | fi |
5e462903 MT |
179 | |
180 | /usr/bin/systemctl enable \ | |
181 | getty@.service \ | |
50affca1 | 182 | remote-fs.target \ |
5e462903 MT |
183 | systemd-readahead-replay.service \ |
184 | systemd-readahead-collect.service \ | |
185 | >/dev/null 2>&1 || : | |
1d40b321 SS |
186 | end |
187 | ||
2d01364a SS |
188 | script preup |
189 | # Be sure to stop the old udev before updating. | |
190 | /usr/bin/systemctl stop udev.service udev-trigger.service \ | |
191 | udev-control.socket udev-kernel.socket >/dev/null 2>&1 || : | |
192 | end | |
193 | ||
1d40b321 SS |
194 | script postup |
195 | # Restart login service after update | |
5e462903 | 196 | /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : |
6793fec1 | 197 | /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || : |
1d40b321 | 198 | end |
2d01364a SS |
199 | |
200 | # Be sure to start the new udev after everything is done. | |
201 | script posttransup | |
202 | /usr/bin/systemctl start systemd-udev.service >/dev/null 2>&1 || : | |
203 | end | |
802ea3af | 204 | end |
1f9bc2f0 | 205 | |
802ea3af MT |
206 | # Package information for systemd-units |
207 | package %{name}-units | |
208 | summary = Configuration files, directories and installation tool for systemd. | |
209 | description | |
210 | This package contains all needed configuration files, directories | |
211 | and installation / configuration tool for systemd. | |
212 | end | |
1f9bc2f0 | 213 | |
5e38e9bb SS |
214 | prerequires |
215 | /bin/sh | |
216 | coreutils | |
217 | end | |
218 | ||
6793fec1 | 219 | provides |
802ea3af | 220 | /bin/systemctl |
802ea3af | 221 | end |
1d40b321 | 222 | |
6793fec1 MT |
223 | conflicts |
224 | filesystem < 002 | |
1d40b321 SS |
225 | end |
226 | ||
6793fec1 MT |
227 | files |
228 | %{sysconfdir}/etc/systemd/system | |
229 | %{sysconfdir}/tmpfiles.d | |
230 | %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh | |
231 | %{unitdir} | |
232 | %{bindir}/systemctl | |
233 | %{bindir}/systemd-tmpfiles | |
234 | %{mandir}/man1/systemctl.* | |
1d40b321 SS |
235 | end |
236 | ||
237 | script postup | |
238 | # Reload service files | |
6793fec1 | 239 | /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || : |
1d40b321 | 240 | end |
802ea3af | 241 | end |
1f9bc2f0 | 242 | |
802ea3af MT |
243 | package %{name}-devel |
244 | template DEVEL | |
6793fec1 MT |
245 | |
246 | files += %{prefix}/lib/pakfire/macros/ | |
802ea3af | 247 | end |
1f9bc2f0 | 248 | |
2d01364a SS |
249 | package libudev |
250 | summary = Libraries for adding libudev support to applications. | |
251 | description | |
252 | This package contains the libraries that make it easier to use libudev | |
253 | functionality from applications. | |
254 | end | |
255 | license = LGPLv2+ | |
256 | ||
257 | conflicts | |
258 | filesystem < 002 | |
259 | end | |
260 | ||
261 | files | |
262 | %{libdir}/libgudev*.so.* | |
263 | %{libidr}/girepository*/ | |
264 | end | |
265 | end | |
266 | ||
267 | package libudev-devel | |
268 | summary = Header files for adding libudev support to applications. | |
269 | description | |
270 | This package contains the header and pkg-config files for developing | |
271 | applications using libudev functionality. | |
272 | end | |
273 | license = LGPLv2+ | |
274 | ||
275 | conflicts | |
276 | filesystem < 002 | |
277 | end | |
278 | ||
279 | files | |
a8aa3ead | 280 | %{libdir}/lib*udev*.so |
73eb4724 | 281 | %{libdir}/pkgconfig/lib*udev.pc |
2d01364a | 282 | %{libdir}/pkgconfig/gudev* |
a8aa3ead | 283 | %{includedir}/lib*udev.h |
2d01364a SS |
284 | %{includedir}/gudev* |
285 | %{datadir}/gir-* | |
286 | %{datadir}/gtk-doc/html/gudev | |
287 | end | |
288 | end | |
289 | ||
1f9bc2f0 MT |
290 | package %{name}-debuginfo |
291 | template DEBUGINFO | |
292 | end | |
802ea3af | 293 | end |