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