]> git.pld-linux.org Git - packages/systemd.git/blob - systemd.spec
81b4c958780e32906b7fdcedb947c28a1e6ee5a8
[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 touch $RPM_BUILD_ROOT%{_sysconfdir}/machine-id
165
166 %clean
167 rm -rf $RPM_BUILD_ROOT
168
169 %post
170 /bin/systemd-machine-id-setup > /dev/null 2>&1 || :
171 /bin/systemctl daemon-reexec > /dev/null 2>&1 || :
172
173 %post units
174 if [ $1 -ne 1 ]; then
175         exit 0
176 fi
177
178 # Try to read default runlevel from the old inittab if it exists
179 runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null)
180 if [ -z "$runlevel" ] ; then
181         runlevel=3
182 fi
183 target="/lib/systemd/system/runlevel$runlevel.target"
184
185 # And symlink what we found to the new-style default.target
186 ln -sf "$target" %{_sysconfdir}/systemd/system/default.target > /dev/null 2>&1 || :
187 #/bin/systemctl enable SERVICES > /dev/null 2>&1 || :
188
189 %preun units
190 if [ $1 -ne 0 ]; then
191         exit 0
192 fi
193 #/bin/systemctl disable SERVICES > /dev/null 2>&1 || :
194 rm -f %{_sysconfdir}/systemd/system/default.target > /dev/null 2>&1 || :
195
196 %postun
197 if [ $1 -ge 1 ] ; then
198         /bin/systemctl daemon-reload > /dev/null 2>&1 || :
199 fi
200
201 %files
202 %defattr(644,root,root,755)
203 %doc DISTRO_PORTING README TODO
204 /etc/dbus-1/system.d/org.freedesktop.hostname1.conf
205 /etc/dbus-1/system.d/org.freedesktop.systemd1.conf
206 %dir %{_sysconfdir}/systemd
207 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/systemd/system.conf
208 %ghost %config(noreplace) %{_sysconfdir}/machine-id
209 %dir /etc/xdg/systemd
210 /etc/xdg/systemd/user
211 %attr(755,root,root) /bin/systemd
212 %attr(755,root,root) /bin/systemd-ask-password
213 %attr(755,root,root) /bin/systemd-machine-id-setup
214 %attr(755,root,root) /bin/systemd-notify
215 %attr(755,root,root) /bin/systemd-tty-ask-password-agent
216 %attr(755,root,root) %{_bindir}/systemd-cgls
217 %attr(755,root,root) %{_bindir}/systemd-analyze
218 %attr(755,root,root) %{_bindir}/systemd-nspawn
219 %attr(755,root,root) %{_bindir}/systemd-stdio-bridge
220 %attr(755,root,root) /sbin/halt
221 %attr(755,root,root) /sbin/init
222 %attr(755,root,root) /sbin/poweroff
223 %attr(755,root,root) /sbin/reboot
224 %attr(755,root,root) /sbin/runlevel
225 %attr(755,root,root) /sbin/shutdown
226 %attr(755,root,root) /sbin/telinit
227 %dir /lib/systemd
228 /lib/systemd/systemd-*
229 %dir %{_libdir}/systemd
230 %{_libdir}/systemd/user
231 %dir %{_libdir}/systemd/user-generators
232 %dir /lib/systemd/system-generators
233 /lib/systemd/system-generators/systemd-getty-generator
234 /lib/udev/rules.d/99-systemd.rules
235 %{_prefix}/lib/tmpfiles.d/legacy.conf
236 %{_prefix}/lib/tmpfiles.d/systemd.conf
237 %{_prefix}/lib/tmpfiles.d/x11.conf
238 %{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.*.xml
239 %{_datadir}/dbus-1/services/org.freedesktop.systemd1.service
240 %{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service
241 %{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service
242 %{_datadir}/polkit-1/actions/org.freedesktop.hostname1.policy
243 %{_mandir}/man1/init.1
244 %{_mandir}/man1/systemd.1*
245 %{_mandir}/man1/systemd-ask-password.1*
246 %{_mandir}/man1/systemd-cgls.1*
247 %{_mandir}/man1/systemd-notify.1*
248 %{_mandir}/man1/systemd-nspawn.1*
249 %{_mandir}/man3/sd_booted.3*
250 %{_mandir}/man3/sd_is_fifo.3*
251 %{_mandir}/man3/sd_is_socket.3
252 %{_mandir}/man3/sd_is_socket_inet.3
253 %{_mandir}/man3/sd_is_socket_unix.3
254 %{_mandir}/man3/sd_listen_fds.3*
255 %{_mandir}/man3/sd_notify.3*
256 %{_mandir}/man3/sd_notifyf.3
257 %{_mandir}/man3/sd_readahead.3*
258 %{_mandir}/man5/binfmt.d.5*
259 %{_mandir}/man5/hostname.5*
260 %{_mandir}/man5/locale.conf.5*
261 %{_mandir}/man5/machine-id.5*
262 %{_mandir}/man5/machine-info.5*
263 %{_mandir}/man5/modules-load.d.5*
264 %{_mandir}/man5/os-release.5*
265 %{_mandir}/man5/sysctl.d.5*
266 %{_mandir}/man5/systemd.automount.5*
267 %{_mandir}/man5/systemd.conf.5*
268 %{_mandir}/man5/systemd.device.5*
269 %{_mandir}/man5/systemd.exec.5*
270 %{_mandir}/man5/systemd.mount.5*
271 %{_mandir}/man5/systemd.path.5*
272 %{_mandir}/man5/systemd.service.5*
273 %{_mandir}/man5/systemd.snapshot.5*
274 %{_mandir}/man5/systemd.socket.5*
275 %{_mandir}/man5/systemd.swap.5*
276 %{_mandir}/man5/systemd.target.5*
277 %{_mandir}/man5/systemd.timer.5*
278 %{_mandir}/man5/systemd.unit.5*
279 %{_mandir}/man5/vconsole.conf.5*
280 %{_mandir}/man7/daemon.7*
281 %{_mandir}/man7/sd-daemon.7*
282 %{_mandir}/man7/sd-readahead.7*
283 %{_mandir}/man7/systemd.special.7*
284 %{_mandir}/man8/halt.8*
285 %{_mandir}/man8/poweroff.8
286 %{_mandir}/man8/reboot.8
287 %{_mandir}/man8/runlevel.8*
288 %{_mandir}/man8/shutdown.8*
289 %{_mandir}/man8/telinit.8*
290
291 %if %{with cryptsetup}
292 /lib/systemd/system-generators/systemd-cryptsetup-generator
293 %endif
294
295 %if %{with pam}
296 %attr(755,root,root) /%{_lib}/security/pam_systemd.so
297 %{_mandir}/man8/pam_systemd.8*
298 %endif
299
300 %files units
301 %defattr(644,root,root,755)
302 %dir %{_sysconfdir}/systemd
303 %dir %{_sysconfdir}/systemd/system
304 %dir %{_sysconfdir}/tmpfiles.d
305 %dir /lib/systemd
306 /lib/systemd/system
307 %dir %{_prefix}/lib/tmpfiles.d
308 %attr(755,root,root) /bin/systemctl
309 %attr(755,root,root) /bin/systemd-tmpfiles
310 %{_mandir}/man5/tmpfiles.d.5*
311 %{_mandir}/man1/systemctl.1*
312 %{_mandir}/man8/systemd-tmpfiles.8*
313
314 %if %{with gtk}
315 %files gtk
316 %defattr(644,root,root,755)
317 %attr(755,root,root) %{_bindir}/systemadm
318 %attr(755,root,root) %{_bindir}/systemd-gnome-ask-password-agent
319 %{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy
320 %{_mandir}/man1/systemadm.1*
321 %endif
322
323 %files -n bash-completion-systemd
324 %defattr(644,root,root,755)
325 /etc/bash_completion.d/systemctl-bash-completion.sh
This page took 0.085276 seconds and 3 git commands to generate.