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