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