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