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