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 |
fwang |
260692 |
%define lib_name %mklibname dbus %{lib_api} %{lib_major} |
10 |
|
|
%define develname %mklibname -d dbus |
11 |
blino |
5842 |
|
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 |
colin |
307295 |
Version: 1.6.8 |
20 |
colin |
321906 |
Release: %mkrel 2 |
21 |
blino |
5842 |
URL: http://www.freedesktop.org/Software/dbus |
22 |
|
|
Source0: http://dbus.freedesktop.org/releases/dbus/%{name}-%{version}.tar.gz |
23 |
colin |
307295 |
# (cg) See https://bugs.freedesktop.org/show_bug.cgi?id=56043 |
24 |
|
|
Patch0: dbus-1.6.8-dbus-spawn-ignore-sigpipe.patch |
25 |
blino |
5842 |
License: GPLv2+ or AFL |
26 |
|
|
Group: System/Servers |
27 |
|
|
BuildRequires: libx11-devel |
28 |
|
|
BuildRequires: expat-devel >= %{expat_version} |
29 |
rtp |
51059 |
%if !%bootstrap |
30 |
blino |
5842 |
BuildRequires: xmlto docbook-dtd412-xml |
31 |
|
|
BuildRequires: doxygen |
32 |
rtp |
51059 |
%endif |
33 |
blino |
5842 |
BuildRequires: libtool |
34 |
|
|
BuildRequires: libcap-ng-devel |
35 |
fwang |
260692 |
BuildRequires: pkgconfig(gio-2.0) >= 2.24 |
36 |
|
|
BuildRequires: pkgconfig(glib-2.0) >= 2.24 |
37 |
|
|
BuildRequires: pkgconfig(libsystemd-daemon) >= 32 |
38 |
|
|
BuildRequires: pkgconfig(libsystemd-login) >= 32 |
39 |
tmb |
233662 |
Requires(post): rpm-helper >= 0.24.8-1 |
40 |
|
|
Requires(preun): rpm-helper >= 0.24.8-1 |
41 |
|
|
Requires(post): chkconfig >= 1.3.37-3 |
42 |
blino |
5842 |
Requires(post): %{lib_name} >= %{version}-%{release} |
43 |
|
|
Provides: should-restart = system |
44 |
|
|
|
45 |
|
|
%description |
46 |
|
|
D-Bus is a system for sending messages between applications. It is |
47 |
|
|
used both for the systemwide message bus service, and as a |
48 |
|
|
per-user-login-session messaging facility. |
49 |
|
|
|
50 |
|
|
%package -n %{lib_name} |
51 |
|
|
Summary: Shared library for using D-Bus |
52 |
|
|
Group: System/Libraries |
53 |
|
|
Requires: dbus >= %{version} |
54 |
fwang |
260692 |
Obsoletes: %{_lib}dbus-1_3 < 1.6.0 |
55 |
blino |
5842 |
|
56 |
|
|
%description -n %{lib_name} |
57 |
|
|
D-Bus shared library. |
58 |
|
|
|
59 |
|
|
%package -n %develname |
60 |
|
|
Summary: Libraries and headers for D-Bus |
61 |
|
|
Group: Development/C |
62 |
|
|
Requires: %{name} = %{version} |
63 |
|
|
Requires: %{lib_name} = %{version} |
64 |
|
|
Provides: lib%{name}-1-devel = %{version}-%{release} |
65 |
|
|
Provides: lib%{name}-devel = %{version}-%{release} |
66 |
|
|
Provides: %{name}-devel = %{version}-%{release} |
67 |
|
|
Conflicts: %{_lib}dbus-1_0-devel |
68 |
fwang |
260692 |
Obsoletes: %{mklibname -d dbus- 1 3} < 1.6.0 |
69 |
|
|
Obsoletes: %{_lib}dbus-1-devel < 1.6.0 |
70 |
blino |
5842 |
|
71 |
|
|
%description -n %develname |
72 |
|
|
Headers and static libraries for D-Bus. |
73 |
|
|
|
74 |
|
|
%package x11 |
75 |
|
|
Summary: X11-requiring add-ons for D-Bus |
76 |
|
|
Group: System/Servers |
77 |
|
|
Requires: dbus = %{version} |
78 |
|
|
|
79 |
|
|
%package doc |
80 |
|
|
Summary: Developer documentation for D-BUS |
81 |
ennael |
305352 |
Group: Documentation |
82 |
blino |
5842 |
Requires: dbus = %{version} |
83 |
|
|
Suggests: devhelp |
84 |
fwang |
260692 |
BuildArch: noarch |
85 |
|
|
Conflicts: libdbus-1-devel < 1.2.20 |
86 |
|
|
Conflicts: lib64dbus-1-devel < 1.2.20 |
87 |
blino |
5842 |
|
88 |
|
|
%description doc |
89 |
|
|
This package contains developer documentation for D-Bus along with |
90 |
|
|
other supporting documentation such as the introspect dtd file. |
91 |
|
|
|
92 |
|
|
%description x11 |
93 |
|
|
D-Bus contains some tools that require Xlib to be installed, those are |
94 |
|
|
in this separate package so server systems need not install X. |
95 |
|
|
|
96 |
|
|
%prep |
97 |
colin |
307295 |
%setup -q |
98 |
|
|
%apply_patches |
99 |
blino |
5842 |
|
100 |
|
|
%build |
101 |
|
|
|
102 |
colin |
321906 |
COMMON_ARGS="--disable-static --disable-selinux --with-system-socket=/run/dbus/system_bus_socket --libexecdir=%{_libexecdir}/dbus-%{lib_api}" |
103 |
blino |
5842 |
|
104 |
|
|
#### Build once with tests to make check |
105 |
|
|
%if %{enable_test} |
106 |
fwang |
260692 |
%configure2_5x $COMMON_ARGS --enable-tests=yes --enable-systemd \ |
107 |
dmorgan |
39097 |
--enable-verbose-mode=yes \ |
108 |
|
|
--enable-asserts=yes \ |
109 |
|
|
--disable-doxygen-docs \ |
110 |
tv |
141550 |
--enable-userdb-cache \ |
111 |
dmorgan |
39097 |
--disable-xml-docs |
112 |
blino |
5842 |
DBUS_VERBOSE=1 %make |
113 |
|
|
make check |
114 |
|
|
|
115 |
|
|
#### Clean up and build again |
116 |
|
|
make clean |
117 |
|
|
%endif |
118 |
|
|
|
119 |
rtp |
51059 |
%configure2_5x $COMMON_ARGS --disable-tests --disable-asserts \ |
120 |
|
|
%if !%bootstrap |
121 |
|
|
--enable-doxygen-docs --enable-xml-docs \ |
122 |
blino |
234332 |
--htmldir=%{_datadir}/devhelp/books/%{name} \ |
123 |
rtp |
51059 |
%endif |
124 |
blino |
5842 |
%if %enable_verbose |
125 |
|
|
--enable-verbose-mode=yes |
126 |
|
|
%else |
127 |
|
|
--enable-verbose-mode=no |
128 |
|
|
%endif |
129 |
|
|
%make |
130 |
|
|
|
131 |
|
|
%check |
132 |
|
|
make check |
133 |
|
|
|
134 |
|
|
%install |
135 |
|
|
%makeinstall_std |
136 |
|
|
|
137 |
tv |
141540 |
mkdir -p %{buildroot}%{_sysconfdir}/X11/xinit.d |
138 |
|
|
cat << EOF > %{buildroot}%{_sysconfdir}/X11/xinit.d/30dbus |
139 |
blino |
5842 |
# to be sourced |
140 |
tv |
141725 |
if [ -z "\$DBUS_SESSION_BUS_ADDRESS" ]; then |
141 |
blino |
5842 |
eval \`/usr/bin/dbus-launch --exit-with-session --sh-syntax\` |
142 |
|
|
fi |
143 |
|
|
EOF |
144 |
tv |
141540 |
chmod 755 %{buildroot}%{_sysconfdir}/X11/xinit.d/30dbus |
145 |
blino |
5842 |
|
146 |
|
|
# create directory |
147 |
tv |
141540 |
mkdir %{buildroot}%{_datadir}/dbus-%{lib_api}/interfaces |
148 |
blino |
5842 |
|
149 |
colin |
321907 |
# This is legacy |
150 |
|
|
rm -rf %{buildroot}%{_unitdir}/dbus.target.wants |
151 |
|
|
|
152 |
blino |
234332 |
# link devhelp docs in docdir |
153 |
|
|
mkdir -p %{buildroot}%{_docdir}/%{name}-doc |
154 |
|
|
pushd %{buildroot}%{_datadir}/devhelp/books/%{name} |
155 |
|
|
for f in *; do |
156 |
|
|
ln -s ../../devhelp/books/%{name}/$f %{buildroot}%{_docdir}/%{name}-doc |
157 |
|
|
done |
158 |
|
|
popd |
159 |
blino |
5842 |
|
160 |
|
|
#remove unpackaged file |
161 |
colin |
229297 |
find %{buildroot} -name '*.la' -delete |
162 |
blino |
5842 |
|
163 |
|
|
%pre |
164 |
|
|
%_pre_useradd messagebus / /sbin/nologin |
165 |
|
|
%_pre_groupadd daemon messagebus |
166 |
|
|
|
167 |
|
|
%postun |
168 |
|
|
%_postun_userdel messagebus |
169 |
|
|
%_postun_groupdel daemon messagebus |
170 |
|
|
|
171 |
|
|
%files |
172 |
|
|
%doc COPYING NEWS |
173 |
|
|
%dir %{_sysconfdir}/dbus-%{lib_api} |
174 |
tv |
280297 |
%exclude %{_sysconfdir}/rc.d/init.d/* |
175 |
blino |
5842 |
%config(noreplace) %{_sysconfdir}/dbus-%{lib_api}/*.conf |
176 |
|
|
%dir %{_sysconfdir}/dbus-%{lib_api}/system.d |
177 |
|
|
%dir %{_sysconfdir}/dbus-%{lib_api}/session.d |
178 |
colin |
321906 |
%dir %{_localstatedir}/lib/dbus |
179 |
blino |
5842 |
%dir %{_libdir}/dbus-1.0 |
180 |
|
|
%{_bindir}/dbus-daemon |
181 |
|
|
%{_bindir}/dbus-send |
182 |
|
|
%{_bindir}/dbus-cleanup-sockets |
183 |
|
|
%{_bindir}/dbus-uuidgen |
184 |
|
|
%{_mandir}/man*/* |
185 |
|
|
%dir %{_datadir}/dbus-%{lib_api} |
186 |
|
|
%{_datadir}/dbus-%{lib_api}/system-services |
187 |
|
|
%{_datadir}/dbus-%{lib_api}/services |
188 |
|
|
%{_datadir}/dbus-%{lib_api}/interfaces |
189 |
|
|
# See doc/system-activation.txt in source tarball for the rationale |
190 |
|
|
# behind these permissions |
191 |
fwang |
292495 |
%dir %{_libexecdir}/dbus-%{lib_api} |
192 |
|
|
%attr(4750,root,messagebus) %{_libexecdir}/dbus-%{lib_api}/dbus-daemon-launch-helper |
193 |
colin |
229297 |
%{_unitdir}/dbus.service |
194 |
|
|
%{_unitdir}/dbus.socket |
195 |
|
|
%{_unitdir}/multi-user.target.wants/dbus.service |
196 |
|
|
%{_unitdir}/sockets.target.wants/dbus.socket |
197 |
blino |
5842 |
|
198 |
|
|
%files -n %{lib_name} |
199 |
fwang |
292495 |
%{_libdir}/*dbus-%{lib_api}*.so.%{lib_major}* |
200 |
blino |
5842 |
|
201 |
|
|
%files -n %develname |
202 |
|
|
%doc ChangeLog |
203 |
|
|
%{_libdir}/libdbus-%{lib_api}.so |
204 |
|
|
%{_libdir}/dbus-1.0/include |
205 |
|
|
%{_libdir}/pkgconfig/dbus-%{lib_api}.pc |
206 |
|
|
%{_includedir}/dbus-1.0 |
207 |
|
|
|
208 |
|
|
%files x11 |
209 |
|
|
%{_sysconfdir}/X11/xinit.d/* |
210 |
|
|
%{_bindir}/dbus-launch |
211 |
|
|
%{_bindir}/dbus-monitor |
212 |
|
|
|
213 |
|
|
%files doc |
214 |
|
|
%doc %{_datadir}/devhelp/books/dbus |
215 |
blino |
234332 |
%{_docdir}/%{name}-doc |