]> git.pld-linux.org Git - packages/dbus.git/blob - dbus.spec
- dbus-gtk requires dbus-X11 -- perhaps dependent apps should require this?
[packages/dbus.git] / dbus.spec
1 #
2 # Conditional build:
3 %bcond_without  glib    # without glib support
4 %bcond_without  gtk     # without GTK+ programs
5 %bcond_without  qt      # without Qt support
6 %bcond_without  python  # without Python support
7 %bcond_without  dotnet  # without .NET support
8 %bcond_with     gcj     # with Java support
9 #
10 %{?with_dotnet:%include /usr/lib/rpm/macros.mono}
11
12 %if %{without glib}
13 %undefine       with_gtk
14 %endif
15
16 %ifarch i386 alpha sparc sparc64
17 %undefine with_dotnet
18 %endif
19
20 %define         expat_version   1.95.5
21 %define         glib2_version   2.2.0
22 %define         qt_version      3.1.0
23 Summary:        D-BUS message bus
24 Summary(pl):    Magistrala przesy³ania komunikatów D-BUS
25 Name:           dbus
26 Version:        0.50
27 Release:        4
28 License:        AFL v2.1 or GPL v2
29 Group:          Libraries
30 Source0:        http://dbus.freedesktop.org/releases/%{name}-%{version}.tar.gz
31 # Source0-md5:  1addd5b600a8a4550766005d1f59401b
32 Source1:        messagebus.init
33 Source2:        %{name}-daemon-1-profile.d-sh
34 Source3:        %{name}-sysconfig
35 Source4:        %{name}-xinitrc.sh
36 Patch0:         %{name}-nolibs.patch
37 Patch1:         %{name}-config.patch
38 Patch2:         %{name}-mint.patch
39 Patch3:         %{name}-python_fixes.patch
40 Patch4:         %{name}-monodir.patch
41 URL:            http://www.freedesktop.org/Software/dbus
42 BuildRequires:  XFree86-devel
43 BuildRequires:  autoconf >= 2.52
44 BuildRequires:  automake
45 %{?with_python:BuildRequires:   cpp}
46 BuildRequires:  expat-devel >= %{expat_version}
47 BuildRequires:  doxygen
48 %{?with_glib:BuildRequires:     glib2-devel >= %{glib2_version}}
49 %{?with_gcj:BuildRequires:      gcc-java >= 5:4.0}
50 %{?with_gtk:BuildRequires:      gtk+2-devel >= %{glib2_version}}
51 %if %{with dotnet}
52 # just gtk-sharp for examples
53 BuildRequires:  dotnet-gtk-sharp-devel
54 BuildRequires:  mono-csharp >= 1.1.7
55 BuildRequires:  monodoc >= 1.0.7-2
56 %endif
57 BuildRequires:  libselinux-devel
58 BuildRequires:  libtool
59 BuildRequires:  pkgconfig
60 %if %{with python}
61 BuildRequires:  python-devel >= 2.2
62 BuildRequires:  python-Pyrex >= 0.9.3
63 %endif
64 %{?with_qt:BuildRequires:       qt-devel >= %{qt_version}}
65 BuildRequires:  rpmbuild(macros) >= 1.202
66 BuildRequires:  sed >= 4.0
67 BuildRequires:  xmlto
68 Requires:       rc-scripts
69 Requires:       %{name}-libs = %{version}-%{release}
70 Requires(pre):  /bin/id
71 Requires(pre):  /usr/bin/getgid
72 Requires(pre):  /usr/sbin/groupadd
73 Requires(pre):  /usr/sbin/useradd
74 Requires(post,preun):   /sbin/chkconfig
75 Requires(post,postun):  /sbin/ldconfig
76 Requires(postun):       /usr/sbin/groupdel
77 Requires(postun):       /usr/sbin/userdel
78 Provides:       group(messagebus)
79 Provides:       user(messagebus)
80 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
81
82 %description
83 D-BUS is a system for sending messages between applications. It is
84 used both for the systemwide message bus service, and as a
85 per-user-login-session messaging facility.
86
87 %description -l pl
88 D-BUS to system przesy³ania komunikatów pomiêdzy aplikacjami. Jest
89 u¿ywany zarówno jako ogólnosystemowa us³uga magistrali komunikatów jak
90 i mo¿liwo¶æ przesy³ania komunikatów w ramach jednej sesji u¿ytkownika.
91
92 %package devel
93 Summary:        Header files for D-BUS
94 Summary(pl):    Pliki nag³ówkowe D-BUS
95 Group:          Development/Libraries
96 Requires:       %{name}-libs = %{version}-%{release}
97
98 %description devel
99 Header files for D-BUS.
100
101 %description devel -l pl
102 Pliki nag³ówkowe D-BUS.
103
104 %package libs
105 Summary:        D-BUS libraries
106 Summary(pl):    Biblioteki D-BUS
107 Group:          Libraries
108
109 %description libs
110 D-BUS libraries.
111
112 %description libs -l pl
113 Biblioteki D-BUS.
114
115 %package static
116 Summary:        Static D-BUS libraries
117 Summary(pl):    Statyczne biblioteki D-BUS
118 Group:          Development/Libraries
119 Requires:       %{name}-devel = %{version}-%{release}
120
121 %description static
122 Static D-BUS libraries.
123
124 %description static -l pl
125 Statyczne biblioteki D-BUS.
126
127 %package glib
128 Summary:        GLib-based library for using D-BUS
129 Summary(pl):    Biblioteka do u¿ywania D-BUS oparta o GLib
130 Group:          Libraries
131 Requires:       %{name}-libs = %{version}-%{release}
132 Requires:       glib2 >= %{glib2_version}
133
134 %description glib
135 D-BUS add-on library to integrate the standard D-BUS library with the
136 GLib thread abstraction and main loop.
137
138 %description glib -l pl
139 Dodatkowa biblioteka D-BUS do integracji standardowej biblioteki D-BUS
140 z abstrakcj± w±tków i g³ówn± pêtl± GLib.
141
142 %package glib-devel
143 Summary:        Header files for GLib-based library for using D-BUS
144 Summary(pl):    Pliki nag³ówkowe biblioteki do u¿ywania D-BUS opartej o GLib
145 Group:          Development/Libraries
146 Requires:       %{name}-devel = %{version}-%{release}
147 Requires:       %{name}-glib = %{version}-%{release}
148 Requires:       glib2-devel >= %{glib2_version}
149
150 %description glib-devel
151 Header files for GLib-based library for using D-BUS.
152
153 %description glib-devel -l pl
154 Pliki nag³ówkowe biblioteki do u¿ywania D-BUS opartej o GLib.
155
156 %package glib-static
157 Summary:        Static GLib-based library for using D-BUS
158 Summary(pl):    Statyczna biblioteka do u¿ywania D-BUS oparta o GLib
159 Group:          Development/Libraries
160 Requires:       %{name}-glib-devel = %{version}-%{release}
161
162 %description glib-static
163 Static GLib-based library for using D-BUS.
164
165 %description glib-static -l pl
166 Statyczna biblioteka do u¿ywania D-BUS oparta o GLib.
167
168 %package glib-tools
169 Summary:        GLib-based tools for D-BUS
170 Summary(pl):    Narzêdzia dla D-BUS oparte o GLib
171 Group:          Libraries
172 Requires:       %{name} = %{version}-%{release}
173 Requires:       %{name}-glib = %{version}-%{release}
174
175 %description glib-tools
176 GLib-based tools for D-BUS.
177
178 %description glib-tools -l pl
179 Narzêdzia dla D-BUS oparte o GLib
180
181 %package gtk
182 Summary:        GTK+-based graphical D-BUS frontend utility
183 Summary(pl):    Oparte na GTK+ graficzne narzêdzie do D-BUS
184 Group:          X11/Applications
185 Requires:       %{name} = %{version}-%{release}
186 Requires:       %{name}-glib = %{version}-%{release}
187 Requires:       %{name}-X11 = %{version}-%{release}
188
189 %description gtk
190 GTK+-based graphical D-BUS frontend utility.
191
192 %description gtk -l pl
193 Oparte na GTK+ graficzne narzêdzie do D-BUS.
194
195 %package X11
196 Summary:        X11 D-BUS utilities
197 Summary(pl):    Narzêdzia X11 D-BUSa
198 Group:          X11/Applications
199 Requires:       %{name} = %{version}-%{release}
200 Requires:       xinitrc
201
202 %description X11
203 X11 D-BUS utilities.
204
205 %description X11 -l pl
206 Narzêdzia X11 D-BUSa.
207
208 %package -n dotnet-%{name}-sharp
209 Summary:        .NET library for using D-BUS
210 Summary(pl):    Biblioteka .NET do u¿ywania D-BUS
211 Group:          Development/Libraries
212 Requires:       %{name} = %{version}-%{release}
213 Requires:       mono >= 1.1.7
214
215 %description -n dotnet-%{name}-sharp
216 .NET library for using D-BUS.
217
218 %description -n dotnet-%{name}-sharp -l pl
219 Biblioteka .NET do u¿ywania D-BUS.
220
221 %package -n dotnet-%{name}-sharp-devel
222 Summary:        .NET library for using D-BUS with API documentation
223 Summary(pl):    Biblioteka .NET do u¿ywania D-BUS, zawiera dokumentacjê API
224 Group:          Development/Libraries
225 Requires:       dotnet-%{name}-sharp = %{version}-%{release}
226 Requires:       %{name} = %{version}-%{release}
227
228 %description -n dotnet-%{name}-sharp-devel
229 .NET library for using D-BUS, with API documentation.
230
231 %description -n dotnet-%{name}-sharp-devel -l pl
232 Biblioteka .NET do u¿ywania D-BUS, zawiera dokumentacjê API.
233
234 %package qt
235 Summary:        Qt-based library for using D-BUS
236 Summary(pl):    Biblioteka do u¿ywania D-BUS oparta o Qt
237 Group:          Libraries
238 Requires:       %{name}-libs = %{version}-%{release}
239
240 %description qt
241 D-BUS add-on library to integrate the standard D-BUS library with the
242 Qt thread abstraction and main loop.
243
244 %description qt -l pl
245 Dodatkowa biblioteka D-BUS do integracji standardowej biblioteki D-BUS
246 z abstrakcj± w±tków i g³ówn± pêtl± Qt.
247
248 %package qt-devel
249 Summary:        Header files for Qt-based library for using D-BUS
250 Summary(pl):    Pliki nag³ówkowe biblioteki do u¿ywania D-BUS opartej o Qt
251 Group:          Development/Libraries
252 Requires:       %{name}-devel = %{version}-%{release}
253 Requires:       %{name}-qt = %{version}-%{release}
254
255 %description qt-devel
256 Header files for Qt-based library for using D-BUS.
257
258 %description qt-devel -l pl
259 Pliki nag³ówkowe biblioteki do u¿ywania D-BUS opartej o Qt.
260
261 %package qt-static
262 Summary:        Static Qt-based library for using D-BUS
263 Summary(pl):    Statyczna biblioteka do u¿ywania D-BUS oparta o Qt
264 Group:          Development/Libraries
265 Requires:       %{name}-qt-devel = %{version}-%{release}
266
267 %description qt-static
268 Static Qt-based library for using D-BUS.
269
270 %description qt-static -l pl
271 Statyczna biblioteka do u¿ywania D-BUS oparta o Qt.
272
273 %package gcj
274 Summary:        Java library for using D-BUS
275 Summary(pl):    Biblioteka do u¿ywania D-BUS oparta o Javê
276 Group:          Libraries
277 Requires:       %{name} = %{version}-%{release}
278
279 %description gcj
280 D-BUS add-on library to integrate the standard D-BUS library with
281 Java.
282
283 %description gcj -l pl
284 Dodatkowa biblioteka D-BUS do integracji standardowej biblioteki D-BUS
285 z Jav±.
286
287 %package gcj-devel
288 Summary:        Header files for Java-based library for using D-BUS
289 Summary(pl):    Pliki nag³ówkowe biblioteki do u¿ywania D-BUS opartej o Javê
290 Group:          Development/Libraries
291 Requires:       %{name}-gcj = %{version}-%{release}
292
293 %description gcj-devel
294 Header files for Java-based library for using D-BUS.
295
296 %description gcj-devel -l pl
297 Pliki nag³ówkowe biblioteki do u¿ywania D-BUS opartej o Javê.
298
299 %package gcj-static
300 Summary:        Static Java-based library for using D-BUS
301 Summary(pl):    Statyczna biblioteka do u¿ywania D-BUS oparta o Javê
302 Group:          Development/Libraries
303 Requires:       %{name}-gcj-devel = %{version}-%{release}
304
305 %description gcj-static
306 Static Java-based library for using D-BUS.
307
308 %description gcj-static -l pl
309 Statyczna biblioteka do u¿ywania D-BUS oparta o Javê.
310
311 %package -n python-dbus
312 Summary:        Python library for using D-BUS
313 Summary(pl):    Biblioteka do u¿ywania D-BUS oparta o Pythona
314 Group:          Libraries
315 Requires:       %{name}-libs = %{version}-%{release}
316 %pyrequires_eq  python
317
318 %description -n python-dbus
319 D-BUS add-on library to integrate the standard D-BUS library with
320 Python.
321
322 %description -n python-dbus -l pl
323 Dodatkowa biblioteka D-BUS do integracji standardowej biblioteki D-BUS
324 z Pythonem.
325
326 %prep
327 %setup -q
328 %patch0 -p1
329 %patch1 -p1
330 %patch2 -p0
331 %patch3 -p1
332 %patch4 -p1
333 sed -i 's:JAR.*=.*jar:JAR=fastjar:g' gcj/Makefile.{am,in}
334 sed -i -e 's/DBUS_QT_LIBS=.*/DBUS_QT_LIBS="-lqt-mt"/' configure.in
335
336 %build
337 %{__libtoolize}
338 %{__aclocal}
339 %{__autoconf}
340 %{__autoheader}
341 %{__automake}
342 %configure \
343         QTDIR=/usr \
344         %{?debug:--enable-verbose-mode} \
345         %{!?with_dotnet:--disable-mono} \
346         %{!?with_dotnet:--disable-mono-docs} \
347         %{!?with_gcj:--disable-gcj} \
348         %{?with_gcj:--enable-gcj} \
349         %{!?with_glib:--disable-glib} \
350         %{!?with_gtk:--disable-gtk} \
351         %{!?with_python:--disable-python} \
352         %{!?with_qt:--disable-qt} \
353         --disable-asserts \
354         --disable-tests \
355         --enable-abstract-sockets \
356         --enable-selinux \
357         --enable-verbose-mode \
358         --with-session-socket-dir=/tmp \
359         --with-system-pid-file=%{_localstatedir}/run/dbus.pid \
360         --with-xml=expat
361 %{__make} \
362         pythondir=%{py_sitedir}
363
364 %install
365 rm -rf $RPM_BUILD_ROOT
366 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
367 install -d $RPM_BUILD_ROOT/etc/profile.d
368 install -d $RPM_BUILD_ROOT/etc/sysconfig
369 install -d $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinitrc.d
370 install -d $RPM_BUILD_ROOT%{_datadir}/dbus-1/services
371 install -d $RPM_BUILD_ROOT%{_localstatedir}/run/dbus
372
373 %{__make} install \
374         DESTDIR=$RPM_BUILD_ROOT \
375         pythondir=%{py_sitedir}
376
377 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/messagebus
378 install %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d/dbus-daemon-1.sh
379 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/dbus
380 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinitrc.d/dbus.sh
381
382 %if %{with python}
383 rm -f $RPM_BUILD_ROOT%{py_sitedir}/%{name}/*.{py,la,a}
384 %endif
385
386 %clean
387 rm -rf $RPM_BUILD_ROOT
388
389 %pre
390 %groupadd -g 122 messagebus
391 %useradd -u 122 -d /usr/share/empty -s /bin/false -c "System message bus" -g messagebus messagebus
392
393 %post
394 /sbin/chkconfig --add messagebus
395 if [ -f /var/lock/subsys/messagebus ]; then
396         /etc/rc.d/init.d/messagebus restart >&2
397 else
398         echo "Run \"/etc/rc.d/init.d/messagebus start\" to start D-Bus daemon."
399 fi
400
401 %preun
402 if [ "$1" = "0" ];then
403         if [ -f /var/lock/subsys/messagebus ]; then
404                 /etc/rc.d/init.d/messagebus stop >&2
405         fi
406         /sbin/chkconfig --del messagebus
407 fi
408
409 %postun
410 if [ "$1" = "0" ]; then
411         %userremove messagebus
412         %groupremove messagebus
413 fi
414
415 %post   libs -p /sbin/ldconfig
416 %postun libs -p /sbin/ldconfig
417
418 %post   glib -p /sbin/ldconfig
419 %postun glib -p /sbin/ldconfig
420
421 %post   qt -p /sbin/ldconfig
422 %postun qt -p /sbin/ldconfig
423
424 %post   gcj -p /sbin/ldconfig
425 %postun gcj -p /sbin/ldconfig
426
427 %files
428 %defattr(644,root,root,755)
429 %attr(755,root,root) %{_bindir}/dbus-cleanup-sockets
430 %attr(755,root,root) %{_bindir}/dbus-daemon
431 %attr(755,root,root) %{_bindir}/dbus-launch
432 %attr(755,root,root) %{_bindir}/dbus-send
433 %dir %{_sysconfdir}/dbus-1
434 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dbus-1/*.conf
435 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dbus
436 %attr(754,root,root) /etc/rc.d/init.d/*
437 %attr(755,root,root) /etc/profile.d/dbus-daemon-1.sh
438 %dir %{_sysconfdir}/dbus-1/system.d
439 %dir %{_datadir}/dbus-1
440 %dir %{_datadir}/dbus-1/services
441 %dir %{_localstatedir}/run/dbus
442 %{_mandir}/man1/dbus-cleanup-sockets.1*
443 %{_mandir}/man1/dbus-daemon.1*
444 %{_mandir}/man1/dbus-send.1*
445
446 %files libs
447 %defattr(644,root,root,755)
448 %doc AUTHORS COPYING ChangeLog NEWS README doc/TODO
449 %attr(755,root,root) %{_libdir}/libdbus-1.so.*.*.*
450 %dir %{_libdir}/dbus-*
451
452 %files devel
453 %defattr(644,root,root,755)
454 %doc doc/*.{html,txt}
455 %attr(755,root,root) %{_libdir}/libdbus-1.so
456 %{_libdir}/libdbus-1.la
457 %{_libdir}/dbus-*/include
458 %{_pkgconfigdir}/dbus-1.pc
459 %{_includedir}/dbus*
460 %{?with_glib:%exclude %{_includedir}/dbus*/dbus/dbus-glib*.h}
461 %{?with_qt:%exclude %{_includedir}/dbus*/dbus/dbus-qt.h}
462
463 %files static
464 %defattr(644,root,root,755)
465 %{_libdir}/libdbus-1.a
466
467 %if %{with glib}
468 %files glib
469 %defattr(644,root,root,755)
470 %attr(755,root,root) %{_libdir}/libdbus-glib-1.so.*.*.*
471
472 %files glib-devel
473 %defattr(644,root,root,755)
474 %attr(755,root,root) %{_bindir}/dbus-binding-tool
475 %attr(755,root,root) %{_libdir}/libdbus-glib-1.so
476 %{_libdir}/libdbus-glib-1.la
477 %{_includedir}/dbus*/dbus/dbus-glib*.h
478 %{_pkgconfigdir}/dbus-glib-1.pc
479
480 %files glib-static
481 %defattr(644,root,root,755)
482 %{_libdir}/libdbus-glib-1.a
483
484 %files glib-tools
485 %defattr(644,root,root,755)
486 %attr(755,root,root) %{_bindir}/dbus-monitor
487 %{_mandir}/man1/dbus-monitor.1*
488 %endif
489
490 %if %{with gtk}
491 %files gtk
492 %defattr(644,root,root,755)
493 %attr(755,root,root) %{_bindir}/dbus-viewer
494 %endif
495
496 %files X11
497 %defattr(644,root,root,755)
498 %attr(755,root,root) %{_sysconfdir}/X11/xinit/xinitrc.d/dbus.sh
499 %{_mandir}/man1/dbus-launch.1*
500
501 %if %{with dotnet}
502 %files -n dotnet-%{name}-sharp
503 %defattr(644,root,root,755)
504 %{_prefix}/lib/mono/gac/dbus-sharp
505
506 %files -n dotnet-%{name}-sharp-devel
507 %defattr(644,root,root,755)
508 %{_prefix}/lib/mono/dbus-sharp
509 %{_libdir}/monodoc/sources/*
510 %{_pkgconfigdir}/dbus-sharp.pc
511 %endif
512
513 %if %{with qt}
514 %files qt
515 %defattr(644,root,root,755)
516 %attr(755,root,root) %{_libdir}/libdbus-qt-1.so.*.*.*
517
518 %files qt-devel
519 %defattr(644,root,root,755)
520 %attr(755,root,root) %{_libdir}/libdbus-qt-1.so
521 %{_libdir}/libdbus-qt-1.la
522 %{_includedir}/dbus*/dbus/dbus-qt.h
523
524 %files qt-static
525 %defattr(644,root,root,755)
526 %{_libdir}/libdbus-qt-1.a
527 %endif
528
529 %if %{with gcj}
530 %files gcj
531 %defattr(644,root,root,755)
532 %attr(755,root,root) %{_libdir}/lib*gcj*.so.*.*.*
533
534 %files gcj-devel
535 %defattr(644,root,root,755)
536 %attr(755,root,root) %{_libdir}/lib*gcj*.so
537 %{_libdir}/lib*gcj*.la
538 %{_datadir}/java/*.jar
539
540 %files gcj-static
541 %defattr(644,root,root,755)
542 %{_libdir}/lib*gcj*.a
543 %endif
544
545 %if %{with python}
546 %files -n python-dbus
547 %defattr(644,root,root,755)
548 %dir %{py_sitedir}/%{name}/
549 %attr(755,root,root) %{py_sitedir}/%{name}/*.so
550 %{py_sitedir}/dbus.pth
551 %{py_sitedir}/%{name}/*.py[co]
552 %endif
This page took 0.172802 seconds and 4 git commands to generate.