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