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