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