]>
Commit | Line | Data |
---|---|---|
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 = 44 | |
8 | release = 2 | |
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 | |
31 | dbus-devel | |
32 | docbook-utils | |
33 | docbook-xsl | |
34 | gperf | |
35 | gettext-devel | |
36 | intltool | |
37 | kmod-devel >= 5 | |
38 | libacl-devel | |
39 | libcap-devel | |
40 | libselinux-devel | |
41 | libtool | |
42 | libudev-devel >= 172 | |
43 | pam-devel | |
44 | vala | |
45 | xz-devel | |
46 | end | |
47 | ||
48 | configure_options += \ | |
49 | --libexecdir=%{libdir} \ | |
50 | --with-distro=ipfire | |
51 | ||
52 | prepare_cmds | |
53 | ./autogen.sh ac | |
54 | end | |
55 | ||
56 | test | |
57 | make check | |
58 | end | |
59 | ||
60 | install_cmds | |
61 | # Create sysv compatible symlinks. | |
62 | mkdir -pv %{BUILDROOT}%{sbindir} | |
63 | ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init | |
64 | ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd | |
65 | ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot | |
66 | ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt | |
67 | ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff | |
68 | ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown | |
69 | ||
70 | # Create empty machine-id file. | |
71 | touch %{BUILDROOT}/etc/machine-id | |
72 | ||
73 | # Copy locale and console settings | |
74 | mkdir -pv %{BUILDROOT}%{sysconfdir} | |
75 | cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir} | |
76 | ||
77 | # Recreate all targets | |
78 | rm -rfv %{BUILDROOT}%{unitdir}/*.target.wants | |
79 | for i in basic.target.wants default.target.wants dbus.target.wants syslog.target.wants; do | |
80 | mkdir -pv %{BUILDROOT}%{unitdir}/${i} || exit 1 | |
81 | done | |
82 | ||
83 | # Remove runlevel targets and graphical.target | |
84 | rm -rfv %{BUILDROOT}%{unitdir}/runlevel* | |
85 | rm -rfv %{BUILDROOT}%{unitdir}/graphical.target | |
86 | ||
87 | # Set default target to multi-user | |
88 | ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target | |
89 | ||
90 | # Replace absolute symlinks by relative ones. | |
91 | cd %{BUILDROOT}%{unitdir}/../user | |
92 | for i in bluetooth local-fs printer remote-fs shutdown sockets sound swap; do | |
93 | ln -svf ../system/${i}.target ${i}.target || exit 1 | |
94 | done | |
95 | ||
96 | # Replace absolute symlink for getty@tty1.service. | |
97 | ln -svf ../../../../%{unitdir}/getty@.service \ | |
98 | %{BUILDROOT}%{sysconfdir}/systemd/system/getty.target.wants/getty@tty1.service | |
99 | ||
100 | # Replace absolute symlink for remote-fs.target. | |
101 | ln -svf ../../../../%{unitdir}/remote-fs.target \ | |
102 | %{BUILDROOT}%{sysconfdir}/systemd/system/multi-user.target.wants/remote-fs.target | |
103 | ||
104 | # Remove tmpfile for X11 | |
105 | rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf | |
106 | ||
107 | # Remove unneeded symlink for xdg | |
108 | rm -rfv %{BUILDROOT}/etc/xdg/systemd | |
109 | end | |
110 | end | |
111 | ||
112 | packages | |
113 | package %{name} | |
114 | prerequires += authconfig | |
115 | ||
116 | requires | |
117 | dbus | |
118 | python-cairo | |
119 | python-dbus | |
120 | %{name}-units=%{thisver} | |
121 | udev>=172 | |
122 | util-linux>=2.19 | |
123 | end | |
124 | ||
125 | provides | |
126 | /bin/systemd | |
127 | /sbin/halt | |
128 | /sbin/init | |
129 | /sbin/poweroff | |
130 | /sbin/reboot | |
131 | /sbin/shutdown | |
132 | end | |
133 | ||
134 | conflicts | |
135 | filesystem < 002 | |
136 | upstart | |
137 | end | |
138 | ||
139 | script postin | |
140 | # Generate Machine ID. | |
141 | /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || : | |
142 | ||
143 | # Reexec systemd daemon. | |
144 | /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || : | |
145 | ||
146 | # Make sure pam_systemd is enabled | |
147 | if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then | |
148 | authconfig --update --nostart >/dev/null 2>&1 || : | |
149 | ||
150 | # Try harder | |
151 | grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || : | |
152 | fi | |
153 | end | |
154 | ||
155 | script postup | |
156 | # Restart login service after update | |
157 | /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || : | |
158 | end | |
159 | end | |
160 | ||
161 | # Package information for systemd-units | |
162 | package %{name}-units | |
163 | summary = Configuration files, directories and installation tool for systemd. | |
164 | description | |
165 | This package contains all needed configuration files, directories | |
166 | and installation / configuration tool for systemd. | |
167 | end | |
168 | ||
169 | prerequires | |
170 | /bin/sh | |
171 | coreutils | |
172 | end | |
173 | ||
174 | provides | |
175 | /bin/systemctl | |
176 | end | |
177 | ||
178 | conflicts | |
179 | filesystem < 002 | |
180 | end | |
181 | ||
182 | files | |
183 | %{sysconfdir}/etc/systemd/system | |
184 | %{sysconfdir}/tmpfiles.d | |
185 | %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh | |
186 | %{unitdir} | |
187 | %{bindir}/systemctl | |
188 | %{bindir}/systemd-tmpfiles | |
189 | %{mandir}/man1/systemctl.* | |
190 | end | |
191 | ||
192 | script postup | |
193 | # Reload service files | |
194 | /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || : | |
195 | end | |
196 | end | |
197 | ||
198 | package %{name}-devel | |
199 | template DEVEL | |
200 | ||
201 | files += %{prefix}/lib/pakfire/macros/ | |
202 | end | |
203 | ||
204 | package %{name}-debuginfo | |
205 | template DEBUGINFO | |
206 | end | |
207 | end |