]> git.pld-linux.org Git - packages/dbus.git/blob - dbus.spec
8aed8a99bd28c038f3ed6273fc463c432e771dad
[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.95.5
24 %define         glib2_version   2.2.0
25 %define         qt_version      3.1.0
26 Summary:        D-BUS message bus
27 Summary(pl):    Magistrala przesy³ania komunikatów D-BUS
28 Name:           dbus
29 Version:        0.60
30 Release:        4
31 License:        AFL v2.1 or GPL v2
32 Group:          Libraries
33 Source0:        http://dbus.freedesktop.org/releases/%{name}-%{version}.tar.gz
34 # Source0-md5:  da9561b5e579cedddc34f53427e99a93
35 Source1:        messagebus.init
36 Source2:        %{name}-daemon-1-profile.d-sh
37 Source3:        %{name}-sysconfig
38 Source4:        %{name}-xinitrc.sh
39 Patch0:         %{name}-nolibs.patch
40 Patch1:         %{name}-config.patch
41 Patch2:         %{name}-mint.patch
42 Patch3:         %{name}-python_fixes.patch
43 Patch4:         %{name}-monodir.patch
44 Patch5:         %{name}-gcj.patch
45 URL:            http://www.freedesktop.org/Software/dbus
46 BuildRequires:  autoconf >= 2.52
47 BuildRequires:  automake
48 %{?with_python:BuildRequires:   cpp}
49 BuildRequires:  doxygen
50 BuildRequires:  expat-devel >= %{expat_version}
51 %{?with_gcj:BuildRequires:      gcc-java >= 5:4.0}
52 %{?with_glib:BuildRequires:     glib2-devel >= %{glib2_version}}
53 %{?with_gtk:BuildRequires:      gtk+2-devel >= %{glib2_version}}
54 BuildRequires:  xorg-lib-libSM-devel
55 BuildRequires:  xorg-lib-libX11-devel
56 %if %{with dotnet}
57 # just gtk-sharp for examples
58 #BuildRequires: dotnet-gtk-sharp-devel
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 >= 6:%{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 # don't build dotnet-gtk-sharp based examples
342 sed -i -e 's/example//' mono/Makefile.am
343
344 %build
345 %{__libtoolize}
346 %{__aclocal}
347 %{__autoconf}
348 %{__autoheader}
349 %{__automake}
350 %configure \
351         GCJFLAGS="%{rpmcflags}" \
352         QTDIR=/usr \
353         %{?debug:--enable-verbose-mode} \
354         %{?with_dotnet:--enable-mono} \
355         %{?with_dotnet:--enable-mono-docs} \
356         %{!?with_gcj:--disable-gcj} \
357         %{?with_gcj:--enable-gcj} \
358         %{!?with_glib:--disable-glib} \
359         %{!?with_gtk:--disable-gtk} \
360         %{!?with_python:--disable-python} \
361         %{?with_qt:--enable-qt3} \
362         --disable-asserts \
363         --disable-tests \
364         --enable-abstract-sockets \
365         --enable-selinux \
366         --with-console-auth-dir=%{_localstatedir}/lock/console/ \
367         --with-session-socket-dir=/tmp \
368         --with-system-pid-file=%{_localstatedir}/run/dbus.pid \
369         --with-xml=expat
370 %{__make} \
371         pythondir=%{py_sitedir}
372
373 %install
374 rm -rf $RPM_BUILD_ROOT
375 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
376 install -d $RPM_BUILD_ROOT/etc/profile.d
377 install -d $RPM_BUILD_ROOT/etc/sysconfig
378 install -d $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinitrc.d
379 install -d $RPM_BUILD_ROOT%{_datadir}/dbus-1/services
380 install -d $RPM_BUILD_ROOT%{_localstatedir}/run/dbus
381
382 %{__make} install \
383         DESTDIR=$RPM_BUILD_ROOT \
384         pythondir=%{py_sitedir}
385
386 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/messagebus
387 install %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d/dbus-daemon-1.sh
388 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/dbus
389 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinitrc.d/dbus.sh
390
391 %if %{with python}
392 rm -f $RPM_BUILD_ROOT%{py_sitedir}/%{name}/*.{py,la,a}
393 %endif
394
395 %clean
396 rm -rf $RPM_BUILD_ROOT
397
398 %pre
399 %groupadd -g 122 messagebus
400 %useradd -u 122 -d /usr/share/empty -s /bin/false -c "System message bus" -g messagebus messagebus
401
402 %post
403 /sbin/chkconfig --add messagebus
404 %service messagebus restart "D-Bus daemon"
405
406 %preun
407 if [ "$1" = "0" ];then
408         %service messagebus stop
409         /sbin/chkconfig --del messagebus
410 fi
411
412 %postun
413 if [ "$1" = "0" ]; then
414         %userremove messagebus
415         %groupremove messagebus
416 fi
417
418 %post   libs -p /sbin/ldconfig
419 %postun libs -p /sbin/ldconfig
420
421 %post   glib -p /sbin/ldconfig
422 %postun glib -p /sbin/ldconfig
423
424 %post   qt -p /sbin/ldconfig
425 %postun qt -p /sbin/ldconfig
426
427 %post   gcj -p /sbin/ldconfig
428 %postun gcj -p /sbin/ldconfig
429
430 %files
431 %defattr(644,root,root,755)
432 %attr(755,root,root) %{_bindir}/dbus-cleanup-sockets
433 %attr(755,root,root) %{_bindir}/dbus-daemon
434 %attr(755,root,root) %{_bindir}/dbus-launch
435 %attr(755,root,root) %{_bindir}/dbus-send
436 %dir %{_sysconfdir}/dbus-1
437 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dbus-1/*.conf
438 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dbus
439 %attr(754,root,root) /etc/rc.d/init.d/*
440 %attr(755,root,root) /etc/profile.d/dbus-daemon-1.sh
441 %dir %{_sysconfdir}/dbus-1/system.d
442 %dir %{_datadir}/dbus-1
443 %dir %{_datadir}/dbus-1/services
444 %dir %{_localstatedir}/run/dbus
445 %{_mandir}/man1/dbus-cleanup-sockets.1*
446 %{_mandir}/man1/dbus-daemon.1*
447 %{_mandir}/man1/dbus-send.1*
448
449 %files libs
450 %defattr(644,root,root,755)
451 %doc AUTHORS COPYING ChangeLog NEWS README doc/TODO
452 %attr(755,root,root) %{_libdir}/libdbus-1.so.*.*.*
453 %dir %{_libdir}/dbus-*
454
455 %files devel
456 %defattr(644,root,root,755)
457 %doc doc/*.{html,txt}
458 %attr(755,root,root) %{_libdir}/libdbus-1.so
459 %{_libdir}/libdbus-1.la
460 %{_libdir}/dbus-*/include
461 %{_pkgconfigdir}/dbus-1.pc
462 %{_includedir}/dbus*
463 %{?with_glib:%exclude %{_includedir}/dbus*/dbus/dbus-glib*.h}
464 %{?with_qt:%exclude %{_includedir}/dbus*/dbus/dbus-qt.h}
465
466 %files static
467 %defattr(644,root,root,755)
468 %{_libdir}/libdbus-1.a
469
470 %if %{with glib}
471 %files glib
472 %defattr(644,root,root,755)
473 %attr(755,root,root) %{_libdir}/libdbus-glib-1.so.*.*.*
474
475 %files glib-devel
476 %defattr(644,root,root,755)
477 %attr(755,root,root) %{_bindir}/dbus-binding-tool
478 %attr(755,root,root) %{_libdir}/libdbus-glib-1.so
479 %{_libdir}/libdbus-glib-1.la
480 %{_includedir}/dbus*/dbus/dbus-glib*.h
481 %{_pkgconfigdir}/dbus-glib-1.pc
482
483 %files glib-static
484 %defattr(644,root,root,755)
485 %{_libdir}/libdbus-glib-1.a
486
487 %files glib-tools
488 %defattr(644,root,root,755)
489 %attr(755,root,root) %{_bindir}/dbus-monitor
490 %{_mandir}/man1/dbus-monitor.1*
491 %endif
492
493 %if %{with gtk}
494 %files gtk
495 %defattr(644,root,root,755)
496 %attr(755,root,root) %{_bindir}/dbus-viewer
497 %endif
498
499 %files X11
500 %defattr(644,root,root,755)
501 %attr(755,root,root) %{_sysconfdir}/X11/xinit/xinitrc.d/dbus.sh
502 %{_mandir}/man1/dbus-launch.1*
503
504 %if %{with dotnet}
505 %files -n dotnet-%{name}-sharp
506 %defattr(644,root,root,755)
507 %{_prefix}/lib/mono/gac/dbus-sharp
508
509 %files -n dotnet-%{name}-sharp-devel
510 %defattr(644,root,root,755)
511 %{_prefix}/lib/mono/dbus-sharp
512 %{_libdir}/monodoc/sources/*
513 %{_pkgconfigdir}/dbus-sharp.pc
514 %endif
515
516 %if %{with qt}
517 %files qt
518 %defattr(644,root,root,755)
519 %attr(755,root,root) %{_libdir}/libdbus-qt-1.so.*.*.*
520
521 %files qt-devel
522 %defattr(644,root,root,755)
523 %attr(755,root,root) %{_libdir}/libdbus-qt-1.so
524 %{_libdir}/libdbus-qt-1.la
525 %{_includedir}/dbus*/dbus/dbus-qt.h
526
527 %files qt-static
528 %defattr(644,root,root,755)
529 %{_libdir}/libdbus-qt-1.a
530 %endif
531
532 %if %{with gcj}
533 %files gcj
534 %defattr(644,root,root,755)
535 %attr(755,root,root) %{_libdir}/lib*gcj*.so.*.*.*
536
537 %files gcj-devel
538 %defattr(644,root,root,755)
539 %attr(755,root,root) %{_libdir}/lib*gcj*.so
540 %{_libdir}/lib*gcj*.la
541 %{_datadir}/java/*.jar
542
543 %files gcj-static
544 %defattr(644,root,root,755)
545 %{_libdir}/lib*gcj*.a
546 %endif
547
548 %if %{with python}
549 %files -n python-dbus
550 %defattr(644,root,root,755)
551 %dir %{py_sitedir}/%{name}
552 %attr(755,root,root) %{py_sitedir}/%{name}/*.so
553 %{py_sitedir}/dbus.pth
554 %{py_sitedir}/%{name}/*.py[co]
555 %endif
This page took 0.057039 seconds and 3 git commands to generate.