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