]>
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 |
756fb95f | 10 | Version: 1.4.14 |
d94552dc | 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 |
756fb95f | 15 | # Source0-md5: ae6de2562a57516cfabaf56903375ba9 |
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} |
6d3c188e | 51 | Requires: rc-scripts >= 0.4.1.26 |
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 | |
f922e835 JK |
70 | %package upstart |
71 | Summary: Upstart job description for system message bus | |
72 | Summary(pl.UTF-8): Opis zadania Upstart dla magistrali systemowej DBus | |
73 | Group: Daemons | |
74 | Requires: %{name} = %{version}-%{release} | |
75 | Requires: upstart >= 0.6 | |
76 | ||
77 | %description upstart | |
78 | Upstart job description for system message bus. | |
79 | ||
80 | %description upstart -l pl.UTF-8 | |
81 | Opis zadania Upstart dla magistrali systemowej DBus. | |
82 | ||
9d777b18 PG |
83 | %package dirs |
84 | Summary: D-BUS directories | |
85 | Summary(pl.UTF-8): Katalogi D-BUS | |
86 | Group: Libraries | |
87 | ||
88 | %description dirs | |
89 | D-BUS directories. | |
90 | ||
91 | %description dirs -l pl.UTF-8 | |
92 | Katalogi D-BUS. | |
93 | ||
93c19477 | 94 | %package libs |
3bdcad6f JB |
95 | Summary: D-BUS library |
96 | Summary(pl.UTF-8): Biblioteka D-BUS | |
93c19477 JB |
97 | Group: Libraries |
98 | ||
99 | %description libs | |
3bdcad6f | 100 | D-BUS library. |
93c19477 | 101 | |
702c1f82 | 102 | %description libs -l pl.UTF-8 |
3bdcad6f | 103 | Biblioteka D-BUS. |
93c19477 | 104 | |
3f8dd6e4 | 105 | %package devel |
3bdcad6f JB |
106 | Summary: Header files for D-BUS library |
107 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki D-BUS | |
3f8dd6e4 | 108 | Group: Development/Libraries |
e58eea39 | 109 | Requires: %{name}-libs = %{version}-%{release} |
3f8dd6e4 AF |
110 | |
111 | %description devel | |
3bdcad6f | 112 | Header files for D-BUS library. |
bc0b5507 | 113 | |
702c1f82 | 114 | %description devel -l pl.UTF-8 |
3bdcad6f | 115 | Pliki nagłówkowe biblioteki D-BUS. |
bc0b5507 JB |
116 | |
117 | %package static | |
3bdcad6f JB |
118 | Summary: Static D-BUS library |
119 | Summary(pl.UTF-8): Statyczna biblioteka D-BUS | |
bc0b5507 | 120 | Group: Development/Libraries |
26ded955 | 121 | Requires: %{name}-devel = %{version}-%{release} |
bc0b5507 JB |
122 | |
123 | %description static | |
3bdcad6f | 124 | Static D-BUS library. |
bc0b5507 | 125 | |
702c1f82 | 126 | %description static -l pl.UTF-8 |
3bdcad6f | 127 | Statyczna biblioteka D-BUS. |
3f8dd6e4 | 128 | |
d94552dc | 129 | %package x11 |
11267a0a JB |
130 | Summary: X11 session support for D-BUS |
131 | Summary(pl.UTF-8): Obsługa sesji X11 dla D-BUS | |
d94552dc ER |
132 | Group: X11/Applications |
133 | Requires: %{name} = %{version}-%{release} | |
134 | Obsoletes: dbus-X11 | |
135 | ||
136 | %description x11 | |
11267a0a JB |
137 | This package contains D-BUS utilities to start D-BUS service together |
138 | with user X11 session. | |
139 | ||
140 | %description x11 -l pl.UTF-8 | |
141 | Ten pakiet zawiera narzędzia D-BUS pozwalające na uruchomienie usługi | |
142 | D-BUS wraz z sesją X11 użytkownika. | |
d94552dc | 143 | |
3f8dd6e4 AF |
144 | %prep |
145 | %setup -q | |
146 | %patch0 -p1 | |
d40e6d8d | 147 | %patch1 -p1 |
d63e2026 | 148 | %patch2 -p1 |
312606de | 149 | %patch3 -p1 |
3f8dd6e4 AF |
150 | |
151 | %build | |
152 | %{__libtoolize} | |
609b792a | 153 | %{__aclocal} -I m4 |
3f8dd6e4 | 154 | %{__autoconf} |
60d211c4 | 155 | %{__autoheader} |
3f8dd6e4 | 156 | %{__automake} |
92f6f38b | 157 | %configure \ |
d728aff5 | 158 | %{?debug:--enable-verbose-mode} \ |
7dee3cfe | 159 | --disable-asserts \ |
11267a0a | 160 | --disable-silent-rules \ |
d728aff5 | 161 | --disable-tests \ |
4f16c093 | 162 | --enable-abstract-sockets=auto \ |
0f5eff1c | 163 | %{?with_selinux:--enable-selinux} \ |
845c3048 | 164 | --with-console-auth-dir=%{_localstatedir}/run/console/ \ |
c74466a5 | 165 | --with-session-socket-dir=/tmp \ |
ab3fabda | 166 | --with-system-pid-file=%{_localstatedir}/run/dbus.pid \ |
4c6c017a JK |
167 | --with-xml=expat \ |
168 | %{!?with_X11:--without-x} | |
d31ee46d | 169 | %{__make} |
3f8dd6e4 AF |
170 | |
171 | %install | |
172 | rm -rf $RPM_BUILD_ROOT | |
f922e835 | 173 | install -d $RPM_BUILD_ROOT/etc/{init,profile.d,rc.d/init.d,sysconfig,X11/xinit/xinitrc.d} \ |
9d777b18 PG |
174 | $RPM_BUILD_ROOT%{_datadir}/dbus-1/{services,interfaces} \ |
175 | $RPM_BUILD_ROOT%{_localstatedir}/run/dbus \ | |
176 | $RPM_BUILD_ROOT/%{_lib} | |
3f8dd6e4 AF |
177 | |
178 | %{__make} install \ | |
d31ee46d | 179 | DESTDIR=$RPM_BUILD_ROOT |
3f8dd6e4 | 180 | |
6c17b0ba ER |
181 | install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/messagebus |
182 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d/dbus-daemon-1.sh | |
183 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/messagebus | |
184 | install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d | |
185 | cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/init/messagebus.conf | |
817942a3 | 186 | |
a38affeb | 187 | # upstart (/sbin/init) requires libdbus so it must be in /lib(64) |
2011471a JB |
188 | mv -f $RPM_BUILD_ROOT%{_libdir}/libdbus-1.so.* $RPM_BUILD_ROOT/%{_lib} |
189 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libdbus-1.so.*.*.*) \ | |
190 | $RPM_BUILD_ROOT%{_libdir}/libdbus-1.so | |
a38affeb | 191 | |
38d51c46 JB |
192 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/dbus/api |
193 | ||
3f8dd6e4 | 194 | %clean |
bc0b5507 | 195 | rm -rf $RPM_BUILD_ROOT |
3f8dd6e4 | 196 | |
817942a3 | 197 | %pre |
64d48b42 | 198 | %groupadd -g 122 messagebus |
d3e1076f | 199 | %useradd -u 122 -d /usr/share/empty -s /bin/false -c "System message bus" -g 122 messagebus |
817942a3 | 200 | |
201 | %post | |
817942a3 | 202 | /sbin/chkconfig --add messagebus |
9a0bbf5a | 203 | %service messagebus restart "D-Bus daemon" |
817942a3 | 204 | |
205 | %preun | |
206 | if [ "$1" = "0" ];then | |
9a0bbf5a | 207 | %service messagebus stop |
817942a3 | 208 | /sbin/chkconfig --del messagebus |
209 | fi | |
210 | ||
211 | %postun | |
817942a3 | 212 | if [ "$1" = "0" ]; then |
b5824d21 | 213 | %userremove messagebus |
214 | %groupremove messagebus | |
817942a3 | 215 | fi |
0186cbb3 | 216 | |
f777c982 | 217 | %if 0 |
f922e835 JK |
218 | %post upstart |
219 | %upstart_post messagebus | |
220 | ||
221 | %postun upstart | |
222 | %upstart_postun messagebus | |
f777c982 | 223 | %endif |
f922e835 | 224 | |
2c14f3cc | 225 | %post libs -p /sbin/ldconfig |
226 | %postun libs -p /sbin/ldconfig | |
f82a8a7b | 227 | |
b89dd173 | 228 | %triggerpostun -- %{name} < 0.92 |
229 | %banner %{name} << EOF | |
230 | WARNING!!! | |
231 | configuration file /etc/sysconfig/dbus has been moved to /etc/sysconfig/messagebus! | |
232 | EOF | |
233 | ||
e4a64dc3 JR |
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 | |
b89dd173 | 241 | |
3f8dd6e4 AF |
242 | %files |
243 | %defattr(644,root,root,755) | |
60d211c4 | 244 | %attr(755,root,root) %{_bindir}/dbus-cleanup-sockets |
08c9542c | 245 | %attr(755,root,root) %{_bindir}/dbus-daemon |
e5453be6 | 246 | %attr(755,root,root) %{_bindir}/dbus-uuidgen |
d31ee46d | 247 | %attr(755,root,root) %{_bindir}/dbus-monitor |
60d211c4 | 248 | %attr(755,root,root) %{_bindir}/dbus-send |
9fb96e41 | 249 | %attr(4754,root,messagebus) %{_libdir}/dbus-daemon-launch-helper |
9fb96e41 | 250 | %dir %{_datadir}/dbus-1 |
39b52e3f | 251 | %dir %{_datadir}/dbus-1/interfaces |
9fb96e41 JB |
252 | %dir %{_datadir}/dbus-1/services |
253 | %dir %{_datadir}/dbus-1/system-services | |
d94552dc | 254 | %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/*.conf |
b89dd173 | 255 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/messagebus |
817942a3 | 256 | %attr(754,root,root) /etc/rc.d/init.d/* |
6f305975 | 257 | %attr(755,root,root) /etc/profile.d/dbus-daemon-1.sh |
184f238c | 258 | %dir %{_localstatedir}/run/dbus |
d7c0a93c | 259 | %dir /var/lib/dbus |
60d211c4 | 260 | %{_mandir}/man1/dbus-cleanup-sockets.1* |
08c9542c | 261 | %{_mandir}/man1/dbus-daemon.1* |
e5453be6 | 262 | %{_mandir}/man1/dbus-uuidgen.1* |
d31ee46d | 263 | %{_mandir}/man1/dbus-monitor.1* |
60d211c4 | 264 | %{_mandir}/man1/dbus-send.1* |
3f8dd6e4 | 265 | |
5e4a018f | 266 | %if "%{pld_release}" != "ti" |
f922e835 JK |
267 | %files upstart |
268 | %defattr(644,root,root,755) | |
269 | %config(noreplace) %verify(not md5 mtime size) /etc/init/messagebus.conf | |
5e4a018f | 270 | %endif |
f922e835 | 271 | |
9d777b18 PG |
272 | %files dirs |
273 | %defattr(644,root,root,755) | |
d94552dc ER |
274 | %dir /etc/dbus-1 |
275 | %dir /etc/dbus-1/system.d | |
276 | %dir /etc/dbus-1/session.d | |
9d777b18 | 277 | |
0186cbb3 | 278 | %files libs |
3f8dd6e4 | 279 | %defattr(644,root,root,755) |
e58eea39 | 280 | %doc AUTHORS COPYING ChangeLog NEWS README doc/TODO |
a38affeb JR |
281 | %attr(755,root,root) /%{_lib}/libdbus-1.so.*.*.* |
282 | %attr(755,root,root) %ghost /%{_lib}/libdbus-1.so.3 | |
0186cbb3 | 283 | |
284 | %files devel | |
285 | %defattr(644,root,root,755) | |
286 | %doc doc/*.{html,txt} | |
2009405e | 287 | %attr(755,root,root) %{_libdir}/libdbus-1.so |
60d211c4 | 288 | %{_libdir}/libdbus-1.la |
9fb96e41 JB |
289 | %dir %{_libdir}/dbus-1.0 |
290 | %{_libdir}/dbus-1.0/include | |
9fb96e41 | 291 | %{_includedir}/dbus-1.0 |
11267a0a | 292 | %{_pkgconfigdir}/dbus-1.pc |
bc0b5507 JB |
293 | |
294 | %files static | |
295 | %defattr(644,root,root,755) | |
60d211c4 | 296 | %{_libdir}/libdbus-1.a |
d94552dc ER |
297 | |
298 | %files x11 | |
299 | %defattr(644,root,root,755) | |
300 | %attr(755,root,root) %{_bindir}/dbus-launch | |
301 | %{_mandir}/man1/dbus-launch.1* | |
11267a0a | 302 | %attr(755,root,root) /etc/X11/xinit/xinitrc.d/dbus-xinitrc.sh |