]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without selinux # build without SELinux support | |
4 | %bcond_without X11 # build without X11 support | |
5 | ||
6 | %define expat_version 1:1.95.5 | |
7 | Summary: D-BUS message bus | |
8 | Summary(pl.UTF-8): Magistrala przesyłania komunikatów D-BUS | |
9 | Name: dbus | |
10 | Version: 1.8.16 | |
11 | Release: 2 | |
12 | License: AFL v2.1 or GPL v2 | |
13 | Group: Libraries | |
14 | Source0: http://dbus.freedesktop.org/releases/dbus/%{name}-%{version}.tar.gz | |
15 | # Source0-md5: 020824a38850501e7d6ba8307a7c5ac3 | |
16 | Source1: messagebus.init | |
17 | Source2: %{name}-daemon-1-profile.d-sh | |
18 | Source3: %{name}-sysconfig | |
19 | Source4: %{name}-xinitrc.sh | |
20 | Source5: messagebus.upstart | |
21 | Source6: %{name}.tmpfiles | |
22 | Patch0: %{name}-nolibs.patch | |
23 | Patch1: %{name}-config.patch | |
24 | Patch2: %{name}-no_fatal_checks.patch | |
25 | Patch3: %{name}-allow-introspection.patch | |
26 | URL: http://www.freedesktop.org/Software/dbus | |
27 | BuildRequires: audit-libs-devel | |
28 | BuildRequires: autoconf >= 2.63 | |
29 | BuildRequires: automake >= 1:1.10 | |
30 | BuildRequires: docbook-dtd44-xml | |
31 | BuildRequires: doxygen | |
32 | BuildRequires: expat-devel >= %{expat_version} | |
33 | BuildRequires: libcap-ng-devel | |
34 | %{?with_selinux:BuildRequires: libselinux-devel} | |
35 | BuildRequires: libtool >= 2:2.0 | |
36 | BuildRequires: libxslt-progs | |
37 | BuildRequires: pkgconfig | |
38 | BuildRequires: rpmbuild(macros) >= 1.626 | |
39 | BuildRequires: sed >= 4.0 | |
40 | BuildRequires: systemd-devel >= 32 | |
41 | BuildRequires: xmlto | |
42 | %{?with_X11:BuildRequires: xorg-lib-libX11-devel} | |
43 | Requires(post,postun): /sbin/ldconfig | |
44 | Requires(post,preun): /sbin/chkconfig | |
45 | Requires(postun): /usr/sbin/groupdel | |
46 | Requires(postun): /usr/sbin/userdel | |
47 | Requires(pre): /bin/id | |
48 | Requires(pre): /usr/bin/getgid | |
49 | Requires(pre): /usr/sbin/groupadd | |
50 | Requires(pre): /usr/sbin/useradd | |
51 | Requires(post,preun,postun): systemd-units >= 38 | |
52 | Requires: %{name}-libs = %{version}-%{release} | |
53 | Requires: expat >= %{expat_version} | |
54 | Requires: rc-scripts >= 0.4.3.0 | |
55 | Requires: systemd-units >= 38 | |
56 | Provides: group(messagebus) | |
57 | Provides: user(messagebus) | |
58 | Obsoletes: dbus-glib-tools | |
59 | Obsoletes: dbus-systemd | |
60 | Conflicts: pam < 0.99.7.1 | |
61 | # not available for dbus 0.9x yet(?) | |
62 | #Obsoletes: dbus-gtk dbus-gcj dbus-gcj-devel dbus-gcj-static | |
63 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
64 | ||
65 | %description | |
66 | D-BUS is a system for sending messages between applications. It is | |
67 | used both for the systemwide message bus service, and as a | |
68 | per-user-login-session messaging facility. | |
69 | ||
70 | %description -l pl.UTF-8 | |
71 | D-BUS to system przesyłania komunikatów pomiędzy aplikacjami. Jest | |
72 | używany zarówno jako ogólnosystemowa usługa magistrali komunikatów jak | |
73 | i możliwość przesyłania komunikatów w ramach jednej sesji użytkownika. | |
74 | ||
75 | %package upstart | |
76 | Summary: Upstart job description for system message bus | |
77 | Summary(pl.UTF-8): Opis zadania Upstart dla magistrali systemowej DBus | |
78 | Group: Daemons | |
79 | Requires: %{name} = %{version}-%{release} | |
80 | Requires: upstart >= 0.6 | |
81 | ||
82 | %description upstart | |
83 | Upstart job description for system message bus. | |
84 | ||
85 | %description upstart -l pl.UTF-8 | |
86 | Opis zadania Upstart dla magistrali systemowej DBus. | |
87 | ||
88 | %package libs | |
89 | Summary: D-BUS library | |
90 | Summary(pl.UTF-8): Biblioteka D-BUS | |
91 | Group: Libraries | |
92 | Obsoletes: dbus-dirs | |
93 | ||
94 | %description libs | |
95 | D-BUS library. | |
96 | ||
97 | %description libs -l pl.UTF-8 | |
98 | Biblioteka D-BUS. | |
99 | ||
100 | %package devel | |
101 | Summary: Header files for D-BUS library | |
102 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki D-BUS | |
103 | Group: Development/Libraries | |
104 | Requires: %{name}-libs = %{version}-%{release} | |
105 | ||
106 | %description devel | |
107 | Header files for D-BUS library. | |
108 | ||
109 | %description devel -l pl.UTF-8 | |
110 | Pliki nagłówkowe biblioteki D-BUS. | |
111 | ||
112 | %package static | |
113 | Summary: Static D-BUS library | |
114 | Summary(pl.UTF-8): Statyczna biblioteka D-BUS | |
115 | Group: Development/Libraries | |
116 | Requires: %{name}-devel = %{version}-%{release} | |
117 | ||
118 | %description static | |
119 | Static D-BUS library. | |
120 | ||
121 | %description static -l pl.UTF-8 | |
122 | Statyczna biblioteka D-BUS. | |
123 | ||
124 | %package apidocs | |
125 | Summary: D-BUS API documentation | |
126 | Summary(pl.UTF-8): Dokumentacja API D-BUS | |
127 | Group: Documentation | |
128 | # dbus.devhelp refers also to common docs packaged in -devel | |
129 | Requires: %{name}-devel = %{version}-%{release} | |
130 | ||
131 | %description apidocs | |
132 | D-BUS API documentation. | |
133 | ||
134 | %description apidocs -l pl.UTF-8 | |
135 | Dokumentacja API D-BUS. | |
136 | ||
137 | %package x11 | |
138 | Summary: X11 session support for D-BUS | |
139 | Summary(pl.UTF-8): Obsługa sesji X11 dla D-BUS | |
140 | Group: X11/Applications | |
141 | Requires: %{name} = %{version}-%{release} | |
142 | Obsoletes: dbus-X11 | |
143 | ||
144 | %description x11 | |
145 | This package contains D-BUS utilities to start D-BUS service together | |
146 | with user X11 session. | |
147 | ||
148 | %description x11 -l pl.UTF-8 | |
149 | Ten pakiet zawiera narzędzia D-BUS pozwalające na uruchomienie usługi | |
150 | D-BUS wraz z sesją X11 użytkownika. | |
151 | ||
152 | %prep | |
153 | %setup -q | |
154 | %patch0 -p1 | |
155 | %patch1 -p1 | |
156 | %patch2 -p1 | |
157 | %patch3 -p1 | |
158 | ||
159 | %build | |
160 | %{__libtoolize} | |
161 | %{__aclocal} -I m4 | |
162 | %{__autoconf} | |
163 | %{__autoheader} | |
164 | %{__automake} | |
165 | %configure \ | |
166 | %{?debug:--enable-verbose-mode} \ | |
167 | --disable-asserts \ | |
168 | --disable-silent-rules \ | |
169 | --disable-tests \ | |
170 | --enable-abstract-sockets=auto \ | |
171 | %{?with_selinux:--enable-selinux} \ | |
172 | --with-console-auth-dir=%{_localstatedir}/run/console/ \ | |
173 | --with-session-socket-dir=/tmp \ | |
174 | --with-system-pid-file=%{_localstatedir}/run/dbus.pid \ | |
175 | --with-systemdsystemunitdir=%{systemdunitdir} \ | |
176 | %{!?with_X11:--without-x} | |
177 | %{__make} | |
178 | ||
179 | %install | |
180 | rm -rf $RPM_BUILD_ROOT | |
181 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/{init,profile.d,rc.d/init.d,sysconfig,X11/xinit/xinitrc.d} \ | |
182 | $RPM_BUILD_ROOT%{_datadir}/dbus-1/{services,interfaces} \ | |
183 | $RPM_BUILD_ROOT%{_localstatedir}/run/dbus \ | |
184 | $RPM_BUILD_ROOT%{_localstatedir}/lib/dbus \ | |
185 | $RPM_BUILD_ROOT/%{_lib} \ | |
186 | $RPM_BUILD_ROOT%{systemdtmpfilesdir} | |
187 | ||
188 | %{__make} install \ | |
189 | DESTDIR=$RPM_BUILD_ROOT | |
190 | ||
191 | install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/messagebus | |
192 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d/dbus-daemon-1.sh | |
193 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/messagebus | |
194 | install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d | |
195 | cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/init/messagebus.conf | |
196 | ||
197 | cp -p %{SOURCE6} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf | |
198 | ||
199 | # upstart (/sbin/init) requires libdbus so it must be in /lib(64) | |
200 | mv -f $RPM_BUILD_ROOT%{_libdir}/libdbus-1.so.* $RPM_BUILD_ROOT/%{_lib} | |
201 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libdbus-1.so.*.*.*) \ | |
202 | $RPM_BUILD_ROOT%{_libdir}/libdbus-1.so | |
203 | ||
204 | ln -s dbus.service $RPM_BUILD_ROOT%{systemdunitdir}/messagebus.service | |
205 | ||
206 | %clean | |
207 | rm -rf $RPM_BUILD_ROOT | |
208 | ||
209 | %pre | |
210 | %groupadd -g 122 messagebus | |
211 | %useradd -u 122 -d /usr/share/empty -s /bin/false -c "System message bus" -g 122 messagebus | |
212 | ||
213 | %post | |
214 | /sbin/chkconfig --add messagebus | |
215 | %service -n messagebus restart "D-Bus daemon" | |
216 | export NORESTART="yes" | |
217 | %systemd_post messagebus.service | |
218 | ||
219 | %preun | |
220 | if [ "$1" = "0" ];then | |
221 | %service messagebus stop | |
222 | /sbin/chkconfig --del messagebus | |
223 | fi | |
224 | ||
225 | %postun | |
226 | if [ "$1" = "0" ]; then | |
227 | %userremove messagebus | |
228 | %groupremove messagebus | |
229 | fi | |
230 | %systemd_reload | |
231 | ||
232 | %triggerpostun -- dbus < 1.4.16-5 | |
233 | %systemd_trigger messagebus.service | |
234 | if [ -f /etc/sysconfig/dbus ]; then | |
235 | mv -f /etc/sysconfig/messagebus{,.rpmnew} | |
236 | mv -f /etc/sysconfig/{dbus,messagebus} | |
237 | elif [ -f /etc/sysconfig/dbus.rpmsave ]; then | |
238 | mv -f /etc/sysconfig/messagebus{,.rpmnew} | |
239 | mv -f /etc/sysconfig/{dbus.rpmsave,messagebus} | |
240 | fi | |
241 | ||
242 | %if 0 | |
243 | %post upstart | |
244 | %upstart_post messagebus | |
245 | ||
246 | %postun upstart | |
247 | %upstart_postun messagebus | |
248 | %endif | |
249 | ||
250 | %post libs -p /sbin/ldconfig | |
251 | %postun libs -p /sbin/ldconfig | |
252 | ||
253 | %files | |
254 | %defattr(644,root,root,755) | |
255 | %attr(755,root,root) %{_bindir}/dbus-cleanup-sockets | |
256 | %attr(755,root,root) %{_bindir}/dbus-daemon | |
257 | %attr(755,root,root) %{_bindir}/dbus-uuidgen | |
258 | %attr(755,root,root) %{_bindir}/dbus-monitor | |
259 | %attr(755,root,root) %{_bindir}/dbus-run-session | |
260 | %attr(755,root,root) %{_bindir}/dbus-send | |
261 | %attr(4754,root,messagebus) %{_libdir}/dbus-daemon-launch-helper | |
262 | %dir %{_datadir}/dbus-1/services | |
263 | %dir %{_datadir}/dbus-1/system-services | |
264 | %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/*.conf | |
265 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/messagebus | |
266 | %attr(754,root,root) /etc/rc.d/init.d/messagebus | |
267 | %attr(755,root,root) /etc/profile.d/dbus-daemon-1.sh | |
268 | %{systemdtmpfilesdir}/%{name}.conf | |
269 | %dir %{_localstatedir}/lib/dbus | |
270 | %dir %{_localstatedir}/run/dbus | |
271 | %{_mandir}/man1/dbus-cleanup-sockets.1* | |
272 | %{_mandir}/man1/dbus-daemon.1* | |
273 | %{_mandir}/man1/dbus-uuidgen.1* | |
274 | %{_mandir}/man1/dbus-monitor.1* | |
275 | %{_mandir}/man1/dbus-run-session.1* | |
276 | %{_mandir}/man1/dbus-send.1* | |
277 | ||
278 | %{systemdunitdir}/dbus.service | |
279 | %{systemdunitdir}/dbus.socket | |
280 | %{systemdunitdir}/dbus.target.wants/dbus.socket | |
281 | %{systemdunitdir}/messagebus.service | |
282 | %{systemdunitdir}/multi-user.target.wants/dbus.service | |
283 | %{systemdunitdir}/sockets.target.wants/dbus.socket | |
284 | ||
285 | %if "%{pld_release}" != "ti" | |
286 | %files upstart | |
287 | %defattr(644,root,root,755) | |
288 | %config(noreplace) %verify(not md5 mtime size) /etc/init/messagebus.conf | |
289 | %endif | |
290 | ||
291 | %files libs | |
292 | %defattr(644,root,root,755) | |
293 | %doc AUTHORS COPYING ChangeLog NEWS README doc/TODO | |
294 | %attr(755,root,root) /%{_lib}/libdbus-1.so.*.*.* | |
295 | %attr(755,root,root) %ghost /%{_lib}/libdbus-1.so.3 | |
296 | %dir /etc/dbus-1 | |
297 | %dir /etc/dbus-1/system.d | |
298 | %dir /etc/dbus-1/session.d | |
299 | %dir %{_datadir}/dbus-1 | |
300 | # interfaces is basically devel thing, but keep dir here | |
301 | # in case something uses it at runtime | |
302 | %dir %{_datadir}/dbus-1/interfaces | |
303 | ||
304 | %files devel | |
305 | %defattr(644,root,root,755) | |
306 | %attr(755,root,root) %{_libdir}/libdbus-1.so | |
307 | %{_libdir}/libdbus-1.la | |
308 | %dir %{_libdir}/dbus-1.0 | |
309 | %{_libdir}/dbus-1.0/include | |
310 | %{_includedir}/dbus-1.0 | |
311 | %{_pkgconfigdir}/dbus-1.pc | |
312 | %dir %{_docdir}/dbus | |
313 | %{_docdir}/dbus/*.html | |
314 | %{_docdir}/dbus/*.png | |
315 | %{_docdir}/dbus/*.svg | |
316 | %{_docdir}/dbus/*.txt | |
317 | ||
318 | ||
319 | %files static | |
320 | %defattr(644,root,root,755) | |
321 | %{_libdir}/libdbus-1.a | |
322 | ||
323 | %files apidocs | |
324 | %defattr(644,root,root,755) | |
325 | %{_docdir}/dbus/api | |
326 | %{_docdir}/dbus/dbus.devhelp | |
327 | ||
328 | %files x11 | |
329 | %defattr(644,root,root,755) | |
330 | %attr(755,root,root) %{_bindir}/dbus-launch | |
331 | %{_mandir}/man1/dbus-launch.1* | |
332 | %attr(755,root,root) /etc/X11/xinit/xinitrc.d/dbus-xinitrc.sh |