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