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