]> git.pld-linux.org Git - packages/dbus.git/blob - dbus.spec
- removed to avoid unwanted deps
[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.62
33 Release:        1
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:  ba7692f63d0e9f1ef06703dff56cb650
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}-libs = %{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:       dotnet-%{name}-sharp = %{version}-%{release}
238
239 %description -n dotnet-%{name}-sharp-devel
240 .NET library for using D-BUS, with API documentation.
241
242 %description -n dotnet-%{name}-sharp-devel -l pl
243 Biblioteka .NET do u¿ywania D-BUS, zawiera dokumentacjê API.
244
245 %package qt
246 Summary:        Qt-based library for using D-BUS
247 Summary(pl):    Biblioteka do u¿ywania D-BUS oparta o Qt
248 Group:          Libraries
249 Requires:       %{name}-libs = %{version}-%{release}
250
251 %description qt
252 D-BUS add-on library to integrate the standard D-BUS library with the
253 Qt thread abstraction and main loop.
254
255 %description qt -l pl
256 Dodatkowa biblioteka D-BUS do integracji standardowej biblioteki D-BUS
257 z abstrakcj± w±tków i g³ówn± pêtl± Qt.
258
259 %package qt-devel
260 Summary:        Header files for Qt-based library for using D-BUS
261 Summary(pl):    Pliki nag³ówkowe biblioteki do u¿ywania D-BUS opartej o Qt
262 Group:          Development/Libraries
263 Requires:       %{name}-devel = %{version}-%{release}
264 Requires:       %{name}-qt = %{version}-%{release}
265
266 %description qt-devel
267 Header files for Qt-based library for using D-BUS.
268
269 %description qt-devel -l pl
270 Pliki nag³ówkowe biblioteki do u¿ywania D-BUS opartej o Qt.
271
272 %package qt-static
273 Summary:        Static Qt-based library for using D-BUS
274 Summary(pl):    Statyczna biblioteka do u¿ywania D-BUS oparta o Qt
275 Group:          Development/Libraries
276 Requires:       %{name}-qt-devel = %{version}-%{release}
277
278 %description qt-static
279 Static Qt-based library for using D-BUS.
280
281 %description qt-static -l pl
282 Statyczna biblioteka do u¿ywania D-BUS oparta o Qt.
283
284 %package gcj
285 Summary:        Java library for using D-BUS
286 Summary(pl):    Biblioteka do u¿ywania D-BUS oparta o Javê
287 Group:          Libraries
288 Requires:       %{name} = %{version}-%{release}
289
290 %description gcj
291 D-BUS add-on library to integrate the standard D-BUS library with
292 Java.
293
294 %description gcj -l pl
295 Dodatkowa biblioteka D-BUS do integracji standardowej biblioteki D-BUS
296 z Jav±.
297
298 %package gcj-devel
299 Summary:        Header files for Java-based library for using D-BUS
300 Summary(pl):    Pliki nag³ówkowe biblioteki do u¿ywania D-BUS opartej o Javê
301 Group:          Development/Libraries
302 Requires:       %{name}-gcj = %{version}-%{release}
303
304 %description gcj-devel
305 Header files for Java-based library for using D-BUS.
306
307 %description gcj-devel -l pl
308 Pliki nag³ówkowe biblioteki do u¿ywania D-BUS opartej o Javê.
309
310 %package gcj-static
311 Summary:        Static Java-based library for using D-BUS
312 Summary(pl):    Statyczna biblioteka do u¿ywania D-BUS oparta o Javê
313 Group:          Development/Libraries
314 Requires:       %{name}-gcj-devel = %{version}-%{release}
315
316 %description gcj-static
317 Static Java-based library for using D-BUS.
318
319 %description gcj-static -l pl
320 Statyczna biblioteka do u¿ywania D-BUS oparta o Javê.
321
322 %package -n python-dbus
323 Summary:        Python library for using D-BUS
324 Summary(pl):    Biblioteka do u¿ywania D-BUS oparta o Pythona
325 Group:          Libraries
326 Requires:       %{name}-libs = %{version}-%{release}
327 %pyrequires_eq  python
328 Requires:       python-libxml2
329
330 %description -n python-dbus
331 D-BUS add-on library to integrate the standard D-BUS library with
332 Python.
333
334 %description -n python-dbus -l pl
335 Dodatkowa biblioteka D-BUS do integracji standardowej biblioteki D-BUS
336 z Pythonem.
337
338 %prep
339 %setup -q
340 %patch0 -p1
341 %patch1 -p1
342 %patch2 -p0
343 %patch3 -p1
344 %patch4 -p1
345 %patch5 -p1
346 sed -i -e 's/DBUS_QT3_LIBS=.*/DBUS_QT3_LIBS="-lqt-mt"/' configure.in
347
348 # don't build dotnet-gtk-sharp based examples
349 # (depends on old gtk-sharp)
350 sed -i -e 's/example//' mono/Makefile.am
351
352 %build
353 %{__libtoolize}
354 %{__aclocal}
355 %{__autoconf}
356 %{__autoheader}
357 %{__automake}
358 %configure \
359         GCJFLAGS="%{rpmcflags}" \
360         QTDIR=/usr \
361         %{?debug:--enable-verbose-mode} \
362         %{?with_dotnet:--enable-mono} \
363         %{?with_dotnet:--enable-mono-docs} \
364         %{!?with_gcj:--disable-gcj} \
365         %{?with_gcj:--enable-gcj} \
366         %{!?with_glib:--disable-glib} \
367         %{!?with_gtk:--disable-gtk} \
368         %{!?with_python:--disable-python} \
369         %{?with_qt:--enable-qt3 --with-qt3-moc=/usr/bin/moc} \
370         %{?with_qt4:--enable-qt --with-qt-moc=%{_libdir}/qt4/bin/moc}%{!?with_qt4:--with-qt-moc=/NOWHERE} \
371         --disable-asserts \
372         --disable-tests \
373         --enable-abstract-sockets \
374         --enable-selinux \
375         --with-console-auth-dir=%{_localstatedir}/lock/console/ \
376         --with-session-socket-dir=/tmp \
377         --with-system-pid-file=%{_localstatedir}/run/dbus.pid \
378         --with-xml=expat
379 %{__make} \
380         JAR=fastjar \
381         pythondir=%{py_sitedir}
382
383 %install
384 rm -rf $RPM_BUILD_ROOT
385 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
386 install -d $RPM_BUILD_ROOT/etc/profile.d
387 install -d $RPM_BUILD_ROOT/etc/sysconfig
388 install -d $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinitrc.d
389 install -d $RPM_BUILD_ROOT%{_datadir}/dbus-1/services
390 install -d $RPM_BUILD_ROOT%{_localstatedir}/run/dbus
391
392 %{__make} install \
393         DESTDIR=$RPM_BUILD_ROOT \
394         JAR=fastjar \
395         pythondir=%{py_sitedir}
396
397 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/messagebus
398 install %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d/dbus-daemon-1.sh
399 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/dbus
400 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinitrc.d/dbus.sh
401
402 %if %{with python}
403 rm -f $RPM_BUILD_ROOT%{py_sitedir}/%{name}/*.{py,la,a}
404 %endif
405
406 %clean
407 rm -rf $RPM_BUILD_ROOT
408
409 %pre
410 %groupadd -g 122 messagebus
411 %useradd -u 122 -d /usr/share/empty -s /bin/false -c "System message bus" -g messagebus messagebus
412
413 %post
414 /sbin/chkconfig --add messagebus
415 %service messagebus restart "D-Bus daemon"
416
417 %preun
418 if [ "$1" = "0" ];then
419         %service messagebus stop
420         /sbin/chkconfig --del messagebus
421 fi
422
423 %postun
424 if [ "$1" = "0" ]; then
425         %userremove messagebus
426         %groupremove messagebus
427 fi
428
429 %post   libs -p /sbin/ldconfig
430 %postun libs -p /sbin/ldconfig
431
432 %post   glib -p /sbin/ldconfig
433 %postun glib -p /sbin/ldconfig
434
435 %post   qt -p /sbin/ldconfig
436 %postun qt -p /sbin/ldconfig
437
438 %post   gcj -p /sbin/ldconfig
439 %postun gcj -p /sbin/ldconfig
440
441 %files
442 %defattr(644,root,root,755)
443 %attr(755,root,root) %{_bindir}/dbus-cleanup-sockets
444 %attr(755,root,root) %{_bindir}/dbus-daemon
445 # R: libX11
446 %attr(755,root,root) %{_bindir}/dbus-launch
447 %attr(755,root,root) %{_bindir}/dbus-send
448 %dir %{_sysconfdir}/dbus-1
449 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dbus-1/*.conf
450 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dbus
451 %attr(754,root,root) /etc/rc.d/init.d/*
452 %attr(755,root,root) /etc/profile.d/dbus-daemon-1.sh
453 %dir %{_sysconfdir}/dbus-1/system.d
454 %dir %{_datadir}/dbus-1
455 %dir %{_datadir}/dbus-1/services
456 %dir %{_localstatedir}/run/dbus
457 %{_mandir}/man1/dbus-cleanup-sockets.1*
458 %{_mandir}/man1/dbus-daemon.1*
459 %{_mandir}/man1/dbus-launch.1*
460 %{_mandir}/man1/dbus-send.1*
461
462 %files libs
463 %defattr(644,root,root,755)
464 %doc AUTHORS COPYING ChangeLog NEWS README doc/TODO
465 %attr(755,root,root) %{_libdir}/libdbus-1.so.*.*.*
466 %dir %{_libdir}/dbus-*
467
468 %files devel
469 %defattr(644,root,root,755)
470 %doc doc/*.{html,txt}
471 %attr(755,root,root) %{_libdir}/libdbus-1.so
472 %{_libdir}/libdbus-1.la
473 %{_libdir}/dbus-*/include
474 %{_pkgconfigdir}/dbus-1.pc
475 %{_includedir}/dbus*
476 %{?with_glib:%exclude %{_includedir}/dbus*/dbus/dbus-glib*.h}
477 %{?with_qt:%exclude %{_includedir}/dbus*/dbus/dbus-qt.h}
478
479 %files static
480 %defattr(644,root,root,755)
481 %{_libdir}/libdbus-1.a
482
483 %if %{with glib}
484 %files glib
485 %defattr(644,root,root,755)
486 %attr(755,root,root) %{_libdir}/libdbus-glib-1.so.*.*.*
487
488 %files glib-devel
489 %defattr(644,root,root,755)
490 %attr(755,root,root) %{_bindir}/dbus-binding-tool
491 %attr(755,root,root) %{_libdir}/libdbus-glib-1.so
492 %{_libdir}/libdbus-glib-1.la
493 %{_includedir}/dbus*/dbus/dbus-glib*.h
494 %{_pkgconfigdir}/dbus-glib-1.pc
495
496 %files glib-static
497 %defattr(644,root,root,755)
498 %{_libdir}/libdbus-glib-1.a
499
500 %files glib-tools
501 %defattr(644,root,root,755)
502 %attr(755,root,root) %{_bindir}/dbus-monitor
503 %{_mandir}/man1/dbus-monitor.1*
504 %endif
505
506 %if %{with gtk}
507 %files gtk
508 %defattr(644,root,root,755)
509 %attr(755,root,root) %{_bindir}/dbus-viewer
510 %endif
511
512 %files X11
513 %defattr(644,root,root,755)
514 %attr(755,root,root) %{_sysconfdir}/X11/xinit/xinitrc.d/dbus.sh
515
516 %if %{with dotnet}
517 %files -n dotnet-%{name}-sharp
518 %defattr(644,root,root,755)
519 %{_prefix}/lib/mono/gac/dbus-sharp
520
521 %files -n dotnet-%{name}-sharp-devel
522 %defattr(644,root,root,755)
523 %{_prefix}/lib/mono/dbus-sharp
524 %{_libdir}/monodoc/sources/*
525 %{_pkgconfigdir}/dbus-sharp.pc
526 %endif
527
528 %if %{with qt}
529 %files qt
530 %defattr(644,root,root,755)
531 %attr(755,root,root) %{_libdir}/libdbus-qt-1.so.*.*.*
532
533 %files qt-devel
534 %defattr(644,root,root,755)
535 %attr(755,root,root) %{_libdir}/libdbus-qt-1.so
536 %{_libdir}/libdbus-qt-1.la
537 %{_includedir}/dbus*/dbus/dbus-qt.h
538
539 %files qt-static
540 %defattr(644,root,root,755)
541 %{_libdir}/libdbus-qt-1.a
542 %endif
543
544 %if %{with gcj}
545 %files gcj
546 %defattr(644,root,root,755)
547 %attr(755,root,root) %{_libdir}/lib*gcj*.so.*.*.*
548
549 %files gcj-devel
550 %defattr(644,root,root,755)
551 %attr(755,root,root) %{_libdir}/lib*gcj*.so
552 %{_libdir}/lib*gcj*.la
553 %{_datadir}/java/*.jar
554
555 %files gcj-static
556 %defattr(644,root,root,755)
557 %{_libdir}/lib*gcj*.a
558 %endif
559
560 %if %{with python}
561 %files -n python-dbus
562 %defattr(644,root,root,755)
563 %dir %{py_sitedir}/%{name}
564 %attr(755,root,root) %{py_sitedir}/%{name}/*.so
565 %{py_sitedir}/dbus.pth
566 %{py_sitedir}/%{name}/*.py[co]
567 %endif
This page took 0.08971 seconds and 3 git commands to generate.