]> git.pld-linux.org Git - packages/systemd.git/blob - systemd.spec
- updated to 26
[packages/systemd.git] / systemd.spec
1 #
2 # Conditional build:
3 %bcond_without  gtk             # build gtk tools (needs devel libnotify>=0.7 and gtk+2)
4 %bcond_without  selinux         # without SELinux support
5 %bcond_without  tcpd            # libwrap (tcp_wrappers) support
6 %bcond_without  pam             # PAM authentication support
7 %bcond_without  audit           # without audit support
8 %bcond_without  cryptsetup      # without cryptsetup support
9
10 Summary:        A System and Service Manager
11 Summary(pl.UTF-8):      systemd - zarządca systemu i usług dla Linuksa
12 Name:           systemd
13 Version:        26
14 Release:        0.1
15 License:        GPL v2+
16 Group:          Base
17 Source0:        http://www.freedesktop.org/software/systemd/%{name}-%{version}.tar.bz2
18 # Source0-md5:  b7c468aa400c64d02d533eba6359e283
19 Patch0:         target-pld.patch
20 Patch1:         pld-port.patch
21 URL:            http://www.freedesktop.org/wiki/Software/systemd
22 %{?with_audit:BuildRequires:    audit-libs-devel}
23 BuildRequires:  autoconf >= 2.63
24 BuildRequires:  automake >= 1:1.11
25 %{?with_cryptsetup:BuildRequires:       cryptsetup-luks-devel}
26 BuildRequires:  dbus-devel
27 BuildRequires:  docbook-style-xsl
28 %{?with_gtk:BuildRequires:      glib2-devel >= 1:2.26.1}
29 %{?with_gtk:BuildRequires:      gtk+2-devel >= 2:2.24.0}
30 BuildRequires:  libcap-devel
31 %{?with_gtk:BuildRequires:      libnotify-devel >= 0.7.0}
32 %{?with_selinux:BuildRequires:  libselinux-devel}
33 BuildRequires:  libtool >= 2:2.2
34 %{?with_tcpd:BuildRequires:     libwrap-devel}
35 BuildRequires:  m4
36 BuildRequires:  libxslt-progs
37 %{?with_pam:BuildRequires:      pam-devel}
38 BuildRequires:  pkgconfig
39 BuildRequires:  rpmbuild(macros) >= 1.527
40 BuildRequires:  udev-devel >= 160
41 BuildRequires:  vala >= 0.10.0
42 Requires:       %{name}-units = %{version}-%{release}
43 Requires:       dbus >= 1.3.2
44 Requires:       rc-scripts
45 Requires:       udev-core >= 160
46 Provides:       SysVinit = 2.86-23
47 Provides:       readahead = 1:1.5.7-3
48 Provides:       virtual(init-daemon)
49 Obsoletes:      SysVinit < 2.86-23
50 Obsoletes:      readahead < 1:1.5.7-3
51 Obsoletes:      virtual(init-daemon)
52 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53
54 %description
55 systemd is a system and service manager for Linux, compatible with
56 SysV and LSB init scripts. systemd provides aggressive parallelization
57 capabilities, uses socket and D-Bus activation for starting services,
58 offers on-demand starting of daemons, keeps track of processes using
59 Linux cgroups, supports snapshotting and restoring of the system
60 state, maintains mount and automount points and implements an
61 elaborate transactional dependency-based service control logic. It can
62 work as a drop-in replacement for sysvinit.
63
64 %description -l pl.UTF-8
65 systemd jest zarządcą systemu i usług dla Linuksa, kompatybilny ze
66 skryptami SysV i LSB. systemd udostępnia rozbudowane zdolności
67 paralelizacji, do uruchamiania usług używa socketów oraz D-Busa,
68 oferuje uruchamianie usług na życzenie, monitoruje procesy używając
69 linuksowych cgroups, wspomaga zapisywanie (snapshot) i odczytywanie
70 (restore) stanu systemu, zarządza (auto)mount pointami oraz
71 implementuje starannie opracowaną transakcjonalną, bazującą na
72 zależnościach logikę kontroli usług. Może pracować jako zastępca dla
73 sysvinit.
74
75 %package units
76 Summary:        Configuration files, directories and installation tool for systemd
77 Group:          Base
78 Requires:       pkgconfig
79 Requires(post): coreutils
80 Requires(post): gawk
81
82 %description units
83 Basic configuration files, directories and installation tool for the
84 systemd system and service manager.
85
86 %package gtk
87 Summary:        Graphical frontend for systemd
88 Group:          Base
89 Requires:       %{name} = %{version}-%{release}
90 Requires:       polkit
91
92 %description gtk
93 Graphical front-end for systemd.
94
95 %package -n bash-completion-systemd
96 Summary:        bash-completion for systemd
97 Group:          Applications/Shells
98 Requires:       %{name}
99 Requires:       bash-completion
100
101 %description -n bash-completion-systemd
102 bash-completion for systemd.
103
104 %prep
105 %setup -q
106 %patch0 -p1
107 %patch1 -p1
108
109 %build
110 %{__aclocal} -I m4
111 %{__autoconf}
112 %{__autoheader}
113 %{__automake}
114 %configure \
115         %{__enable_disable audit} \
116         %{__enable_disable cryptsetup libcryptsetup} \
117         %{__enable_disable gtk} \
118         %{__enable_disable pam} \
119         %{__enable_disable selinux} \
120         %{__enable_disable tcpd tcpwrap} \
121         --disable-silent-rules \
122         --with-distro=pld \
123         --with-rootdir=
124
125 %{__make}
126
127 %install
128 rm -rf $RPM_BUILD_ROOT
129 %{__make} install \
130         DESTDIR=$RPM_BUILD_ROOT
131
132 find $RPM_BUILD_ROOT '(' -name '*.a' -o -name '*.la' ')' | xargs -r rm -v
133
134 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
135
136 # no -devel (yet)
137 rm -f $RPM_BUILD_ROOT%{_npkgconfigdir}/systemd.pc
138
139 %if %{without gtk}
140 # to shut up check-files
141 rm -f $RPM_BUILD_ROOT%{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy
142 rm -f $RPM_BUILD_ROOT%{_bindir}/systemadm
143 rm -f $RPM_BUILD_ROOT%{_bindir}/systemd-gnome-ask-password-agent
144 rm -f $RPM_BUILD_ROOT%{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy
145 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/systemadm.1*
146 %endif
147
148 # Create SysV compatibility symlinks. systemctl/systemd are smart
149 # enough to detect in which way they are called.
150 install -d $RPM_BUILD_ROOT/sbin
151 ln -s ../bin/systemd $RPM_BUILD_ROOT/sbin/init
152 ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/reboot
153 ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/halt
154 ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/poweroff
155 ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/shutdown
156 ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/telinit
157 ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/runlevel
158
159 # We create all wants links manually at installation time to make sure
160 # they are not owned and hence overriden by rpm after the used deleted
161 # them.
162 rm -r $RPM_BUILD_ROOT%{_sysconfdir}/systemd/system/*.target.wants
163
164 %clean
165 rm -rf $RPM_BUILD_ROOT
166
167 %post
168 /bin/systemctl daemon-reexec > /dev/null 2>&1 || :
169
170 %post units
171 if [ $1 -ne 1 ]; then
172         exit 0
173 fi
174
175 # Try to read default runlevel from the old inittab if it exists
176 runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null)
177 if [ -z "$runlevel" ] ; then
178         runlevel=3
179 fi
180 target="/lib/systemd/system/runlevel$runlevel.target"
181
182 # And symlink what we found to the new-style default.target
183 ln -sf "$target" %{_sysconfdir}/systemd/system/default.target > /dev/null 2>&1 || :
184 #/bin/systemctl enable SERVICES > /dev/null 2>&1 || :
185
186 %preun units
187 if [ $1 -ne 0 ]; then
188         exit 0
189 fi
190 #/bin/systemctl disable SERVICES > /dev/null 2>&1 || :
191 rm -f %{_sysconfdir}/systemd/system/default.target > /dev/null 2>&1 || :
192
193 %postun
194 if [ $1 -ge 1 ] ; then
195         /bin/systemctl daemon-reload > /dev/null 2>&1 || :
196 fi
197
198 %files
199 %defattr(644,root,root,755)
200 %doc DISTRO_PORTING README TODO
201 /etc/dbus-1/system.d/org.freedesktop.hostname1.conf
202 /etc/dbus-1/system.d/org.freedesktop.systemd1.conf
203 %dir %{_sysconfdir}/systemd
204 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/systemd/system.conf
205 %dir /etc/xdg/systemd
206 /etc/xdg/systemd/user
207 %attr(755,root,root) /bin/systemd
208 %attr(755,root,root) /bin/systemd-ask-password
209 %attr(755,root,root) /bin/systemd-machine-id-setup
210 %attr(755,root,root) /bin/systemd-notify
211 %attr(755,root,root) /bin/systemd-tty-ask-password-agent
212 %attr(755,root,root) %{_bindir}/systemd-cgls
213 %attr(755,root,root) %{_bindir}/systemd-analyze
214 %attr(755,root,root) %{_bindir}/systemd-nspawn
215 %attr(755,root,root) %{_bindir}/systemd-stdio-bridge
216 %attr(755,root,root) /sbin/halt
217 %attr(755,root,root) /sbin/init
218 %attr(755,root,root) /sbin/poweroff
219 %attr(755,root,root) /sbin/reboot
220 %attr(755,root,root) /sbin/runlevel
221 %attr(755,root,root) /sbin/shutdown
222 %attr(755,root,root) /sbin/telinit
223 %dir /lib/systemd
224 /lib/systemd/systemd-*
225 %dir %{_libdir}/systemd
226 %{_libdir}/systemd/user
227 %dir %{_libdir}/systemd/user-generators
228 %dir /lib/systemd/system-generators
229 /lib/systemd/system-generators/systemd-getty-generator
230 /lib/udev/rules.d/99-systemd.rules
231 %{_prefix}/lib/tmpfiles.d/legacy.conf
232 %{_prefix}/lib/tmpfiles.d/systemd.conf
233 %{_prefix}/lib/tmpfiles.d/x11.conf
234 %{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.*.xml
235 %{_datadir}/dbus-1/services/org.freedesktop.systemd1.service
236 %{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service
237 %{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service
238 %{_datadir}/polkit-1/actions/org.freedesktop.hostname1.policy
239 %{_mandir}/man1/init.1
240 %{_mandir}/man1/systemd.1*
241 %{_mandir}/man1/systemd-ask-password.1*
242 %{_mandir}/man1/systemd-cgls.1*
243 %{_mandir}/man1/systemd-notify.1*
244 %{_mandir}/man1/systemd-nspawn.1*
245 %{_mandir}/man3/sd_booted.3*
246 %{_mandir}/man3/sd_is_fifo.3*
247 %{_mandir}/man3/sd_is_socket.3
248 %{_mandir}/man3/sd_is_socket_inet.3
249 %{_mandir}/man3/sd_is_socket_unix.3
250 %{_mandir}/man3/sd_listen_fds.3*
251 %{_mandir}/man3/sd_notify.3*
252 %{_mandir}/man3/sd_notifyf.3
253 %{_mandir}/man3/sd_readahead.3*
254 %{_mandir}/man5/binfmt.d.5*
255 %{_mandir}/man5/hostname.5*
256 %{_mandir}/man5/locale.conf.5*
257 %{_mandir}/man5/machine-id.5*
258 %{_mandir}/man5/machine-info.5*
259 %{_mandir}/man5/modules-load.d.5*
260 %{_mandir}/man5/os-release.5*
261 %{_mandir}/man5/sysctl.d.5*
262 %{_mandir}/man5/systemd.automount.5*
263 %{_mandir}/man5/systemd.conf.5*
264 %{_mandir}/man5/systemd.device.5*
265 %{_mandir}/man5/systemd.exec.5*
266 %{_mandir}/man5/systemd.mount.5*
267 %{_mandir}/man5/systemd.path.5*
268 %{_mandir}/man5/systemd.service.5*
269 %{_mandir}/man5/systemd.snapshot.5*
270 %{_mandir}/man5/systemd.socket.5*
271 %{_mandir}/man5/systemd.swap.5*
272 %{_mandir}/man5/systemd.target.5*
273 %{_mandir}/man5/systemd.timer.5*
274 %{_mandir}/man5/systemd.unit.5*
275 %{_mandir}/man5/vconsole.conf.5*
276 %{_mandir}/man7/daemon.7*
277 %{_mandir}/man7/sd-daemon.7*
278 %{_mandir}/man7/sd-readahead.7*
279 %{_mandir}/man7/systemd.special.7*
280 %{_mandir}/man8/halt.8*
281 %{_mandir}/man8/poweroff.8
282 %{_mandir}/man8/reboot.8
283 %{_mandir}/man8/runlevel.8*
284 %{_mandir}/man8/shutdown.8*
285 %{_mandir}/man8/telinit.8*
286
287 %if %{with cryptsetup}
288 /lib/systemd/system-generators/systemd-cryptsetup-generator
289 %endif
290
291 %if %{with pam}
292 %attr(755,root,root) /%{_lib}/security/pam_systemd.so
293 %{_mandir}/man8/pam_systemd.8*
294 %endif
295
296 %files units
297 %defattr(644,root,root,755)
298 %dir %{_sysconfdir}/systemd
299 %dir %{_sysconfdir}/systemd/system
300 %dir %{_sysconfdir}/tmpfiles.d
301 %dir /lib/systemd
302 /lib/systemd/system
303 %dir %{_prefix}/lib/tmpfiles.d
304 %attr(755,root,root) /bin/systemctl
305 %attr(755,root,root) /bin/systemd-tmpfiles
306 %{_mandir}/man5/tmpfiles.d.5*
307 %{_mandir}/man1/systemctl.1*
308 %{_mandir}/man8/systemd-tmpfiles.8*
309
310 %if %{with gtk}
311 %files gtk
312 %defattr(644,root,root,755)
313 %attr(755,root,root) %{_bindir}/systemadm
314 %attr(755,root,root) %{_bindir}/systemd-gnome-ask-password-agent
315 %{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy
316 %{_mandir}/man1/systemadm.1*
317 %endif
318
319 %files -n bash-completion-systemd
320 %defattr(644,root,root,755)
321 /etc/bash_completion.d/systemctl-bash-completion.sh
This page took 0.1127 seconds and 4 git commands to generate.