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