]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without selinux # build without SELinux support | |
4 | %bcond_without X11 # build without X11 support | |
5 | ||
6 | %define expat_version 1:1.95.5 | |
7 | Summary: D-BUS message bus | |
8 | Summary(pl.UTF-8): Magistrala przesyłania komunikatów D-BUS | |
9 | Name: dbus | |
10 | Version: 1.8.18 | |
11 | Release: 1 | |
12 | License: AFL v2.1 or GPL v2 | |
13 | Group: Libraries | |
14 | Source0: http://dbus.freedesktop.org/releases/dbus/%{name}-%{version}.tar.gz | |
15 | # Source0-md5: 83e607e9ccb1c921d5b6bbea2376a36c | |
16 | Source1: messagebus.init | |
17 | Source2: %{name}-daemon-1-profile.d-sh | |
18 | Source3: %{name}-sysconfig | |
19 | Source4: %{name}-xinitrc.sh | |
20 | Source5: %{name}.tmpfiles | |
21 | Patch0: %{name}-nolibs.patch | |
22 | Patch1: %{name}-config.patch | |
23 | Patch2: %{name}-no_fatal_checks.patch | |
24 | Patch3: %{name}-allow-introspection.patch | |
25 | URL: http://www.freedesktop.org/Software/dbus | |
26 | BuildRequires: audit-libs-devel | |
27 | BuildRequires: autoconf >= 2.63 | |
28 | BuildRequires: automake >= 1:1.10 | |
29 | BuildRequires: docbook-dtd44-xml | |
30 | BuildRequires: doxygen | |
31 | BuildRequires: expat-devel >= %{expat_version} | |
32 | BuildRequires: libcap-ng-devel | |
33 | %{?with_selinux:BuildRequires: libselinux-devel} | |
34 | BuildRequires: libtool >= 2:2.0 | |
35 | BuildRequires: libxslt-progs | |
36 | BuildRequires: pkgconfig | |
37 | BuildRequires: rpmbuild(macros) >= 1.626 | |
38 | BuildRequires: sed >= 4.0 | |
39 | BuildRequires: systemd-devel >= 32 | |
40 | BuildRequires: xmlto | |
41 | %{?with_X11:BuildRequires: xorg-lib-libX11-devel} | |
42 | Requires(post,postun): /sbin/ldconfig | |
43 | Requires(post,preun): /sbin/chkconfig | |
44 | Requires(postun): /usr/sbin/groupdel | |
45 | Requires(postun): /usr/sbin/userdel | |
46 | Requires(pre): /bin/id | |
47 | Requires(pre): /usr/bin/getgid | |
48 | Requires(pre): /usr/sbin/groupadd | |
49 | Requires(pre): /usr/sbin/useradd | |
50 | Requires(post,preun,postun): systemd-units >= 38 | |
51 | Requires: %{name}-libs = %{version}-%{release} | |
52 | Requires: expat >= %{expat_version} | |
53 | Requires: rc-scripts >= 0.4.3.0 | |
54 | Requires: systemd-units >= 38 | |
55 | Provides: group(messagebus) | |
56 | Provides: user(messagebus) | |
57 | Obsoletes: dbus-glib-tools | |
58 | Obsoletes: dbus-systemd | |
59 | Conflicts: pam < 0.99.7.1 | |
60 | # not available for dbus 0.9x yet(?) | |
61 | #Obsoletes: dbus-gtk dbus-gcj dbus-gcj-devel dbus-gcj-static | |
62 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
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 | ||
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. | |
73 | ||
74 | %package libs | |
75 | Summary: D-BUS library | |
76 | Summary(pl.UTF-8): Biblioteka D-BUS | |
77 | Group: Libraries | |
78 | Obsoletes: dbus-dirs | |
79 | ||
80 | %description libs | |
81 | D-BUS library. | |
82 | ||
83 | %description libs -l pl.UTF-8 | |
84 | Biblioteka D-BUS. | |
85 | ||
86 | %package devel | |
87 | Summary: Header files for D-BUS library | |
88 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki D-BUS | |
89 | Group: Development/Libraries | |
90 | Requires: %{name}-libs = %{version}-%{release} | |
91 | ||
92 | %description devel | |
93 | Header files for D-BUS library. | |
94 | ||
95 | %description devel -l pl.UTF-8 | |
96 | Pliki nagłówkowe biblioteki D-BUS. | |
97 | ||
98 | %package static | |
99 | Summary: Static D-BUS library | |
100 | Summary(pl.UTF-8): Statyczna biblioteka D-BUS | |
101 | Group: Development/Libraries | |
102 | Requires: %{name}-devel = %{version}-%{release} | |
103 | ||
104 | %description static | |
105 | Static D-BUS library. | |
106 | ||
107 | %description static -l pl.UTF-8 | |
108 | Statyczna biblioteka D-BUS. | |
109 | ||
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} | |
116 | ||
117 | %description apidocs | |
118 | D-BUS API documentation. | |
119 | ||
120 | %description apidocs -l pl.UTF-8 | |
121 | Dokumentacja API D-BUS. | |
122 | ||
123 | %package x11 | |
124 | Summary: X11 session support for D-BUS | |
125 | Summary(pl.UTF-8): Obsługa sesji X11 dla D-BUS | |
126 | Group: X11/Applications | |
127 | Requires: %{name} = %{version}-%{release} | |
128 | Obsoletes: dbus-X11 | |
129 | ||
130 | %description x11 | |
131 | This package contains D-BUS utilities to start D-BUS service together | |
132 | with user X11 session. | |
133 | ||
134 | %description x11 -l pl.UTF-8 | |
135 | Ten pakiet zawiera narzędzia D-BUS pozwalające na uruchomienie usługi | |
136 | D-BUS wraz z sesją X11 użytkownika. | |
137 | ||
138 | %prep | |
139 | %setup -q | |
140 | %patch0 -p1 | |
141 | %patch1 -p1 | |
142 | %patch2 -p1 | |
143 | %patch3 -p1 | |
144 | ||
145 | %build | |
146 | %{__libtoolize} | |
147 | %{__aclocal} -I m4 | |
148 | %{__autoconf} | |
149 | %{__autoheader} | |
150 | %{__automake} | |
151 | %configure \ | |
152 | %{?debug:--enable-verbose-mode} \ | |
153 | --disable-asserts \ | |
154 | --disable-silent-rules \ | |
155 | --disable-tests \ | |
156 | --enable-abstract-sockets=auto \ | |
157 | %{?with_selinux:--enable-selinux} \ | |
158 | --with-console-auth-dir=%{_localstatedir}/run/console/ \ | |
159 | --with-session-socket-dir=/tmp \ | |
160 | --with-system-pid-file=%{_localstatedir}/run/dbus.pid \ | |
161 | --with-systemdsystemunitdir=%{systemdunitdir} \ | |
162 | %{!?with_X11:--without-x} | |
163 | %{__make} | |
164 | ||
165 | %install | |
166 | rm -rf $RPM_BUILD_ROOT | |
167 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/{profile.d,rc.d/init.d,sysconfig,X11/xinit/xinitrc.d} \ | |
168 | $RPM_BUILD_ROOT%{_datadir}/dbus-1/{services,interfaces} \ | |
169 | $RPM_BUILD_ROOT%{_localstatedir}/run/dbus \ | |
170 | $RPM_BUILD_ROOT%{_localstatedir}/lib/dbus \ | |
171 | $RPM_BUILD_ROOT/%{_lib} \ | |
172 | $RPM_BUILD_ROOT%{systemdtmpfilesdir} | |
173 | ||
174 | %{__make} install \ | |
175 | DESTDIR=$RPM_BUILD_ROOT | |
176 | ||
177 | install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/messagebus | |
178 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d/dbus-daemon-1.sh | |
179 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/messagebus | |
180 | install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d | |
181 | ||
182 | cp -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf | |
183 | ||
184 | # upstart (/sbin/init) requires libdbus so it must be in /lib(64) | |
185 | mv -f $RPM_BUILD_ROOT%{_libdir}/libdbus-1.so.* $RPM_BUILD_ROOT/%{_lib} | |
186 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libdbus-1.so.*.*.*) \ | |
187 | $RPM_BUILD_ROOT%{_libdir}/libdbus-1.so | |
188 | ||
189 | ln -s dbus.service $RPM_BUILD_ROOT%{systemdunitdir}/messagebus.service | |
190 | ||
191 | %clean | |
192 | rm -rf $RPM_BUILD_ROOT | |
193 | ||
194 | %pre | |
195 | %groupadd -g 122 messagebus | |
196 | %useradd -u 122 -d /usr/share/empty -s /bin/false -c "System message bus" -g 122 messagebus | |
197 | ||
198 | %post | |
199 | /sbin/chkconfig --add messagebus | |
200 | %service -n messagebus restart "D-Bus daemon" | |
201 | export NORESTART="yes" | |
202 | %systemd_post messagebus.service | |
203 | ||
204 | %preun | |
205 | if [ "$1" = "0" ];then | |
206 | %service messagebus stop | |
207 | /sbin/chkconfig --del messagebus | |
208 | fi | |
209 | ||
210 | %postun | |
211 | if [ "$1" = "0" ]; then | |
212 | %userremove messagebus | |
213 | %groupremove messagebus | |
214 | fi | |
215 | %systemd_reload | |
216 | ||
217 | %triggerpostun -- dbus < 1.4.16-5 | |
218 | %systemd_trigger messagebus.service | |
219 | if [ -f /etc/sysconfig/dbus ]; then | |
220 | mv -f /etc/sysconfig/messagebus{,.rpmnew} | |
221 | mv -f /etc/sysconfig/{dbus,messagebus} | |
222 | elif [ -f /etc/sysconfig/dbus.rpmsave ]; then | |
223 | mv -f /etc/sysconfig/messagebus{,.rpmnew} | |
224 | mv -f /etc/sysconfig/{dbus.rpmsave,messagebus} | |
225 | fi | |
226 | ||
227 | %post libs -p /sbin/ldconfig | |
228 | %postun libs -p /sbin/ldconfig | |
229 | ||
230 | %files | |
231 | %defattr(644,root,root,755) | |
232 | %attr(755,root,root) %{_bindir}/dbus-cleanup-sockets | |
233 | %attr(755,root,root) %{_bindir}/dbus-daemon | |
234 | %attr(755,root,root) %{_bindir}/dbus-uuidgen | |
235 | %attr(755,root,root) %{_bindir}/dbus-monitor | |
236 | %attr(755,root,root) %{_bindir}/dbus-run-session | |
237 | %attr(755,root,root) %{_bindir}/dbus-send | |
238 | %attr(4754,root,messagebus) %{_libdir}/dbus-daemon-launch-helper | |
239 | %dir %{_datadir}/dbus-1/services | |
240 | %dir %{_datadir}/dbus-1/system-services | |
241 | %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/*.conf | |
242 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/messagebus | |
243 | %attr(754,root,root) /etc/rc.d/init.d/messagebus | |
244 | %attr(755,root,root) /etc/profile.d/dbus-daemon-1.sh | |
245 | %{systemdtmpfilesdir}/%{name}.conf | |
246 | %dir %{_localstatedir}/lib/dbus | |
247 | %dir %{_localstatedir}/run/dbus | |
248 | %{_mandir}/man1/dbus-cleanup-sockets.1* | |
249 | %{_mandir}/man1/dbus-daemon.1* | |
250 | %{_mandir}/man1/dbus-uuidgen.1* | |
251 | %{_mandir}/man1/dbus-monitor.1* | |
252 | %{_mandir}/man1/dbus-run-session.1* | |
253 | %{_mandir}/man1/dbus-send.1* | |
254 | ||
255 | %{systemdunitdir}/dbus.service | |
256 | %{systemdunitdir}/dbus.socket | |
257 | %{systemdunitdir}/dbus.target.wants/dbus.socket | |
258 | %{systemdunitdir}/messagebus.service | |
259 | %{systemdunitdir}/multi-user.target.wants/dbus.service | |
260 | %{systemdunitdir}/sockets.target.wants/dbus.socket | |
261 | ||
262 | %files libs | |
263 | %defattr(644,root,root,755) | |
264 | %doc AUTHORS COPYING ChangeLog NEWS README doc/TODO | |
265 | %attr(755,root,root) /%{_lib}/libdbus-1.so.*.*.* | |
266 | %attr(755,root,root) %ghost /%{_lib}/libdbus-1.so.3 | |
267 | %dir /etc/dbus-1 | |
268 | %dir /etc/dbus-1/system.d | |
269 | %dir /etc/dbus-1/session.d | |
270 | %dir %{_datadir}/dbus-1 | |
271 | # interfaces is basically devel thing, but keep dir here | |
272 | # in case something uses it at runtime | |
273 | %dir %{_datadir}/dbus-1/interfaces | |
274 | ||
275 | %files devel | |
276 | %defattr(644,root,root,755) | |
277 | %attr(755,root,root) %{_libdir}/libdbus-1.so | |
278 | %{_libdir}/libdbus-1.la | |
279 | %dir %{_libdir}/dbus-1.0 | |
280 | %{_libdir}/dbus-1.0/include | |
281 | %{_includedir}/dbus-1.0 | |
282 | %{_pkgconfigdir}/dbus-1.pc | |
283 | %dir %{_docdir}/dbus | |
284 | %{_docdir}/dbus/*.html | |
285 | %{_docdir}/dbus/*.png | |
286 | %{_docdir}/dbus/*.svg | |
287 | %{_docdir}/dbus/*.txt | |
288 | ||
289 | ||
290 | %files static | |
291 | %defattr(644,root,root,755) | |
292 | %{_libdir}/libdbus-1.a | |
293 | ||
294 | %files apidocs | |
295 | %defattr(644,root,root,755) | |
296 | %{_docdir}/dbus/api | |
297 | %{_docdir}/dbus/dbus.devhelp | |
298 | ||
299 | %files x11 | |
300 | %defattr(644,root,root,755) | |
301 | %attr(755,root,root) %{_bindir}/dbus-launch | |
302 | %{_mandir}/man1/dbus-launch.1* | |
303 | %attr(755,root,root) /etc/X11/xinit/xinitrc.d/dbus-xinitrc.sh |