]>
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 |
4c1f648e | 11 | Release: 2 |
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 |
80072a2c | 21 | Patch0: %{name}-nolibs.patch |
22 | Patch1: %{name}-config.patch | |
d63e2026 | 23 | Patch2: %{name}-no_fatal_checks.patch |
312606de | 24 | Patch3: %{name}-allow-introspection.patch |
f19fa9c8 | 25 | URL: http://www.freedesktop.org/Software/dbus |
7050d71f | 26 | BuildRequires: audit-libs-devel |
38d51c46 JB |
27 | BuildRequires: autoconf >= 2.63 |
28 | BuildRequires: automake >= 1:1.10 | |
ab3fabda | 29 | BuildRequires: doxygen |
b89a2164 | 30 | BuildRequires: expat-devel >= %{expat_version} |
b34aed38 | 31 | BuildRequires: libcap-ng-devel |
0f5eff1c | 32 | %{?with_selinux:BuildRequires: libselinux-devel} |
38d51c46 | 33 | BuildRequires: libtool >= 2:2.0 |
756fb95f | 34 | BuildRequires: libxslt-progs |
60d211c4 | 35 | BuildRequires: pkgconfig |
f922e835 | 36 | BuildRequires: rpmbuild(macros) >= 1.561 |
f15cbea8 | 37 | BuildRequires: sed >= 4.0 |
17b61c76 | 38 | BuildRequires: xmlto |
4c6c017a | 39 | %{?with_X11:BuildRequires: xorg-lib-libX11-devel} |
9a0bbf5a ER |
40 | Requires(post,postun): /sbin/ldconfig |
41 | Requires(post,preun): /sbin/chkconfig | |
42 | Requires(postun): /usr/sbin/groupdel | |
43 | Requires(postun): /usr/sbin/userdel | |
48d7fff5 | 44 | Requires(pre): /bin/id |
b5824d21 | 45 | Requires(pre): /usr/bin/getgid |
48d7fff5 JB |
46 | Requires(pre): /usr/sbin/groupadd |
47 | Requires(pre): /usr/sbin/useradd | |
9d777b18 | 48 | Requires: %{name}-dirs = %{version}-%{release} |
9a0bbf5a | 49 | Requires: %{name}-libs = %{version}-%{release} |
9fb96e41 | 50 | Requires: expat >= %{expat_version} |
f4dffbbc | 51 | Requires: rc-scripts >= 0.4.3.0 |
b5824d21 | 52 | Provides: group(messagebus) |
53 | Provides: user(messagebus) | |
75a73017 | 54 | Obsoletes: dbus-glib-tools |
86eafeb2 | 55 | Conflicts: pam < 0.99.7.1 |
8a7e4f09 JB |
56 | # not available for dbus 0.9x yet(?) |
57 | #Obsoletes: dbus-gtk dbus-gcj dbus-gcj-devel dbus-gcj-static | |
bc0b5507 | 58 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
3f8dd6e4 AF |
59 | |
60 | %description | |
61 | D-BUS is a system for sending messages between applications. It is | |
62 | used both for the systemwide message bus service, and as a | |
63 | per-user-login-session messaging facility. | |
64 | ||
702c1f82 JR |
65 | %description -l pl.UTF-8 |
66 | D-BUS to system przesyłania komunikatów pomiędzy aplikacjami. Jest | |
67 | używany zarówno jako ogólnosystemowa usługa magistrali komunikatów jak | |
68 | i możliwość przesyłania komunikatów w ramach jednej sesji użytkownika. | |
bc0b5507 | 69 | |
4c1f648e AF |
70 | %package systemd |
71 | Summary: systemd units for system message bus | |
72 | Group: Daemons | |
73 | Requires: %{name} = %{version}-%{release} | |
74 | ||
75 | %description systemd | |
76 | systemd units for system message bus. | |
77 | ||
f922e835 JK |
78 | %package upstart |
79 | Summary: Upstart job description for system message bus | |
80 | Summary(pl.UTF-8): Opis zadania Upstart dla magistrali systemowej DBus | |
81 | Group: Daemons | |
82 | Requires: %{name} = %{version}-%{release} | |
83 | Requires: upstart >= 0.6 | |
84 | ||
85 | %description upstart | |
86 | Upstart job description for system message bus. | |
87 | ||
88 | %description upstart -l pl.UTF-8 | |
89 | Opis zadania Upstart dla magistrali systemowej DBus. | |
90 | ||
9d777b18 PG |
91 | %package dirs |
92 | Summary: D-BUS directories | |
93 | Summary(pl.UTF-8): Katalogi D-BUS | |
94 | Group: Libraries | |
95 | ||
96 | %description dirs | |
97 | D-BUS directories. | |
98 | ||
99 | %description dirs -l pl.UTF-8 | |
100 | Katalogi D-BUS. | |
101 | ||
93c19477 | 102 | %package libs |
3bdcad6f JB |
103 | Summary: D-BUS library |
104 | Summary(pl.UTF-8): Biblioteka D-BUS | |
93c19477 JB |
105 | Group: Libraries |
106 | ||
107 | %description libs | |
3bdcad6f | 108 | D-BUS library. |
93c19477 | 109 | |
702c1f82 | 110 | %description libs -l pl.UTF-8 |
3bdcad6f | 111 | Biblioteka D-BUS. |
93c19477 | 112 | |
3f8dd6e4 | 113 | %package devel |
3bdcad6f JB |
114 | Summary: Header files for D-BUS library |
115 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki D-BUS | |
3f8dd6e4 | 116 | Group: Development/Libraries |
e58eea39 | 117 | Requires: %{name}-libs = %{version}-%{release} |
3f8dd6e4 AF |
118 | |
119 | %description devel | |
3bdcad6f | 120 | Header files for D-BUS library. |
bc0b5507 | 121 | |
702c1f82 | 122 | %description devel -l pl.UTF-8 |
3bdcad6f | 123 | Pliki nagłówkowe biblioteki D-BUS. |
bc0b5507 JB |
124 | |
125 | %package static | |
3bdcad6f JB |
126 | Summary: Static D-BUS library |
127 | Summary(pl.UTF-8): Statyczna biblioteka D-BUS | |
bc0b5507 | 128 | Group: Development/Libraries |
26ded955 | 129 | Requires: %{name}-devel = %{version}-%{release} |
bc0b5507 JB |
130 | |
131 | %description static | |
3bdcad6f | 132 | Static D-BUS library. |
bc0b5507 | 133 | |
702c1f82 | 134 | %description static -l pl.UTF-8 |
3bdcad6f | 135 | Statyczna biblioteka D-BUS. |
3f8dd6e4 | 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 \ |
4c6c017a | 175 | --with-xml=expat \ |
4c1f648e | 176 | --with-systemdsystemunitdir=/lib/systemd/system \ |
4c6c017a | 177 | %{!?with_X11:--without-x} |
d31ee46d | 178 | %{__make} |
3f8dd6e4 AF |
179 | |
180 | %install | |
181 | rm -rf $RPM_BUILD_ROOT | |
f922e835 | 182 | install -d $RPM_BUILD_ROOT/etc/{init,profile.d,rc.d/init.d,sysconfig,X11/xinit/xinitrc.d} \ |
9d777b18 PG |
183 | $RPM_BUILD_ROOT%{_datadir}/dbus-1/{services,interfaces} \ |
184 | $RPM_BUILD_ROOT%{_localstatedir}/run/dbus \ | |
185 | $RPM_BUILD_ROOT/%{_lib} | |
3f8dd6e4 AF |
186 | |
187 | %{__make} install \ | |
d31ee46d | 188 | DESTDIR=$RPM_BUILD_ROOT |
3f8dd6e4 | 189 | |
6c17b0ba ER |
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 | |
817942a3 | 195 | |
a38affeb | 196 | # upstart (/sbin/init) requires libdbus so it must be in /lib(64) |
2011471a JB |
197 | mv -f $RPM_BUILD_ROOT%{_libdir}/libdbus-1.so.* $RPM_BUILD_ROOT/%{_lib} |
198 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libdbus-1.so.*.*.*) \ | |
199 | $RPM_BUILD_ROOT%{_libdir}/libdbus-1.so | |
a38affeb | 200 | |
4c1f648e AF |
201 | ln -s dbus.service $RPM_BUILD_ROOT/lib/systemd/system/messagebus.service |
202 | ||
063382a4 | 203 | %{__rm} -rf $RPM_BUILD_ROOT%{_docdir}/dbus/api |
38d51c46 | 204 | |
3f8dd6e4 | 205 | %clean |
bc0b5507 | 206 | rm -rf $RPM_BUILD_ROOT |
3f8dd6e4 | 207 | |
817942a3 | 208 | %pre |
64d48b42 | 209 | %groupadd -g 122 messagebus |
d3e1076f | 210 | %useradd -u 122 -d /usr/share/empty -s /bin/false -c "System message bus" -g 122 messagebus |
817942a3 | 211 | |
212 | %post | |
817942a3 | 213 | /sbin/chkconfig --add messagebus |
9a0bbf5a | 214 | %service messagebus restart "D-Bus daemon" |
817942a3 | 215 | |
216 | %preun | |
217 | if [ "$1" = "0" ];then | |
9a0bbf5a | 218 | %service messagebus stop |
817942a3 | 219 | /sbin/chkconfig --del messagebus |
220 | fi | |
221 | ||
222 | %postun | |
817942a3 | 223 | if [ "$1" = "0" ]; then |
b5824d21 | 224 | %userremove messagebus |
225 | %groupremove messagebus | |
817942a3 | 226 | fi |
0186cbb3 | 227 | |
f777c982 | 228 | %if 0 |
f922e835 JK |
229 | %post upstart |
230 | %upstart_post messagebus | |
231 | ||
232 | %postun upstart | |
233 | %upstart_postun messagebus | |
f777c982 | 234 | %endif |
f922e835 | 235 | |
2c14f3cc | 236 | %post libs -p /sbin/ldconfig |
237 | %postun libs -p /sbin/ldconfig | |
f82a8a7b | 238 | |
b89dd173 | 239 | %triggerpostun -- %{name} < 0.92 |
240 | %banner %{name} << EOF | |
241 | WARNING!!! | |
242 | configuration file /etc/sysconfig/dbus has been moved to /etc/sysconfig/messagebus! | |
243 | EOF | |
244 | ||
e4a64dc3 JR |
245 | if [ -f /etc/sysconfig/dbus ]; then |
246 | mv -f /etc/sysconfig/messagebus{,.rpmnew} | |
247 | mv -f /etc/sysconfig/{dbus,messagebus} | |
248 | elif [ -f /etc/sysconfig/dbus.rpmsave ]; then | |
249 | mv -f /etc/sysconfig/messagebus{,.rpmnew} | |
250 | mv -f /etc/sysconfig/{dbus.rpmsave,messagebus} | |
251 | fi | |
b89dd173 | 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 |
60d211c4 | 259 | %attr(755,root,root) %{_bindir}/dbus-send |
9fb96e41 | 260 | %attr(4754,root,messagebus) %{_libdir}/dbus-daemon-launch-helper |
9fb96e41 | 261 | %dir %{_datadir}/dbus-1 |
39b52e3f | 262 | %dir %{_datadir}/dbus-1/interfaces |
9fb96e41 JB |
263 | %dir %{_datadir}/dbus-1/services |
264 | %dir %{_datadir}/dbus-1/system-services | |
d94552dc | 265 | %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/*.conf |
b89dd173 | 266 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/messagebus |
817942a3 | 267 | %attr(754,root,root) /etc/rc.d/init.d/* |
6f305975 | 268 | %attr(755,root,root) /etc/profile.d/dbus-daemon-1.sh |
184f238c | 269 | %dir %{_localstatedir}/run/dbus |
d7c0a93c | 270 | %dir /var/lib/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* |
60d211c4 | 275 | %{_mandir}/man1/dbus-send.1* |
3f8dd6e4 | 276 | |
4c1f648e AF |
277 | %files systemd |
278 | %defattr(644,root,root,755) | |
279 | /lib/systemd/system/dbus.service | |
280 | /lib/systemd/system/dbus.socket | |
281 | /lib/systemd/system/dbus.target.wants/dbus.socket | |
282 | /lib/systemd/system/messagebus.service | |
283 | /lib/systemd/system/multi-user.target.wants/dbus.service | |
284 | /lib/systemd/system/sockets.target.wants/dbus.socket | |
285 | ||
5e4a018f | 286 | %if "%{pld_release}" != "ti" |
f922e835 JK |
287 | %files upstart |
288 | %defattr(644,root,root,755) | |
289 | %config(noreplace) %verify(not md5 mtime size) /etc/init/messagebus.conf | |
5e4a018f | 290 | %endif |
f922e835 | 291 | |
9d777b18 PG |
292 | %files dirs |
293 | %defattr(644,root,root,755) | |
d94552dc ER |
294 | %dir /etc/dbus-1 |
295 | %dir /etc/dbus-1/system.d | |
296 | %dir /etc/dbus-1/session.d | |
9d777b18 | 297 | |
0186cbb3 | 298 | %files libs |
3f8dd6e4 | 299 | %defattr(644,root,root,755) |
e58eea39 | 300 | %doc AUTHORS COPYING ChangeLog NEWS README doc/TODO |
a38affeb JR |
301 | %attr(755,root,root) /%{_lib}/libdbus-1.so.*.*.* |
302 | %attr(755,root,root) %ghost /%{_lib}/libdbus-1.so.3 | |
0186cbb3 | 303 | |
304 | %files devel | |
305 | %defattr(644,root,root,755) | |
306 | %doc doc/*.{html,txt} | |
2009405e | 307 | %attr(755,root,root) %{_libdir}/libdbus-1.so |
60d211c4 | 308 | %{_libdir}/libdbus-1.la |
9fb96e41 JB |
309 | %dir %{_libdir}/dbus-1.0 |
310 | %{_libdir}/dbus-1.0/include | |
9fb96e41 | 311 | %{_includedir}/dbus-1.0 |
11267a0a | 312 | %{_pkgconfigdir}/dbus-1.pc |
bc0b5507 JB |
313 | |
314 | %files static | |
315 | %defattr(644,root,root,755) | |
60d211c4 | 316 | %{_libdir}/libdbus-1.a |
d94552dc ER |
317 | |
318 | %files x11 | |
319 | %defattr(644,root,root,755) | |
320 | %attr(755,root,root) %{_bindir}/dbus-launch | |
321 | %{_mandir}/man1/dbus-launch.1* | |
11267a0a | 322 | %attr(755,root,root) /etc/X11/xinit/xinitrc.d/dbus-xinitrc.sh |