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