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