]>
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 |
8293b774 | 10 | Version: 1.8.14 |
6199eac2 | 11 | Release: 1 |
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 |
8293b774 | 15 | # Source0-md5: dfb810eda8780cf9debf7169b3ca5fe1 |
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 | |
ce770662 | 30 | BuildRequires: docbook-dtd44-xml |
ab3fabda | 31 | BuildRequires: doxygen |
b89a2164 | 32 | BuildRequires: expat-devel >= %{expat_version} |
b34aed38 | 33 | BuildRequires: libcap-ng-devel |
0f5eff1c | 34 | %{?with_selinux:BuildRequires: libselinux-devel} |
38d51c46 | 35 | BuildRequires: libtool >= 2:2.0 |
756fb95f | 36 | BuildRequires: libxslt-progs |
60d211c4 | 37 | BuildRequires: pkgconfig |
00960c12 | 38 | BuildRequires: rpmbuild(macros) >= 1.626 |
f15cbea8 | 39 | BuildRequires: sed >= 4.0 |
f6056d81 | 40 | BuildRequires: systemd-devel >= 32 |
17b61c76 | 41 | BuildRequires: xmlto |
4c6c017a | 42 | %{?with_X11:BuildRequires: xorg-lib-libX11-devel} |
9a0bbf5a ER |
43 | Requires(post,postun): /sbin/ldconfig |
44 | Requires(post,preun): /sbin/chkconfig | |
45 | Requires(postun): /usr/sbin/groupdel | |
46 | Requires(postun): /usr/sbin/userdel | |
48d7fff5 | 47 | Requires(pre): /bin/id |
b5824d21 | 48 | Requires(pre): /usr/bin/getgid |
48d7fff5 JB |
49 | Requires(pre): /usr/sbin/groupadd |
50 | Requires(pre): /usr/sbin/useradd | |
9d99a896 | 51 | Requires(post,preun,postun): systemd-units >= 38 |
9a0bbf5a | 52 | Requires: %{name}-libs = %{version}-%{release} |
9fb96e41 | 53 | Requires: expat >= %{expat_version} |
f4dffbbc | 54 | Requires: rc-scripts >= 0.4.3.0 |
9d99a896 | 55 | Requires: systemd-units >= 38 |
b5824d21 | 56 | Provides: group(messagebus) |
57 | Provides: user(messagebus) | |
75a73017 | 58 | Obsoletes: dbus-glib-tools |
fde42832 | 59 | Obsoletes: dbus-systemd |
86eafeb2 | 60 | Conflicts: pam < 0.99.7.1 |
8a7e4f09 JB |
61 | # not available for dbus 0.9x yet(?) |
62 | #Obsoletes: dbus-gtk dbus-gcj dbus-gcj-devel dbus-gcj-static | |
bc0b5507 | 63 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
3f8dd6e4 AF |
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 | ||
702c1f82 JR |
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. | |
bc0b5507 | 74 | |
f922e835 JK |
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 | ||
93c19477 | 88 | %package libs |
3bdcad6f JB |
89 | Summary: D-BUS library |
90 | Summary(pl.UTF-8): Biblioteka D-BUS | |
93c19477 | 91 | Group: Libraries |
1dcc978d | 92 | Obsoletes: dbus-dirs |
93c19477 JB |
93 | |
94 | %description libs | |
3bdcad6f | 95 | D-BUS library. |
93c19477 | 96 | |
702c1f82 | 97 | %description libs -l pl.UTF-8 |
3bdcad6f | 98 | Biblioteka D-BUS. |
93c19477 | 99 | |
3f8dd6e4 | 100 | %package devel |
3bdcad6f JB |
101 | Summary: Header files for D-BUS library |
102 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki D-BUS | |
3f8dd6e4 | 103 | Group: Development/Libraries |
e58eea39 | 104 | Requires: %{name}-libs = %{version}-%{release} |
3f8dd6e4 AF |
105 | |
106 | %description devel | |
3bdcad6f | 107 | Header files for D-BUS library. |
bc0b5507 | 108 | |
702c1f82 | 109 | %description devel -l pl.UTF-8 |
3bdcad6f | 110 | Pliki nagłówkowe biblioteki D-BUS. |
bc0b5507 JB |
111 | |
112 | %package static | |
3bdcad6f JB |
113 | Summary: Static D-BUS library |
114 | Summary(pl.UTF-8): Statyczna biblioteka D-BUS | |
bc0b5507 | 115 | Group: Development/Libraries |
26ded955 | 116 | Requires: %{name}-devel = %{version}-%{release} |
bc0b5507 JB |
117 | |
118 | %description static | |
3bdcad6f | 119 | Static D-BUS library. |
bc0b5507 | 120 | |
702c1f82 | 121 | %description static -l pl.UTF-8 |
3bdcad6f | 122 | Statyczna biblioteka D-BUS. |
3f8dd6e4 | 123 | |
0f66e1a4 JB |
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 | ||
d94552dc | 137 | %package x11 |
11267a0a JB |
138 | Summary: X11 session support for D-BUS |
139 | Summary(pl.UTF-8): Obsługa sesji X11 dla D-BUS | |
d94552dc ER |
140 | Group: X11/Applications |
141 | Requires: %{name} = %{version}-%{release} | |
142 | Obsoletes: dbus-X11 | |
143 | ||
144 | %description x11 | |
11267a0a JB |
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. | |
d94552dc | 151 | |
3f8dd6e4 AF |
152 | %prep |
153 | %setup -q | |
154 | %patch0 -p1 | |
d40e6d8d | 155 | %patch1 -p1 |
d63e2026 | 156 | %patch2 -p1 |
312606de | 157 | %patch3 -p1 |
3f8dd6e4 AF |
158 | |
159 | %build | |
160 | %{__libtoolize} | |
609b792a | 161 | %{__aclocal} -I m4 |
3f8dd6e4 | 162 | %{__autoconf} |
60d211c4 | 163 | %{__autoheader} |
3f8dd6e4 | 164 | %{__automake} |
92f6f38b | 165 | %configure \ |
d728aff5 | 166 | %{?debug:--enable-verbose-mode} \ |
7dee3cfe | 167 | --disable-asserts \ |
11267a0a | 168 | --disable-silent-rules \ |
d728aff5 | 169 | --disable-tests \ |
4f16c093 | 170 | --enable-abstract-sockets=auto \ |
0f5eff1c | 171 | %{?with_selinux:--enable-selinux} \ |
845c3048 | 172 | --with-console-auth-dir=%{_localstatedir}/run/console/ \ |
c74466a5 | 173 | --with-session-socket-dir=/tmp \ |
ab3fabda | 174 | --with-system-pid-file=%{_localstatedir}/run/dbus.pid \ |
00960c12 | 175 | --with-systemdsystemunitdir=%{systemdunitdir} \ |
4c6c017a | 176 | %{!?with_X11:--without-x} |
d31ee46d | 177 | %{__make} |
3f8dd6e4 AF |
178 | |
179 | %install | |
180 | rm -rf $RPM_BUILD_ROOT | |
66957508 | 181 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/{init,profile.d,rc.d/init.d,sysconfig,X11/xinit/xinitrc.d} \ |
9d777b18 PG |
182 | $RPM_BUILD_ROOT%{_datadir}/dbus-1/{services,interfaces} \ |
183 | $RPM_BUILD_ROOT%{_localstatedir}/run/dbus \ | |
6a298ef2 | 184 | $RPM_BUILD_ROOT%{_localstatedir}/lib/dbus \ |
508e2779 | 185 | $RPM_BUILD_ROOT/%{_lib} \ |
66957508 | 186 | $RPM_BUILD_ROOT%{systemdtmpfilesdir} |
3f8dd6e4 AF |
187 | |
188 | %{__make} install \ | |
d31ee46d | 189 | DESTDIR=$RPM_BUILD_ROOT |
3f8dd6e4 | 190 | |
6c17b0ba ER |
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 | |
817942a3 | 196 | |
8293b774 | 197 | cp -p %{SOURCE6} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf |
508e2779 | 198 | |
a38affeb | 199 | # upstart (/sbin/init) requires libdbus so it must be in /lib(64) |
2011471a JB |
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 | |
a38affeb | 203 | |
00960c12 | 204 | ln -s dbus.service $RPM_BUILD_ROOT%{systemdunitdir}/messagebus.service |
4c1f648e | 205 | |
3f8dd6e4 | 206 | %clean |
bc0b5507 | 207 | rm -rf $RPM_BUILD_ROOT |
3f8dd6e4 | 208 | |
817942a3 | 209 | %pre |
64d48b42 | 210 | %groupadd -g 122 messagebus |
d3e1076f | 211 | %useradd -u 122 -d /usr/share/empty -s /bin/false -c "System message bus" -g 122 messagebus |
817942a3 | 212 | |
213 | %post | |
817942a3 | 214 | /sbin/chkconfig --add messagebus |
2b86874f | 215 | %service -n messagebus restart "D-Bus daemon" |
24fe08d4 JR |
216 | export NORESTART="yes" |
217 | %systemd_post messagebus.service | |
817942a3 | 218 | |
219 | %preun | |
220 | if [ "$1" = "0" ];then | |
9a0bbf5a | 221 | %service messagebus stop |
817942a3 | 222 | /sbin/chkconfig --del messagebus |
223 | fi | |
224 | ||
225 | %postun | |
817942a3 | 226 | if [ "$1" = "0" ]; then |
b5824d21 | 227 | %userremove messagebus |
228 | %groupremove messagebus | |
817942a3 | 229 | fi |
24fe08d4 JR |
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 | |
0186cbb3 | 241 | |
f777c982 | 242 | %if 0 |
f922e835 JK |
243 | %post upstart |
244 | %upstart_post messagebus | |
245 | ||
246 | %postun upstart | |
247 | %upstart_postun messagebus | |
f777c982 | 248 | %endif |
f922e835 | 249 | |
2c14f3cc | 250 | %post libs -p /sbin/ldconfig |
251 | %postun libs -p /sbin/ldconfig | |
f82a8a7b | 252 | |
3f8dd6e4 AF |
253 | %files |
254 | %defattr(644,root,root,755) | |
60d211c4 | 255 | %attr(755,root,root) %{_bindir}/dbus-cleanup-sockets |
08c9542c | 256 | %attr(755,root,root) %{_bindir}/dbus-daemon |
e5453be6 | 257 | %attr(755,root,root) %{_bindir}/dbus-uuidgen |
d31ee46d | 258 | %attr(755,root,root) %{_bindir}/dbus-monitor |
b72e187e | 259 | %attr(755,root,root) %{_bindir}/dbus-run-session |
60d211c4 | 260 | %attr(755,root,root) %{_bindir}/dbus-send |
9fb96e41 | 261 | %attr(4754,root,messagebus) %{_libdir}/dbus-daemon-launch-helper |
9fb96e41 JB |
262 | %dir %{_datadir}/dbus-1/services |
263 | %dir %{_datadir}/dbus-1/system-services | |
d94552dc | 264 | %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/*.conf |
b89dd173 | 265 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/messagebus |
6a298ef2 | 266 | %attr(754,root,root) /etc/rc.d/init.d/messagebus |
6f305975 | 267 | %attr(755,root,root) /etc/profile.d/dbus-daemon-1.sh |
66957508 | 268 | %{systemdtmpfilesdir}/%{name}.conf |
6a298ef2 | 269 | %dir %{_localstatedir}/lib/dbus |
184f238c | 270 | %dir %{_localstatedir}/run/dbus |
60d211c4 | 271 | %{_mandir}/man1/dbus-cleanup-sockets.1* |
08c9542c | 272 | %{_mandir}/man1/dbus-daemon.1* |
e5453be6 | 273 | %{_mandir}/man1/dbus-uuidgen.1* |
d31ee46d | 274 | %{_mandir}/man1/dbus-monitor.1* |
b72e187e | 275 | %{_mandir}/man1/dbus-run-session.1* |
60d211c4 | 276 | %{_mandir}/man1/dbus-send.1* |
3f8dd6e4 | 277 | |
00960c12 AF |
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 | |
4c1f648e | 284 | |
5e4a018f | 285 | %if "%{pld_release}" != "ti" |
f922e835 JK |
286 | %files upstart |
287 | %defattr(644,root,root,755) | |
288 | %config(noreplace) %verify(not md5 mtime size) /etc/init/messagebus.conf | |
5e4a018f | 289 | %endif |
f922e835 | 290 | |
0186cbb3 | 291 | %files libs |
3f8dd6e4 | 292 | %defattr(644,root,root,755) |
e58eea39 | 293 | %doc AUTHORS COPYING ChangeLog NEWS README doc/TODO |
a38affeb JR |
294 | %attr(755,root,root) /%{_lib}/libdbus-1.so.*.*.* |
295 | %attr(755,root,root) %ghost /%{_lib}/libdbus-1.so.3 | |
1dcc978d JB |
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 | |
0186cbb3 | 303 | |
304 | %files devel | |
305 | %defattr(644,root,root,755) | |
2009405e | 306 | %attr(755,root,root) %{_libdir}/libdbus-1.so |
60d211c4 | 307 | %{_libdir}/libdbus-1.la |
9fb96e41 JB |
308 | %dir %{_libdir}/dbus-1.0 |
309 | %{_libdir}/dbus-1.0/include | |
9fb96e41 | 310 | %{_includedir}/dbus-1.0 |
11267a0a | 311 | %{_pkgconfigdir}/dbus-1.pc |
0f66e1a4 JB |
312 | %dir %{_docdir}/dbus |
313 | %{_docdir}/dbus/*.html | |
314 | %{_docdir}/dbus/*.png | |
315 | %{_docdir}/dbus/*.svg | |
316 | %{_docdir}/dbus/*.txt | |
317 | ||
bc0b5507 JB |
318 | |
319 | %files static | |
320 | %defattr(644,root,root,755) | |
60d211c4 | 321 | %{_libdir}/libdbus-1.a |
d94552dc | 322 | |
0f66e1a4 JB |
323 | %files apidocs |
324 | %defattr(644,root,root,755) | |
325 | %{_docdir}/dbus/api | |
326 | %{_docdir}/dbus/dbus.devhelp | |
327 | ||
d94552dc ER |
328 | %files x11 |
329 | %defattr(644,root,root,755) | |
330 | %attr(755,root,root) %{_bindir}/dbus-launch | |
331 | %{_mandir}/man1/dbus-launch.1* | |
11267a0a | 332 | %attr(755,root,root) /etc/X11/xinit/xinitrc.d/dbus-xinitrc.sh |