]> git.pld-linux.org Git - packages/dbus.git/blob - dbus.spec
- use default FHS compilant sockets dir, rel.2
[packages/dbus.git] / dbus.spec
1 #
2 %include        /usr/lib/rpm/macros.mono
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_without  python  # without Python support
9 %bcond_without  dotnet  # without .NET support
10 %bcond_with     gcj     # with Java support
11 #
12 %if %{without glib}
13 %undefine       with_gtk
14 %endif
15
16 %ifnarch %{ix86} %{x8664} arm hppa ppc s390 s390x
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:        2
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 URL:            http://www.freedesktop.org/Software/dbus
41 BuildRequires:  XFree86-devel
42 BuildRequires:  autoconf >= 2.52
43 BuildRequires:  automake
44 BuildRequires:  expat-devel >= %{expat_version}
45 BuildRequires:  doxygen
46 %{?with_glib:BuildRequires:     glib2-devel >= %{glib2_version}}
47 %{?with_gcj:BuildRequires:      gcc-java >= 5:4.0}
48 %{?with_gtk:BuildRequires:      gtk+2-devel >= %{glib2_version}}
49 %{?with_qt:BuildRequires:       kdelibs-devel}
50 # just gtk-sharp for examples
51 %{?with_dotnet:BuildRequires:   dotnet-gtk-sharp-devel}
52 %{?with_dotnet:BuildRequires:   mono-csharp >= 0.95}
53 %{?with_dotnet:BuildRequires:   monodoc >= 1.0.7-2}
54 BuildRequires:  libselinux-devel
55 BuildRequires:  libtool
56 BuildRequires:  pkgconfig
57 %if %{with python}
58 BuildRequires:  python-devel >= 2.2
59 BuildRequires:  python-Pyrex >= 0.9.3
60 %endif
61 %{?with_qt:BuildRequires:       qt-devel >= %{qt_version}}
62 BuildRequires:  rpmbuild(macros) >= 1.202
63 BuildRequires:  sed >= 4.0
64 BuildRequires:  xmlto
65 Requires:       rc-scripts
66 Requires:       %{name}-libs = %{version}-%{release}
67 Requires(pre):  /bin/id
68 Requires(pre):  /usr/bin/getgid
69 Requires(pre):  /usr/sbin/groupadd
70 Requires(pre):  /usr/sbin/useradd
71 Requires(post,preun):   /sbin/chkconfig
72 Requires(post,postun):  /sbin/ldconfig
73 Requires(postun):       /usr/sbin/groupdel
74 Requires(postun):       /usr/sbin/userdel
75 Provides:       group(messagebus)
76 Provides:       user(messagebus)
77 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
78
79 %description
80 D-BUS is a system for sending messages between applications. It is
81 used both for the systemwide message bus service, and as a
82 per-user-login-session messaging facility.
83
84 %description -l pl
85 D-BUS to system przesy³ania komunikatów pomiêdzy aplikacjami. Jest
86 u¿ywany zarówno jako ogólnosystemowa us³uga magistrali komunikatów jak
87 i mo¿liwo¶æ przesy³ania komunikatów w ramach jednej sesji u¿ytkownika.
88
89 %package devel
90 Summary:        Header files for D-BUS
91 Summary(pl):    Pliki nag³ówkowe D-BUS
92 Group:          Development/Libraries
93 Requires:       %{name}-libs = %{version}-%{release}
94
95 %description devel
96 Header files for D-BUS.
97
98 %description devel -l pl
99 Pliki nag³ówkowe D-BUS.
100
101 %package libs
102 Summary:        D-BUS libraries
103 Summary(pl):    Biblioteki D-BUS
104 Group:          Libraries
105
106 %description libs
107 D-BUS libraries.
108
109 %description libs -l pl
110 Biblioteki D-BUS.
111
112 %package static
113 Summary:        Static D-BUS libraries
114 Summary(pl):    Statyczne biblioteki D-BUS
115 Group:          Development/Libraries
116 Requires:       %{name}-devel = %{version}-%{release}
117
118 %description static
119 Static D-BUS libraries.
120
121 %description static -l pl
122 Statyczne biblioteki D-BUS.
123
124 %package glib
125 Summary:        GLib-based library for using D-BUS
126 Summary(pl):    Biblioteka do u¿ywania D-BUS oparta o GLib
127 Group:          Libraries
128 Requires:       %{name}-libs = %{version}-%{release}
129 Requires:       glib2 >= %{glib2_version}
130
131 %description glib
132 D-BUS add-on library to integrate the standard D-BUS library with the
133 GLib thread abstraction and main loop.
134
135 %description glib -l pl
136 Dodatkowa biblioteka D-BUS do integracji standardowej biblioteki D-BUS
137 z abstrakcj± w±tków i g³ówn± pêtl± GLib.
138
139 %package glib-devel
140 Summary:        Header files for GLib-based library for using D-BUS
141 Summary(pl):    Pliki nag³ówkowe biblioteki do u¿ywania D-BUS opartej o GLib
142 Group:          Development/Libraries
143 Requires:       %{name}-devel = %{version}-%{release}
144 Requires:       %{name}-glib = %{version}-%{release}
145 Requires:       glib2-devel >= %{glib2_version}
146
147 %description glib-devel
148 Header files for GLib-based library for using D-BUS.
149
150 %description glib-devel -l pl
151 Pliki nag³ówkowe biblioteki do u¿ywania D-BUS opartej o GLib.
152
153 %package glib-static
154 Summary:        Static GLib-based library for using D-BUS
155 Summary(pl):    Statyczna biblioteka do u¿ywania D-BUS oparta o GLib
156 Group:          Development/Libraries
157 Requires:       %{name}-glib-devel = %{version}-%{release}
158
159 %description glib-static
160 Static GLib-based library for using D-BUS.
161
162 %description glib-static -l pl
163 Statyczna biblioteka do u¿ywania D-BUS oparta o GLib.
164
165 %package glib-tools
166 Summary:        GLib-based tools for D-BUS
167 Summary(pl):    Narzêdzia dla D-BUS oparte o GLib
168 Group:          Libraries
169 Requires:       %{name} = %{version}-%{release}
170 Requires:       %{name}-glib = %{version}-%{release}
171
172 %description glib-tools
173 GLib-based tools for D-BUS.
174
175 %description glib-tools -l pl
176 Narzêdzia dla D-BUS oparte o GLib
177
178 %package gtk
179 Summary:        GTK+-based graphical D-BUS frontend utility
180 Summary(pl):    Oparte na GTK+ graficzne narzêdzie do D-BUS
181 Group:          X11/Applications
182 Requires:       %{name} = %{version}-%{release}
183 Requires:       %{name}-glib = %{version}-%{release}
184
185 %description gtk
186 GTK+-based graphical D-BUS frontend utility.
187
188 %description gtk -l pl
189 Oparte na GTK+ graficzne narzêdzie do D-BUS.
190
191 %package X11
192 Summary:        X11 D-BUS utilities
193 Summary(pl):    Narzêdzia X11 D-BUSa
194 Group:          X11/Applications
195 Requires:       %{name} = %{version}-%{release}
196 Requires:       xinitrc
197
198 %description X11
199 X11 D-BUS utilities.
200
201 %description X11 -l pl
202 Narzêdzia X11 D-BUSa.
203
204 %package -n dotnet-%{name}-sharp
205 Summary:        .NET library for using D-BUS
206 Summary(pl):    Biblioteka .NET do u¿ywania D-BUS
207 Group:          Development/Libraries
208 Requires:       %{name} = %{version}-%{release}
209 Requires:       mono
210
211 %description -n dotnet-%{name}-sharp
212 .NET library for using D-BUS.
213
214 %description -n dotnet-%{name}-sharp -l pl
215 Biblioteka .NET do u¿ywania D-BUS.
216
217 %package -n dotnet-%{name}-sharp-devel
218 Summary:        .NET library for using D-BUS with API documentation
219 Summary(pl):    Biblioteka .NET do u¿ywania D-BUS, zawiera dokumentacjê API
220 Group:          Development/Libraries
221 Requires:       dotnet-%{name}-sharp = %{version}-%{release}
222 Requires:       %{name} = %{version}-%{release}
223
224 %description -n dotnet-%{name}-sharp-devel
225 .NET library for using D-BUS, with API documentation.
226
227 %description -n dotnet-%{name}-sharp-devel -l pl
228 Biblioteka .NET do u¿ywania D-BUS, zawiera dokumentacjê API.
229
230 %package qt
231 Summary:        Qt-based library for using D-BUS
232 Summary(pl):    Biblioteka do u¿ywania D-BUS oparta o Qt
233 Group:          Libraries
234 Requires:       %{name}-libs = %{version}-%{release}
235
236 %description qt
237 D-BUS add-on library to integrate the standard D-BUS library with the
238 Qt thread abstraction and main loop.
239
240 %description qt -l pl
241 Dodatkowa biblioteka D-BUS do integracji standardowej biblioteki D-BUS
242 z abstrakcj± w±tków i g³ówn± pêtl± Qt.
243
244 %package qt-devel
245 Summary:        Header files for Qt-based library for using D-BUS
246 Summary(pl):    Pliki nag³ówkowe biblioteki do u¿ywania D-BUS opartej o Qt
247 Group:          Development/Libraries
248 Requires:       %{name}-devel = %{version}-%{release}
249 Requires:       %{name}-qt = %{version}-%{release}
250 Requires:       kdelibs-devel
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-send
430 %dir %{_sysconfdir}/dbus-1
431 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dbus-1/*.conf
432 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dbus
433 %attr(754,root,root) /etc/rc.d/init.d/*
434 %attr(755,root,root) /etc/profile.d/dbus-daemon-1.sh
435 %dir %{_sysconfdir}/dbus-1/system.d
436 %dir %{_datadir}/dbus-1
437 %dir %{_datadir}/dbus-1/services
438 %dir %{_localstatedir}/run/dbus
439 %{_mandir}/man1/dbus-cleanup-sockets.1*
440 %{_mandir}/man1/dbus-daemon.1*
441 %{_mandir}/man1/dbus-send.1*
442
443 %files libs
444 %defattr(644,root,root,755)
445 %doc AUTHORS COPYING ChangeLog NEWS README doc/TODO
446 %attr(755,root,root) %{_libdir}/libdbus-1.so.*.*.*
447 %dir %{_libdir}/dbus-*
448
449 %files devel
450 %defattr(644,root,root,755)
451 %doc doc/*.{html,txt}
452 %attr(755,root,root) %{_libdir}/libdbus-1.so
453 %{_libdir}/libdbus-1.la
454 %{_libdir}/dbus-*/include
455 %{_pkgconfigdir}/dbus-1.pc
456 %{_includedir}/dbus*
457 %{?with_glib:%exclude %{_includedir}/dbus*/dbus/dbus-glib*.h}
458 %{?with_qt:%exclude %{_includedir}/dbus*/dbus/dbus-qt.h}
459
460 %files static
461 %defattr(644,root,root,755)
462 %{_libdir}/libdbus-1.a
463
464 %if %{with glib}
465 %files glib
466 %defattr(644,root,root,755)
467 %attr(755,root,root) %{_libdir}/libdbus-glib-1.so.*.*.*
468
469 %files glib-devel
470 %defattr(644,root,root,755)
471 %attr(755,root,root) %{_bindir}/dbus-binding-tool
472 %attr(755,root,root) %{_libdir}/libdbus-glib-1.so
473 %{_libdir}/libdbus-glib-1.la
474 %{_includedir}/dbus*/dbus/dbus-glib*.h
475 %{_pkgconfigdir}/dbus-glib-1.pc
476
477 %files glib-static
478 %defattr(644,root,root,755)
479 %{_libdir}/libdbus-glib-1.a
480
481 %files glib-tools
482 %defattr(644,root,root,755)
483 %attr(755,root,root) %{_bindir}/dbus-monitor
484 %{_mandir}/man1/dbus-monitor.1*
485 %endif
486
487 %if %{with gtk}
488 %files gtk
489 %defattr(644,root,root,755)
490 %attr(755,root,root) %{_bindir}/dbus-viewer
491 %endif
492
493 %files X11
494 %defattr(644,root,root,755)
495 %attr(755,root,root) %{_bindir}/dbus-launch
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.078624 seconds and 4 git commands to generate.