1 |
rtp |
51059 |
%define bootstrap 0 |
2 |
|
|
%{?_without_bootstrap: %global bootstrap 0} |
3 |
|
|
%{?_with_bootstrap: %global bootstrap 1} |
4 |
|
|
|
5 |
blino |
5842 |
%define expat_version 2.0.1 |
6 |
|
|
|
7 |
|
|
%define lib_major 3 |
8 |
|
|
%define lib_api 1 |
9 |
|
|
%define lib_name %mklibname dbus- %{lib_api} %{lib_major} |
10 |
|
|
%define develname %mklibname -d dbus- %lib_api |
11 |
|
|
|
12 |
|
|
%define enable_test 0 |
13 |
|
|
%define enable_verbose 0 |
14 |
|
|
|
15 |
cjw |
124706 |
%define _with_systemd 1 |
16 |
dmorgan |
39097 |
|
17 |
blino |
5842 |
%define git_url git://git.freedesktop.org/git/dbus/dbus |
18 |
|
|
|
19 |
|
|
Summary: D-Bus message bus |
20 |
|
|
Name: dbus |
21 |
tv |
141550 |
Version: 1.4.14 |
22 |
cjw |
124706 |
Release: %mkrel 1 |
23 |
blino |
5842 |
URL: http://www.freedesktop.org/Software/dbus |
24 |
|
|
Source0: http://dbus.freedesktop.org/releases/dbus/%{name}-%{version}.tar.gz |
25 |
|
|
Source1: doxygen_to_devhelp.xsl |
26 |
|
|
# (fc) 0.20-1mdk fix start/stop order (fd.o bug #11491), starts after network |
27 |
|
|
Patch0: dbus-initscript.patch |
28 |
|
|
# (fc) 1.0.2-5mdv disable fatal warnings on check (fd.o bug #13270) |
29 |
|
|
Patch3: dbus-1.0.2-disable_fatal_warning_on_check.patch |
30 |
tv |
141550 |
# (bor) synchronize dbus.service with dbus.target so dependencies work |
31 |
|
|
Patch7: dbus-1.4.4-dbus.service-before-dbus.target.patch |
32 |
blino |
5842 |
|
33 |
|
|
License: GPLv2+ or AFL |
34 |
|
|
Group: System/Servers |
35 |
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root |
36 |
|
|
BuildRequires: libx11-devel |
37 |
|
|
BuildRequires: expat-devel >= %{expat_version} |
38 |
rtp |
51059 |
%if !%bootstrap |
39 |
blino |
5842 |
BuildRequires: xmlto docbook-dtd412-xml |
40 |
|
|
BuildRequires: doxygen |
41 |
rtp |
51059 |
%endif |
42 |
blino |
5842 |
BuildRequires: libtool |
43 |
|
|
BuildRequires: libcap-ng-devel |
44 |
tv |
141550 |
BuildRequires: glib2-devel |
45 |
dmorgan |
39097 |
%if %{_with_systemd} |
46 |
|
|
BuildRequires: systemd-units |
47 |
|
|
%endif |
48 |
blino |
5842 |
Requires(pre): rpm-helper |
49 |
|
|
Requires(preun): rpm-helper |
50 |
|
|
Requires(post): rpm-helper |
51 |
|
|
Requires(postun): rpm-helper |
52 |
|
|
Requires(post): chkconfig >= 1.3.37-3mdv |
53 |
|
|
Requires(post): %{lib_name} >= %{version}-%{release} |
54 |
|
|
Provides: should-restart = system |
55 |
|
|
|
56 |
|
|
%description |
57 |
|
|
D-Bus is a system for sending messages between applications. It is |
58 |
|
|
used both for the systemwide message bus service, and as a |
59 |
|
|
per-user-login-session messaging facility. |
60 |
|
|
|
61 |
|
|
%package -n %{lib_name} |
62 |
|
|
Summary: Shared library for using D-Bus |
63 |
|
|
Group: System/Libraries |
64 |
|
|
Requires: dbus >= %{version} |
65 |
|
|
|
66 |
|
|
%description -n %{lib_name} |
67 |
|
|
D-Bus shared library. |
68 |
|
|
|
69 |
|
|
%package -n %develname |
70 |
|
|
Summary: Libraries and headers for D-Bus |
71 |
|
|
Group: Development/C |
72 |
|
|
Requires: %{name} = %{version} |
73 |
|
|
Requires: %{lib_name} = %{version} |
74 |
|
|
Provides: lib%{name}-1-devel = %{version}-%{release} |
75 |
|
|
Provides: lib%{name}-devel = %{version}-%{release} |
76 |
|
|
Provides: %{name}-devel = %{version}-%{release} |
77 |
|
|
Conflicts: %{_lib}dbus-1_0-devel |
78 |
|
|
Obsoletes: %mklibname -d dbus- 1 3 |
79 |
|
|
|
80 |
|
|
%description -n %develname |
81 |
|
|
Headers and static libraries for D-Bus. |
82 |
|
|
|
83 |
|
|
%package x11 |
84 |
|
|
Summary: X11-requiring add-ons for D-Bus |
85 |
|
|
Group: System/Servers |
86 |
|
|
Requires: dbus = %{version} |
87 |
|
|
|
88 |
|
|
%package doc |
89 |
|
|
Summary: Developer documentation for D-BUS |
90 |
|
|
Group: Books/Computer books |
91 |
|
|
Requires: dbus = %{version} |
92 |
|
|
Suggests: devhelp |
93 |
|
|
Conflicts: %develname < 1.2.20 |
94 |
|
|
|
95 |
|
|
%description doc |
96 |
|
|
This package contains developer documentation for D-Bus along with |
97 |
|
|
other supporting documentation such as the introspect dtd file. |
98 |
|
|
|
99 |
|
|
%description x11 |
100 |
|
|
D-Bus contains some tools that require Xlib to be installed, those are |
101 |
|
|
in this separate package so server systems need not install X. |
102 |
|
|
|
103 |
|
|
%prep |
104 |
|
|
%setup -q |
105 |
|
|
%patch0 -p1 -b .initscript |
106 |
|
|
#only disable in cooker to detect buggy programs |
107 |
|
|
#patch3 -p1 -b .disable_fatal_warning_on_check |
108 |
tv |
141550 |
%patch7 -p1 -b .after_dbus_target |
109 |
blino |
5842 |
|
110 |
|
|
%build |
111 |
|
|
|
112 |
|
|
#needed for correct localstatedir location |
113 |
|
|
%define _localstatedir %{_var} |
114 |
|
|
|
115 |
|
|
COMMON_ARGS="--disable-selinux --with-system-pid-file=%{_var}/run/messagebus.pid --with-system-socket=%{_var}/run/dbus/system_bus_socket --with-session-socket-dir=/tmp --libexecdir=/%{_lib}/dbus-%{lib_api}" |
116 |
|
|
|
117 |
|
|
#### Build once with tests to make check |
118 |
|
|
%if %{enable_test} |
119 |
dmorgan |
39097 |
%configure2_5x $COMMON_ARGS --enable-tests=yes \ |
120 |
|
|
--enable-verbose-mode=yes \ |
121 |
|
|
--enable-asserts=yes \ |
122 |
|
|
--disable-doxygen-docs \ |
123 |
tv |
141550 |
--enable-userdb-cache \ |
124 |
dmorgan |
39134 |
%if !%{_with_systemd} |
125 |
dmorgan |
39097 |
--without-systemdsystemunitdir \ |
126 |
|
|
%endif |
127 |
|
|
--disable-xml-docs |
128 |
blino |
5842 |
DBUS_VERBOSE=1 %make |
129 |
|
|
make check |
130 |
|
|
|
131 |
|
|
#### Clean up and build again |
132 |
|
|
make clean |
133 |
|
|
%endif |
134 |
|
|
|
135 |
rtp |
51059 |
%configure2_5x $COMMON_ARGS --disable-tests --disable-asserts \ |
136 |
|
|
%if !%bootstrap |
137 |
|
|
--enable-doxygen-docs --enable-xml-docs \ |
138 |
|
|
%endif |
139 |
blino |
5842 |
%if %enable_verbose |
140 |
|
|
--enable-verbose-mode=yes |
141 |
|
|
%else |
142 |
|
|
--enable-verbose-mode=no |
143 |
|
|
%endif |
144 |
|
|
%make |
145 |
|
|
|
146 |
rtp |
51059 |
%if !%bootstrap |
147 |
blino |
5842 |
doxygen Doxyfile |
148 |
|
|
|
149 |
|
|
xsltproc -o dbus.devhelp %{SOURCE1} doc/api/xml/index.xml |
150 |
rtp |
51059 |
%endif |
151 |
blino |
5842 |
|
152 |
|
|
%check |
153 |
|
|
make check |
154 |
|
|
|
155 |
|
|
%install |
156 |
|
|
rm -rf %{buildroot} |
157 |
|
|
|
158 |
|
|
%makeinstall_std |
159 |
|
|
|
160 |
|
|
# move lib to /, because it might be needed by hotplug script, before |
161 |
|
|
# /usr is mounted |
162 |
tv |
141540 |
mkdir -p %{buildroot}/%{_lib} %buildroot%{_var}/lib/dbus |
163 |
tv |
141541 |
mv %{buildroot}%{_libdir}/*dbus-1*.so.* %{buildroot}/%{_lib} |
164 |
tv |
141540 |
ln -sf ../../%{_lib}/libdbus-%{lib_api}.so.%{lib_major} %{buildroot}%{_libdir}/libdbus-%{lib_api}.so |
165 |
blino |
5842 |
|
166 |
tv |
141540 |
mkdir -p %{buildroot}%{_sysconfdir}/X11/xinit.d |
167 |
|
|
cat << EOF > %{buildroot}%{_sysconfdir}/X11/xinit.d/30dbus |
168 |
blino |
5842 |
# to be sourced |
169 |
tv |
141546 |
if [ -z \"$DBUS_SESSION_BUS_ADDRESS" ]; then |
170 |
blino |
5842 |
eval \`/usr/bin/dbus-launch --exit-with-session --sh-syntax\` |
171 |
|
|
fi |
172 |
|
|
EOF |
173 |
tv |
141540 |
chmod 755 %{buildroot}%{_sysconfdir}/X11/xinit.d/30dbus |
174 |
blino |
5842 |
|
175 |
|
|
# create directory |
176 |
tv |
141540 |
mkdir %{buildroot}%{_datadir}/dbus-%{lib_api}/interfaces |
177 |
blino |
5842 |
|
178 |
dmorgan |
39177 |
%if %{_with_systemd} |
179 |
dmorgan |
39097 |
# Make sure that when somebody asks for D-Bus under the name of the |
180 |
|
|
# old SysV script, that he ends up with the standard dbus.service name |
181 |
|
|
# now. |
182 |
|
|
ln -s dbus.service %{buildroot}/lib/systemd/system/messagebus.service |
183 |
dmorgan |
39177 |
%endif |
184 |
dmorgan |
39097 |
|
185 |
blino |
5842 |
#add devhelp compatible helps |
186 |
tv |
141540 |
mkdir -p %{buildroot}%{_datadir}/devhelp/books/dbus |
187 |
|
|
mkdir -p %{buildroot}%{_datadir}/devhelp/books/dbus/api |
188 |
blino |
5842 |
|
189 |
rtp |
51059 |
%if !%bootstrap |
190 |
tv |
141540 |
cp dbus.devhelp %{buildroot}%{_datadir}/devhelp/books/dbus |
191 |
|
|
cp doc/dbus-specification.html %{buildroot}%{_datadir}/devhelp/books/dbus |
192 |
|
|
cp doc/dbus-faq.html %{buildroot}%{_datadir}/devhelp/books/dbus |
193 |
|
|
cp doc/dbus-tutorial.html %{buildroot}%{_datadir}/devhelp/books/dbus |
194 |
|
|
cp doc/api/html/* %{buildroot}%{_datadir}/devhelp/books/dbus/api |
195 |
rtp |
51059 |
%endif |
196 |
blino |
5842 |
|
197 |
|
|
#remove unpackaged file |
198 |
tv |
141540 |
rm -f %{buildroot}%{_libdir}/*.la |
199 |
blino |
5842 |
|
200 |
|
|
%clean |
201 |
|
|
rm -rf %{buildroot} |
202 |
|
|
|
203 |
|
|
%pre |
204 |
|
|
%_pre_useradd messagebus / /sbin/nologin |
205 |
|
|
%_pre_groupadd daemon messagebus |
206 |
|
|
|
207 |
|
|
%post |
208 |
|
|
if [ "$1" = "1" ]; then |
209 |
|
|
/usr/bin/dbus-uuidgen --ensure |
210 |
|
|
/sbin/chkconfig --add messagebus || /bin/true |
211 |
|
|
fi |
212 |
|
|
|
213 |
|
|
%postun |
214 |
|
|
%_postun_userdel messagebus |
215 |
|
|
%_postun_groupdel daemon messagebus |
216 |
|
|
|
217 |
|
|
%preun |
218 |
|
|
%_preun_service messagebus |
219 |
|
|
|
220 |
|
|
%triggerpostun -- dbus < 0.21-4mdk |
221 |
|
|
/sbin/chkconfig --del messagebus |
222 |
|
|
/sbin/chkconfig --add messagebus |
223 |
|
|
|
224 |
|
|
%triggerpostun -- dbus < 1.2.4.4permissive-2mdv |
225 |
|
|
/sbin/chkconfig --level 7 messagebus reset |
226 |
|
|
|
227 |
|
|
|
228 |
|
|
%files |
229 |
|
|
%defattr(-,root,root) |
230 |
|
|
|
231 |
|
|
%doc COPYING NEWS |
232 |
|
|
|
233 |
|
|
%dir %{_sysconfdir}/dbus-%{lib_api} |
234 |
|
|
%config(noreplace) %{_sysconfdir}/dbus-%{lib_api}/*.conf |
235 |
|
|
%{_sysconfdir}/rc.d/init.d/* |
236 |
|
|
%dir %{_sysconfdir}/dbus-%{lib_api}/system.d |
237 |
|
|
%dir %{_sysconfdir}/dbus-%{lib_api}/session.d |
238 |
|
|
%dir %{_var}/run/dbus |
239 |
|
|
%dir %{_var}/lib/dbus |
240 |
|
|
%dir %{_libdir}/dbus-1.0 |
241 |
|
|
%{_bindir}/dbus-daemon |
242 |
|
|
%{_bindir}/dbus-send |
243 |
|
|
%{_bindir}/dbus-cleanup-sockets |
244 |
|
|
%{_bindir}/dbus-uuidgen |
245 |
|
|
%{_mandir}/man*/* |
246 |
|
|
%dir %{_datadir}/dbus-%{lib_api} |
247 |
|
|
%{_datadir}/dbus-%{lib_api}/system-services |
248 |
|
|
%{_datadir}/dbus-%{lib_api}/services |
249 |
|
|
%{_datadir}/dbus-%{lib_api}/interfaces |
250 |
|
|
# See doc/system-activation.txt in source tarball for the rationale |
251 |
|
|
# behind these permissions |
252 |
|
|
%dir /%{_lib}/dbus-%{lib_api} |
253 |
|
|
%attr(4750,root,messagebus) /%{_lib}/dbus-%{lib_api}/dbus-daemon-launch-helper |
254 |
dmorgan |
39097 |
%if %{_with_systemd} |
255 |
|
|
/lib/systemd/system/dbus.service |
256 |
|
|
/lib/systemd/system/messagebus.service |
257 |
|
|
/lib/systemd/system/dbus.socket |
258 |
|
|
/lib/systemd/system/dbus.target.wants/dbus.socket |
259 |
|
|
/lib/systemd/system/multi-user.target.wants/dbus.service |
260 |
|
|
/lib/systemd/system/sockets.target.wants/dbus.socket |
261 |
blino |
5842 |
|
262 |
dmorgan |
39097 |
%endif |
263 |
|
|
|
264 |
blino |
5842 |
%files -n %{lib_name} |
265 |
|
|
%defattr(-,root,root) |
266 |
|
|
/%{_lib}/*dbus-%{lib_api}*.so.%{lib_major}* |
267 |
|
|
|
268 |
|
|
%files -n %develname |
269 |
|
|
%defattr(-,root,root) |
270 |
|
|
%doc ChangeLog |
271 |
|
|
%{_libdir}/libdbus-%{lib_api}.a |
272 |
|
|
%{_libdir}/libdbus-%{lib_api}.so |
273 |
|
|
%{_libdir}/dbus-1.0/include |
274 |
|
|
%{_libdir}/pkgconfig/dbus-%{lib_api}.pc |
275 |
|
|
%{_includedir}/dbus-1.0 |
276 |
|
|
|
277 |
|
|
%files x11 |
278 |
|
|
%defattr(-,root,root) |
279 |
|
|
%{_sysconfdir}/X11/xinit.d/* |
280 |
|
|
%{_bindir}/dbus-launch |
281 |
|
|
%{_bindir}/dbus-monitor |
282 |
|
|
|
283 |
|
|
%files doc |
284 |
|
|
%defattr(-,root,root) |
285 |
|
|
%doc doc/introspect.dtd doc/introspect.xsl doc/system-activation.txt |
286 |
|
|
%doc %{_datadir}/devhelp/books/dbus |
287 |
|
|
|
288 |
|
|
|