]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without selinux # build without SELinux support | |
4 | %bcond_without X11 # build without X11 support | |
5 | ||
6 | %define expat_version 1:1.95.5 | |
7 | Summary: D-BUS message bus | |
8 | Summary(pl.UTF-8): Magistrala przesyłania komunikatów D-BUS | |
9 | Name: dbus | |
10 | Version: 1.6.8 | |
11 | Release: 1 | |
12 | License: AFL v2.1 or GPL v2 | |
13 | Group: Libraries | |
14 | Source0: http://dbus.freedesktop.org/releases/dbus/%{name}-%{version}.tar.gz | |
15 | # Source0-md5: 3bf059c7dd5eda5f539a1b7cfe7a14a2 | |
16 | Source1: messagebus.init | |
17 | Source2: %{name}-daemon-1-profile.d-sh | |
18 | Source3: %{name}-sysconfig | |
19 | Source4: %{name}-xinitrc.sh | |
20 | Source5: messagebus.upstart | |
21 | Source6: %{name}.tmpfiles | |
22 | Patch0: %{name}-nolibs.patch | |
23 | Patch1: %{name}-config.patch | |
24 | Patch2: %{name}-no_fatal_checks.patch | |
25 | Patch3: %{name}-allow-introspection.patch | |
26 | URL: http://www.freedesktop.org/Software/dbus | |
27 | BuildRequires: audit-libs-devel | |
28 | BuildRequires: autoconf >= 2.63 | |
29 | BuildRequires: automake >= 1:1.10 | |
30 | BuildRequires: doxygen | |
31 | BuildRequires: expat-devel >= %{expat_version} | |
32 | BuildRequires: libcap-ng-devel | |
33 | %{?with_selinux:BuildRequires: libselinux-devel} | |
34 | BuildRequires: libtool >= 2:2.0 | |
35 | BuildRequires: libxslt-progs | |
36 | BuildRequires: pkgconfig | |
37 | BuildRequires: rpmbuild(macros) >= 1.626 | |
38 | BuildRequires: sed >= 4.0 | |
39 | BuildRequires: systemd-devel >= 32 | |
40 | BuildRequires: xmlto | |
41 | %{?with_X11:BuildRequires: xorg-lib-libX11-devel} | |
42 | Requires(post,postun): /sbin/ldconfig | |
43 | Requires(post,preun): /sbin/chkconfig | |
44 | Requires(postun): /usr/sbin/groupdel | |
45 | Requires(postun): /usr/sbin/userdel | |
46 | Requires(pre): /bin/id | |
47 | Requires(pre): /usr/bin/getgid | |
48 | Requires(pre): /usr/sbin/groupadd | |
49 | Requires(pre): /usr/sbin/useradd | |
50 | Requires(post,preun,postun): systemd-units >= 38 | |
51 | Requires: %{name}-dirs = %{version}-%{release} | |
52 | Requires: %{name}-libs = %{version}-%{release} | |
53 | Requires: expat >= %{expat_version} | |
54 | Requires: rc-scripts >= 0.4.3.0 | |
55 | Requires: systemd-units >= 38 | |
56 | Provides: group(messagebus) | |
57 | Provides: user(messagebus) | |
58 | Obsoletes: dbus-glib-tools | |
59 | Obsoletes: dbus-systemd | |
60 | Conflicts: pam < 0.99.7.1 | |
61 | # not available for dbus 0.9x yet(?) | |
62 | #Obsoletes: dbus-gtk dbus-gcj dbus-gcj-devel dbus-gcj-static | |
63 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
64 | ||
65 | %description | |
66 | D-BUS is a system for sending messages between applications. It is | |
67 | used both for the systemwide message bus service, and as a | |
68 | per-user-login-session messaging facility. | |
69 | ||
70 | %description -l pl.UTF-8 | |
71 | D-BUS to system przesyłania komunikatów pomiędzy aplikacjami. Jest | |
72 | używany zarówno jako ogólnosystemowa usługa magistrali komunikatów jak | |
73 | i możliwość przesyłania komunikatów w ramach jednej sesji użytkownika. | |
74 | ||
75 | %package upstart | |
76 | Summary: Upstart job description for system message bus | |
77 | Summary(pl.UTF-8): Opis zadania Upstart dla magistrali systemowej DBus | |
78 | Group: Daemons | |
79 | Requires: %{name} = %{version}-%{release} | |
80 | Requires: upstart >= 0.6 | |
81 | ||
82 | %description upstart | |
83 | Upstart job description for system message bus. | |
84 | ||
85 | %description upstart -l pl.UTF-8 | |
86 | Opis zadania Upstart dla magistrali systemowej DBus. | |
87 | ||
88 | %package dirs | |
89 | Summary: D-BUS directories | |
90 | Summary(pl.UTF-8): Katalogi D-BUS | |
91 | Group: Libraries | |
92 | ||
93 | %description dirs | |
94 | D-BUS directories. | |
95 | ||
96 | %description dirs -l pl.UTF-8 | |
97 | Katalogi D-BUS. | |
98 | ||
99 | %package libs | |
100 | Summary: D-BUS library | |
101 | Summary(pl.UTF-8): Biblioteka D-BUS | |
102 | Group: Libraries | |
103 | ||
104 | %description libs | |
105 | D-BUS library. | |
106 | ||
107 | %description libs -l pl.UTF-8 | |
108 | Biblioteka D-BUS. | |
109 | ||
110 | %package devel | |
111 | Summary: Header files for D-BUS library | |
112 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki D-BUS | |
113 | Group: Development/Libraries | |
114 | Requires: %{name}-libs = %{version}-%{release} | |
115 | ||
116 | %description devel | |
117 | Header files for D-BUS library. | |
118 | ||
119 | %description devel -l pl.UTF-8 | |
120 | Pliki nagłówkowe biblioteki D-BUS. | |
121 | ||
122 | %package static | |
123 | Summary: Static D-BUS library | |
124 | Summary(pl.UTF-8): Statyczna biblioteka D-BUS | |
125 | Group: Development/Libraries | |
126 | Requires: %{name}-devel = %{version}-%{release} | |
127 | ||
128 | %description static | |
129 | Static D-BUS library. | |
130 | ||
131 | %description static -l pl.UTF-8 | |
132 | Statyczna biblioteka D-BUS. | |
133 | ||
134 | %package x11 | |
135 | Summary: X11 session support for D-BUS | |
136 | Summary(pl.UTF-8): Obsługa sesji X11 dla D-BUS | |
137 | Group: X11/Applications | |
138 | Requires: %{name} = %{version}-%{release} | |
139 | Obsoletes: dbus-X11 | |
140 | ||
141 | %description x11 | |
142 | This package contains D-BUS utilities to start D-BUS service together | |
143 | with user X11 session. | |
144 | ||
145 | %description x11 -l pl.UTF-8 | |
146 | Ten pakiet zawiera narzędzia D-BUS pozwalające na uruchomienie usługi | |
147 | D-BUS wraz z sesją X11 użytkownika. | |
148 | ||
149 | %prep | |
150 | %setup -q | |
151 | %patch0 -p1 | |
152 | %patch1 -p1 | |
153 | %patch2 -p1 | |
154 | %patch3 -p1 | |
155 | ||
156 | %build | |
157 | %{__libtoolize} | |
158 | %{__aclocal} -I m4 | |
159 | %{__autoconf} | |
160 | %{__autoheader} | |
161 | %{__automake} | |
162 | %configure \ | |
163 | %{?debug:--enable-verbose-mode} \ | |
164 | --disable-asserts \ | |
165 | --disable-silent-rules \ | |
166 | --disable-tests \ | |
167 | --enable-abstract-sockets=auto \ | |
168 | %{?with_selinux:--enable-selinux} \ | |
169 | --with-console-auth-dir=%{_localstatedir}/run/console/ \ | |
170 | --with-session-socket-dir=/tmp \ | |
171 | --with-system-pid-file=%{_localstatedir}/run/dbus.pid \ | |
172 | --with-xml=expat \ | |
173 | --with-systemdsystemunitdir=%{systemdunitdir} \ | |
174 | %{!?with_X11:--without-x} | |
175 | %{__make} | |
176 | ||
177 | %install | |
178 | rm -rf $RPM_BUILD_ROOT | |
179 | install -d $RPM_BUILD_ROOT/etc/{init,profile.d,rc.d/init.d,sysconfig,X11/xinit/xinitrc.d} \ | |
180 | $RPM_BUILD_ROOT%{_datadir}/dbus-1/{services,interfaces} \ | |
181 | $RPM_BUILD_ROOT%{_localstatedir}/run/dbus \ | |
182 | $RPM_BUILD_ROOT%{_localstatedir}/lib/dbus \ | |
183 | $RPM_BUILD_ROOT/%{_lib} \ | |
184 | $RPM_BUILD_ROOT/usr/lib/tmpfiles.d | |
185 | ||
186 | %{__make} install \ | |
187 | DESTDIR=$RPM_BUILD_ROOT | |
188 | ||
189 | install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/messagebus | |
190 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d/dbus-daemon-1.sh | |
191 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/messagebus | |
192 | install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d | |
193 | cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/init/messagebus.conf | |
194 | ||
195 | install %{SOURCE6} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf | |
196 | ||
197 | # upstart (/sbin/init) requires libdbus so it must be in /lib(64) | |
198 | mv -f $RPM_BUILD_ROOT%{_libdir}/libdbus-1.so.* $RPM_BUILD_ROOT/%{_lib} | |
199 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libdbus-1.so.*.*.*) \ | |
200 | $RPM_BUILD_ROOT%{_libdir}/libdbus-1.so | |
201 | ||
202 | ln -s dbus.service $RPM_BUILD_ROOT%{systemdunitdir}/messagebus.service | |
203 | ||
204 | %{__rm} -rf $RPM_BUILD_ROOT%{_docdir}/dbus/api | |
205 | ||
206 | %clean | |
207 | rm -rf $RPM_BUILD_ROOT | |
208 | ||
209 | %pre | |
210 | %groupadd -g 122 messagebus | |
211 | %useradd -u 122 -d /usr/share/empty -s /bin/false -c "System message bus" -g 122 messagebus | |
212 | ||
213 | %post | |
214 | /sbin/chkconfig --add messagebus | |
215 | %service messagebus restart "D-Bus daemon" | |
216 | export NORESTART="yes" | |
217 | %systemd_post messagebus.service | |
218 | ||
219 | %preun | |
220 | if [ "$1" = "0" ];then | |
221 | %service messagebus stop | |
222 | /sbin/chkconfig --del messagebus | |
223 | fi | |
224 | ||
225 | %postun | |
226 | if [ "$1" = "0" ]; then | |
227 | %userremove messagebus | |
228 | %groupremove messagebus | |
229 | fi | |
230 | %systemd_reload | |
231 | ||
232 | %triggerpostun -- dbus < 1.4.16-5 | |
233 | %systemd_trigger messagebus.service | |
234 | if [ -f /etc/sysconfig/dbus ]; then | |
235 | mv -f /etc/sysconfig/messagebus{,.rpmnew} | |
236 | mv -f /etc/sysconfig/{dbus,messagebus} | |
237 | elif [ -f /etc/sysconfig/dbus.rpmsave ]; then | |
238 | mv -f /etc/sysconfig/messagebus{,.rpmnew} | |
239 | mv -f /etc/sysconfig/{dbus.rpmsave,messagebus} | |
240 | fi | |
241 | ||
242 | %if 0 | |
243 | %post upstart | |
244 | %upstart_post messagebus | |
245 | ||
246 | %postun upstart | |
247 | %upstart_postun messagebus | |
248 | %endif | |
249 | ||
250 | %post libs -p /sbin/ldconfig | |
251 | %postun libs -p /sbin/ldconfig | |
252 | ||
253 | %files | |
254 | %defattr(644,root,root,755) | |
255 | %attr(755,root,root) %{_bindir}/dbus-cleanup-sockets | |
256 | %attr(755,root,root) %{_bindir}/dbus-daemon | |
257 | %attr(755,root,root) %{_bindir}/dbus-uuidgen | |
258 | %attr(755,root,root) %{_bindir}/dbus-monitor | |
259 | %attr(755,root,root) %{_bindir}/dbus-send | |
260 | %attr(4754,root,messagebus) %{_libdir}/dbus-daemon-launch-helper | |
261 | %dir %{_datadir}/dbus-1 | |
262 | %dir %{_datadir}/dbus-1/interfaces | |
263 | %dir %{_datadir}/dbus-1/services | |
264 | %dir %{_datadir}/dbus-1/system-services | |
265 | %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/*.conf | |
266 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/messagebus | |
267 | %attr(754,root,root) /etc/rc.d/init.d/messagebus | |
268 | %attr(755,root,root) /etc/profile.d/dbus-daemon-1.sh | |
269 | /usr/lib/tmpfiles.d/%{name}.conf | |
270 | %dir %{_localstatedir}/lib/dbus | |
271 | %dir %{_localstatedir}/run/dbus | |
272 | %{_mandir}/man1/dbus-cleanup-sockets.1* | |
273 | %{_mandir}/man1/dbus-daemon.1* | |
274 | %{_mandir}/man1/dbus-uuidgen.1* | |
275 | %{_mandir}/man1/dbus-monitor.1* | |
276 | %{_mandir}/man1/dbus-send.1* | |
277 | ||
278 | %{systemdunitdir}/dbus.service | |
279 | %{systemdunitdir}/dbus.socket | |
280 | %{systemdunitdir}/dbus.target.wants/dbus.socket | |
281 | %{systemdunitdir}/messagebus.service | |
282 | %{systemdunitdir}/multi-user.target.wants/dbus.service | |
283 | %{systemdunitdir}/sockets.target.wants/dbus.socket | |
284 | ||
285 | %if "%{pld_release}" != "ti" | |
286 | %files upstart | |
287 | %defattr(644,root,root,755) | |
288 | %config(noreplace) %verify(not md5 mtime size) /etc/init/messagebus.conf | |
289 | %endif | |
290 | ||
291 | %files dirs | |
292 | %defattr(644,root,root,755) | |
293 | %dir /etc/dbus-1 | |
294 | %dir /etc/dbus-1/system.d | |
295 | %dir /etc/dbus-1/session.d | |
296 | ||
297 | %files libs | |
298 | %defattr(644,root,root,755) | |
299 | %doc AUTHORS COPYING ChangeLog NEWS README doc/TODO | |
300 | %attr(755,root,root) /%{_lib}/libdbus-1.so.*.*.* | |
301 | %attr(755,root,root) %ghost /%{_lib}/libdbus-1.so.3 | |
302 | ||
303 | %files devel | |
304 | %defattr(644,root,root,755) | |
305 | %doc doc/*.{html,txt} | |
306 | %attr(755,root,root) %{_libdir}/libdbus-1.so | |
307 | %{_libdir}/libdbus-1.la | |
308 | %dir %{_libdir}/dbus-1.0 | |
309 | %{_libdir}/dbus-1.0/include | |
310 | %{_includedir}/dbus-1.0 | |
311 | %{_pkgconfigdir}/dbus-1.pc | |
312 | ||
313 | %files static | |
314 | %defattr(644,root,root,755) | |
315 | %{_libdir}/libdbus-1.a | |
316 | ||
317 | %files x11 | |
318 | %defattr(644,root,root,755) | |
319 | %attr(755,root,root) %{_bindir}/dbus-launch | |
320 | %{_mandir}/man1/dbus-launch.1* | |
321 | %attr(755,root,root) /etc/X11/xinit/xinitrc.d/dbus-xinitrc.sh |