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