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