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