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