]>
Commit | Line | Data |
---|---|---|
194ba181 JB |
1 | # TODO: |
2 | # - enable ducktype-docs when it works | |
3 | # - move /etc/dbus-1 from -libs to base after external packages transition to /usr/share/dbus-1 | |
0f5eff1c JK |
4 | # |
5 | # Conditional build: | |
194ba181 JB |
6 | %bcond_without apparmor # AppArmor support |
7 | %bcond_without selinux # SELinux support | |
8 | %bcond_without systemd # systemd at_console support | |
9 | %bcond_without X11 # X11 support | |
6d3c188e | 10 | |
b89a2164 | 11 | %define expat_version 1:1.95.5 |
3f8dd6e4 | 12 | Summary: D-BUS message bus |
d9e791ee | 13 | Summary(pl.UTF-8): Magistrala przesyłania komunikatów D-BUS |
3f8dd6e4 | 14 | Name: dbus |
0f210f06 | 15 | Version: 1.10.20 |
194ba181 | 16 | Release: 1 |
25fd4e9e | 17 | License: AFL v2.1 or GPL v2 |
bc0b5507 | 18 | Group: Libraries |
a74f6581 | 19 | Source0: https://dbus.freedesktop.org/releases/dbus/%{name}-%{version}.tar.gz |
0f210f06 | 20 | # Source0-md5: 94c991e763d4f9f13690416b2dcd9411 |
817942a3 | 21 | Source1: messagebus.init |
dcde8323 MK |
22 | Source2: %{name}-daemon-1-profile.d-sh |
23 | Source3: %{name}-sysconfig | |
4673fbd5 | 24 | Source4: %{name}-xinitrc.sh |
63456e69 | 25 | Source5: %{name}.tmpfiles |
80072a2c | 26 | Patch0: %{name}-nolibs.patch |
27 | Patch1: %{name}-config.patch | |
d63e2026 | 28 | Patch2: %{name}-no_fatal_checks.patch |
312606de | 29 | Patch3: %{name}-allow-introspection.patch |
a74f6581 | 30 | URL: https://www.freedesktop.org/Software/dbus |
7050d71f | 31 | BuildRequires: audit-libs-devel |
38d51c46 | 32 | BuildRequires: autoconf >= 2.63 |
194ba181 | 33 | BuildRequires: automake >= 1:1.13 |
ce770662 | 34 | BuildRequires: docbook-dtd44-xml |
ab3fabda | 35 | BuildRequires: doxygen |
b89a2164 | 36 | BuildRequires: expat-devel >= %{expat_version} |
194ba181 | 37 | %{?with_apparmor:BuildRequires: libapparmor-devel >= 1:2.8.95} |
b34aed38 | 38 | BuildRequires: libcap-ng-devel |
0f5eff1c | 39 | %{?with_selinux:BuildRequires: libselinux-devel} |
38d51c46 | 40 | BuildRequires: libtool >= 2:2.0 |
756fb95f | 41 | BuildRequires: libxslt-progs |
60d211c4 | 42 | BuildRequires: pkgconfig |
194ba181 | 43 | #BuildRequires: python3-ducktype |
00960c12 | 44 | BuildRequires: rpmbuild(macros) >= 1.626 |
f15cbea8 | 45 | BuildRequires: sed >= 4.0 |
194ba181 | 46 | %{?with_systemd:BuildRequires: systemd-devel >= 32} |
17b61c76 | 47 | BuildRequires: xmlto |
4c6c017a | 48 | %{?with_X11:BuildRequires: xorg-lib-libX11-devel} |
194ba181 | 49 | BuildRequires: yelp-tools |
9a0bbf5a ER |
50 | Requires(post,postun): /sbin/ldconfig |
51 | Requires(post,preun): /sbin/chkconfig | |
52 | Requires(postun): /usr/sbin/groupdel | |
53 | Requires(postun): /usr/sbin/userdel | |
48d7fff5 | 54 | Requires(pre): /bin/id |
b5824d21 | 55 | Requires(pre): /usr/bin/getgid |
48d7fff5 JB |
56 | Requires(pre): /usr/sbin/groupadd |
57 | Requires(pre): /usr/sbin/useradd | |
9d99a896 | 58 | Requires(post,preun,postun): systemd-units >= 38 |
9a0bbf5a | 59 | Requires: %{name}-libs = %{version}-%{release} |
9fb96e41 | 60 | Requires: expat >= %{expat_version} |
f4dffbbc | 61 | Requires: rc-scripts >= 0.4.3.0 |
9d99a896 | 62 | Requires: systemd-units >= 38 |
b5824d21 | 63 | Provides: group(messagebus) |
64 | Provides: user(messagebus) | |
75a73017 | 65 | Obsoletes: dbus-glib-tools |
fde42832 | 66 | Obsoletes: dbus-systemd |
86eafeb2 | 67 | Conflicts: pam < 0.99.7.1 |
8a7e4f09 JB |
68 | # not available for dbus 0.9x yet(?) |
69 | #Obsoletes: dbus-gtk dbus-gcj dbus-gcj-devel dbus-gcj-static | |
bc0b5507 | 70 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
3f8dd6e4 AF |
71 | |
72 | %description | |
73 | D-BUS is a system for sending messages between applications. It is | |
74 | used both for the systemwide message bus service, and as a | |
75 | per-user-login-session messaging facility. | |
76 | ||
702c1f82 JR |
77 | %description -l pl.UTF-8 |
78 | D-BUS to system przesyłania komunikatów pomiędzy aplikacjami. Jest | |
79 | używany zarówno jako ogólnosystemowa usługa magistrali komunikatów jak | |
80 | i możliwość przesyłania komunikatów w ramach jednej sesji użytkownika. | |
bc0b5507 | 81 | |
93c19477 | 82 | %package libs |
3bdcad6f JB |
83 | Summary: D-BUS library |
84 | Summary(pl.UTF-8): Biblioteka D-BUS | |
93c19477 | 85 | Group: Libraries |
a74f6581 | 86 | %{?with_systemd:Requires: systemd-libs >= 32} |
1dcc978d | 87 | Obsoletes: dbus-dirs |
93c19477 JB |
88 | |
89 | %description libs | |
3bdcad6f | 90 | D-BUS library. |
93c19477 | 91 | |
702c1f82 | 92 | %description libs -l pl.UTF-8 |
3bdcad6f | 93 | Biblioteka D-BUS. |
93c19477 | 94 | |
3f8dd6e4 | 95 | %package devel |
3bdcad6f JB |
96 | Summary: Header files for D-BUS library |
97 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki D-BUS | |
3f8dd6e4 | 98 | Group: Development/Libraries |
e58eea39 | 99 | Requires: %{name}-libs = %{version}-%{release} |
a74f6581 | 100 | %{?with_systemd:Requires: systemd-devel >= 32} |
3f8dd6e4 AF |
101 | |
102 | %description devel | |
3bdcad6f | 103 | Header files for D-BUS library. |
bc0b5507 | 104 | |
702c1f82 | 105 | %description devel -l pl.UTF-8 |
3bdcad6f | 106 | Pliki nagłówkowe biblioteki D-BUS. |
bc0b5507 JB |
107 | |
108 | %package static | |
3bdcad6f JB |
109 | Summary: Static D-BUS library |
110 | Summary(pl.UTF-8): Statyczna biblioteka D-BUS | |
bc0b5507 | 111 | Group: Development/Libraries |
26ded955 | 112 | Requires: %{name}-devel = %{version}-%{release} |
bc0b5507 JB |
113 | |
114 | %description static | |
3bdcad6f | 115 | Static D-BUS library. |
bc0b5507 | 116 | |
702c1f82 | 117 | %description static -l pl.UTF-8 |
3bdcad6f | 118 | Statyczna biblioteka D-BUS. |
3f8dd6e4 | 119 | |
0f66e1a4 JB |
120 | %package apidocs |
121 | Summary: D-BUS API documentation | |
122 | Summary(pl.UTF-8): Dokumentacja API D-BUS | |
123 | Group: Documentation | |
124 | # dbus.devhelp refers also to common docs packaged in -devel | |
125 | Requires: %{name}-devel = %{version}-%{release} | |
2314294a ER |
126 | %if "%{_rpmversion}" >= "5" |
127 | BuildArch: noarch | |
128 | %endif | |
0f66e1a4 JB |
129 | |
130 | %description apidocs | |
131 | D-BUS API documentation. | |
132 | ||
133 | %description apidocs -l pl.UTF-8 | |
134 | Dokumentacja API D-BUS. | |
135 | ||
d94552dc | 136 | %package x11 |
11267a0a JB |
137 | Summary: X11 session support for D-BUS |
138 | Summary(pl.UTF-8): Obsługa sesji X11 dla D-BUS | |
d94552dc ER |
139 | Group: X11/Applications |
140 | Requires: %{name} = %{version}-%{release} | |
141 | Obsoletes: dbus-X11 | |
142 | ||
143 | %description x11 | |
11267a0a JB |
144 | This package contains D-BUS utilities to start D-BUS service together |
145 | with user X11 session. | |
146 | ||
147 | %description x11 -l pl.UTF-8 | |
148 | Ten pakiet zawiera narzędzia D-BUS pozwalające na uruchomienie usługi | |
149 | D-BUS wraz z sesją X11 użytkownika. | |
d94552dc | 150 | |
3f8dd6e4 AF |
151 | %prep |
152 | %setup -q | |
153 | %patch0 -p1 | |
d40e6d8d | 154 | %patch1 -p1 |
d63e2026 | 155 | %patch2 -p1 |
312606de | 156 | %patch3 -p1 |
3f8dd6e4 AF |
157 | |
158 | %build | |
159 | %{__libtoolize} | |
609b792a | 160 | %{__aclocal} -I m4 |
3f8dd6e4 | 161 | %{__autoconf} |
60d211c4 | 162 | %{__autoheader} |
3f8dd6e4 | 163 | %{__automake} |
92f6f38b | 164 | %configure \ |
194ba181 | 165 | %{!?with_apparmor:--disable-apparmor} \ |
7dee3cfe | 166 | --disable-asserts \ |
194ba181 JB |
167 | --disable-ducktype-docs \ |
168 | %{?debug:--enable-verbose-mode} \ | |
169 | %{!?with_selinux:--disable-selinux} \ | |
11267a0a | 170 | --disable-silent-rules \ |
194ba181 | 171 | %{!?with_systemd:--disable-systemd} \ |
d728aff5 | 172 | --disable-tests \ |
03857e64 | 173 | --enable-user-session \ |
845c3048 | 174 | --with-console-auth-dir=%{_localstatedir}/run/console/ \ |
c74466a5 | 175 | --with-session-socket-dir=/tmp \ |
ab3fabda | 176 | --with-system-pid-file=%{_localstatedir}/run/dbus.pid \ |
00960c12 | 177 | --with-systemdsystemunitdir=%{systemdunitdir} \ |
4c6c017a | 178 | %{!?with_X11:--without-x} |
d31ee46d | 179 | %{__make} |
3f8dd6e4 AF |
180 | |
181 | %install | |
182 | rm -rf $RPM_BUILD_ROOT | |
63456e69 | 183 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/{profile.d,rc.d/init.d,sysconfig,X11/xinit/xinitrc.d} \ |
9d777b18 PG |
184 | $RPM_BUILD_ROOT%{_datadir}/dbus-1/{services,interfaces} \ |
185 | $RPM_BUILD_ROOT%{_localstatedir}/run/dbus \ | |
6a298ef2 | 186 | $RPM_BUILD_ROOT%{_localstatedir}/lib/dbus \ |
508e2779 | 187 | $RPM_BUILD_ROOT/%{_lib} \ |
66957508 | 188 | $RPM_BUILD_ROOT%{systemdtmpfilesdir} |
3f8dd6e4 AF |
189 | |
190 | %{__make} install \ | |
d31ee46d | 191 | DESTDIR=$RPM_BUILD_ROOT |
3f8dd6e4 | 192 | |
6c17b0ba ER |
193 | install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/messagebus |
194 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d/dbus-daemon-1.sh | |
195 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/messagebus | |
196 | install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d | |
817942a3 | 197 | |
63456e69 | 198 | cp -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf |
508e2779 | 199 | |
00960c12 | 200 | ln -s dbus.service $RPM_BUILD_ROOT%{systemdunitdir}/messagebus.service |
4c1f648e | 201 | |
194ba181 JB |
202 | # for local configuration in dbus 1.10+ |
203 | install -d $RPM_BUILD_ROOT/etc/dbus-1/{session.d,system.d} | |
204 | ||
3f8dd6e4 | 205 | %clean |
bc0b5507 | 206 | rm -rf $RPM_BUILD_ROOT |
3f8dd6e4 | 207 | |
817942a3 | 208 | %pre |
64d48b42 | 209 | %groupadd -g 122 messagebus |
d3e1076f | 210 | %useradd -u 122 -d /usr/share/empty -s /bin/false -c "System message bus" -g 122 messagebus |
817942a3 | 211 | |
212 | %post | |
817942a3 | 213 | /sbin/chkconfig --add messagebus |
2b86874f | 214 | %service -n messagebus restart "D-Bus daemon" |
24fe08d4 JR |
215 | export NORESTART="yes" |
216 | %systemd_post messagebus.service | |
817942a3 | 217 | |
218 | %preun | |
219 | if [ "$1" = "0" ];then | |
9a0bbf5a | 220 | %service messagebus stop |
817942a3 | 221 | /sbin/chkconfig --del messagebus |
222 | fi | |
223 | ||
224 | %postun | |
817942a3 | 225 | if [ "$1" = "0" ]; then |
b5824d21 | 226 | %userremove messagebus |
227 | %groupremove messagebus | |
817942a3 | 228 | fi |
24fe08d4 JR |
229 | %systemd_reload |
230 | ||
231 | %triggerpostun -- dbus < 1.4.16-5 | |
232 | %systemd_trigger messagebus.service | |
233 | if [ -f /etc/sysconfig/dbus ]; then | |
234 | mv -f /etc/sysconfig/messagebus{,.rpmnew} | |
235 | mv -f /etc/sysconfig/{dbus,messagebus} | |
236 | elif [ -f /etc/sysconfig/dbus.rpmsave ]; then | |
237 | mv -f /etc/sysconfig/messagebus{,.rpmnew} | |
238 | mv -f /etc/sysconfig/{dbus.rpmsave,messagebus} | |
239 | fi | |
0186cbb3 | 240 | |
2c14f3cc | 241 | %post libs -p /sbin/ldconfig |
242 | %postun libs -p /sbin/ldconfig | |
f82a8a7b | 243 | |
3f8dd6e4 AF |
244 | %files |
245 | %defattr(644,root,root,755) | |
60d211c4 | 246 | %attr(755,root,root) %{_bindir}/dbus-cleanup-sockets |
08c9542c | 247 | %attr(755,root,root) %{_bindir}/dbus-daemon |
e5453be6 | 248 | %attr(755,root,root) %{_bindir}/dbus-uuidgen |
d31ee46d | 249 | %attr(755,root,root) %{_bindir}/dbus-monitor |
b72e187e | 250 | %attr(755,root,root) %{_bindir}/dbus-run-session |
60d211c4 | 251 | %attr(755,root,root) %{_bindir}/dbus-send |
194ba181 JB |
252 | %attr(755,root,root) %{_bindir}/dbus-test-tool |
253 | %attr(755,root,root) %{_bindir}/dbus-update-activation-environment | |
9fb96e41 | 254 | %attr(4754,root,messagebus) %{_libdir}/dbus-daemon-launch-helper |
9fb96e41 JB |
255 | %dir %{_datadir}/dbus-1/services |
256 | %dir %{_datadir}/dbus-1/system-services | |
194ba181 JB |
257 | %{_datadir}/dbus-1/session.conf |
258 | %{_datadir}/dbus-1/system.conf | |
259 | %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/session.conf | |
260 | %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.conf | |
b89dd173 | 261 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/messagebus |
6a298ef2 | 262 | %attr(754,root,root) /etc/rc.d/init.d/messagebus |
6f305975 | 263 | %attr(755,root,root) /etc/profile.d/dbus-daemon-1.sh |
66957508 | 264 | %{systemdtmpfilesdir}/%{name}.conf |
6a298ef2 | 265 | %dir %{_localstatedir}/lib/dbus |
184f238c | 266 | %dir %{_localstatedir}/run/dbus |
60d211c4 | 267 | %{_mandir}/man1/dbus-cleanup-sockets.1* |
08c9542c | 268 | %{_mandir}/man1/dbus-daemon.1* |
e5453be6 | 269 | %{_mandir}/man1/dbus-uuidgen.1* |
d31ee46d | 270 | %{_mandir}/man1/dbus-monitor.1* |
b72e187e | 271 | %{_mandir}/man1/dbus-run-session.1* |
60d211c4 | 272 | %{_mandir}/man1/dbus-send.1* |
194ba181 JB |
273 | %{_mandir}/man1/dbus-test-tool.1* |
274 | %{_mandir}/man1/dbus-update-activation-environment.1* | |
3f8dd6e4 | 275 | |
00960c12 AF |
276 | %{systemdunitdir}/dbus.service |
277 | %{systemdunitdir}/dbus.socket | |
278 | %{systemdunitdir}/dbus.target.wants/dbus.socket | |
279 | %{systemdunitdir}/messagebus.service | |
280 | %{systemdunitdir}/multi-user.target.wants/dbus.service | |
281 | %{systemdunitdir}/sockets.target.wants/dbus.socket | |
03857e64 AM |
282 | %{systemduserunitdir}/dbus.service |
283 | %{systemduserunitdir}/dbus.socket | |
284 | %{systemduserunitdir}/sockets.target.wants/dbus.socket | |
4c1f648e | 285 | |
0186cbb3 | 286 | %files libs |
3f8dd6e4 | 287 | %defattr(644,root,root,755) |
e58eea39 | 288 | %doc AUTHORS COPYING ChangeLog NEWS README doc/TODO |
f926e709 JR |
289 | %attr(755,root,root) %{_libdir}/libdbus-1.so.*.*.* |
290 | %attr(755,root,root) %ghost %{_libdir}/libdbus-1.so.3 | |
1dcc978d | 291 | %dir %{_datadir}/dbus-1 |
194ba181 JB |
292 | %dir %{_datadir}/dbus-1/session.d |
293 | %dir %{_datadir}/dbus-1/system.d | |
1dcc978d JB |
294 | # interfaces is basically devel thing, but keep dir here |
295 | # in case something uses it at runtime | |
296 | %dir %{_datadir}/dbus-1/interfaces | |
194ba181 JB |
297 | # TODO: now it's only for local configuration - move to base dbus package |
298 | # after all packages place constant configuration in %{_datadir}/dbus-1 | |
299 | %dir /etc/dbus-1 | |
300 | %dir /etc/dbus-1/session.d | |
301 | %dir /etc/dbus-1/system.d | |
0186cbb3 | 302 | |
303 | %files devel | |
304 | %defattr(644,root,root,755) | |
2009405e | 305 | %attr(755,root,root) %{_libdir}/libdbus-1.so |
60d211c4 | 306 | %{_libdir}/libdbus-1.la |
9fb96e41 JB |
307 | %dir %{_libdir}/dbus-1.0 |
308 | %{_libdir}/dbus-1.0/include | |
9fb96e41 | 309 | %{_includedir}/dbus-1.0 |
11267a0a | 310 | %{_pkgconfigdir}/dbus-1.pc |
0f66e1a4 JB |
311 | %dir %{_docdir}/dbus |
312 | %{_docdir}/dbus/*.html | |
313 | %{_docdir}/dbus/*.png | |
314 | %{_docdir}/dbus/*.svg | |
315 | %{_docdir}/dbus/*.txt | |
316 | ||
bc0b5507 JB |
317 | %files static |
318 | %defattr(644,root,root,755) | |
60d211c4 | 319 | %{_libdir}/libdbus-1.a |
d94552dc | 320 | |
0f66e1a4 JB |
321 | %files apidocs |
322 | %defattr(644,root,root,755) | |
323 | %{_docdir}/dbus/api | |
324 | %{_docdir}/dbus/dbus.devhelp | |
325 | ||
d94552dc ER |
326 | %files x11 |
327 | %defattr(644,root,root,755) | |
328 | %attr(755,root,root) %{_bindir}/dbus-launch | |
329 | %{_mandir}/man1/dbus-launch.1* | |
11267a0a | 330 | %attr(755,root,root) /etc/X11/xinit/xinitrc.d/dbus-xinitrc.sh |