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