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