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