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