]>
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 |
756fb95f JB |
10 | Version: 1.4.14 |
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 |
756fb95f | 15 | # Source0-md5: ae6de2562a57516cfabaf56903375ba9 |
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 |
f922e835 | 20 | Source5: messagebus.upstart |
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 | |
ab3fabda | 29 | BuildRequires: doxygen |
b89a2164 | 30 | BuildRequires: expat-devel >= %{expat_version} |
b34aed38 | 31 | BuildRequires: libcap-ng-devel |
0f5eff1c | 32 | %{?with_selinux:BuildRequires: libselinux-devel} |
38d51c46 | 33 | BuildRequires: libtool >= 2:2.0 |
756fb95f | 34 | BuildRequires: libxslt-progs |
60d211c4 | 35 | BuildRequires: pkgconfig |
f922e835 | 36 | BuildRequires: rpmbuild(macros) >= 1.561 |
f15cbea8 | 37 | BuildRequires: sed >= 4.0 |
17b61c76 | 38 | BuildRequires: xmlto |
4c6c017a | 39 | %{?with_X11:BuildRequires: xorg-lib-libX11-devel} |
9a0bbf5a ER |
40 | Requires(post,postun): /sbin/ldconfig |
41 | Requires(post,preun): /sbin/chkconfig | |
42 | Requires(postun): /usr/sbin/groupdel | |
43 | Requires(postun): /usr/sbin/userdel | |
48d7fff5 | 44 | Requires(pre): /bin/id |
b5824d21 | 45 | Requires(pre): /usr/bin/getgid |
48d7fff5 JB |
46 | Requires(pre): /usr/sbin/groupadd |
47 | Requires(pre): /usr/sbin/useradd | |
9d777b18 | 48 | Requires: %{name}-dirs = %{version}-%{release} |
9a0bbf5a | 49 | Requires: %{name}-libs = %{version}-%{release} |
9fb96e41 | 50 | Requires: expat >= %{expat_version} |
6d3c188e | 51 | Requires: rc-scripts >= 0.4.1.26 |
b5824d21 | 52 | Provides: group(messagebus) |
53 | Provides: user(messagebus) | |
c3f3aa78 | 54 | Obsoletes: dbus-X11 |
75a73017 | 55 | Obsoletes: dbus-glib-tools |
86eafeb2 | 56 | Conflicts: pam < 0.99.7.1 |
8a7e4f09 JB |
57 | # not available for dbus 0.9x yet(?) |
58 | #Obsoletes: dbus-gtk dbus-gcj dbus-gcj-devel dbus-gcj-static | |
bc0b5507 | 59 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
3f8dd6e4 AF |
60 | |
61 | %description | |
62 | D-BUS is a system for sending messages between applications. It is | |
63 | used both for the systemwide message bus service, and as a | |
64 | per-user-login-session messaging facility. | |
65 | ||
702c1f82 JR |
66 | %description -l pl.UTF-8 |
67 | D-BUS to system przesyłania komunikatów pomiędzy aplikacjami. Jest | |
68 | używany zarówno jako ogólnosystemowa usługa magistrali komunikatów jak | |
69 | i możliwość przesyłania komunikatów w ramach jednej sesji użytkownika. | |
bc0b5507 | 70 | |
f922e835 JK |
71 | %package upstart |
72 | Summary: Upstart job description for system message bus | |
73 | Summary(pl.UTF-8): Opis zadania Upstart dla magistrali systemowej DBus | |
74 | Group: Daemons | |
75 | Requires: %{name} = %{version}-%{release} | |
76 | Requires: upstart >= 0.6 | |
77 | ||
78 | %description upstart | |
79 | Upstart job description for system message bus. | |
80 | ||
81 | %description upstart -l pl.UTF-8 | |
82 | Opis zadania Upstart dla magistrali systemowej DBus. | |
83 | ||
9d777b18 PG |
84 | %package dirs |
85 | Summary: D-BUS directories | |
86 | Summary(pl.UTF-8): Katalogi D-BUS | |
87 | Group: Libraries | |
88 | ||
89 | %description dirs | |
90 | D-BUS directories. | |
91 | ||
92 | %description dirs -l pl.UTF-8 | |
93 | Katalogi D-BUS. | |
94 | ||
93c19477 | 95 | %package libs |
3bdcad6f JB |
96 | Summary: D-BUS library |
97 | Summary(pl.UTF-8): Biblioteka D-BUS | |
93c19477 JB |
98 | Group: Libraries |
99 | ||
100 | %description libs | |
3bdcad6f | 101 | D-BUS library. |
93c19477 | 102 | |
702c1f82 | 103 | %description libs -l pl.UTF-8 |
3bdcad6f | 104 | Biblioteka D-BUS. |
93c19477 | 105 | |
3f8dd6e4 | 106 | %package devel |
3bdcad6f JB |
107 | Summary: Header files for D-BUS library |
108 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki D-BUS | |
3f8dd6e4 | 109 | Group: Development/Libraries |
e58eea39 | 110 | Requires: %{name}-libs = %{version}-%{release} |
3f8dd6e4 AF |
111 | |
112 | %description devel | |
3bdcad6f | 113 | Header files for D-BUS library. |
bc0b5507 | 114 | |
702c1f82 | 115 | %description devel -l pl.UTF-8 |
3bdcad6f | 116 | Pliki nagłówkowe biblioteki D-BUS. |
bc0b5507 JB |
117 | |
118 | %package static | |
3bdcad6f JB |
119 | Summary: Static D-BUS library |
120 | Summary(pl.UTF-8): Statyczna biblioteka D-BUS | |
bc0b5507 | 121 | Group: Development/Libraries |
26ded955 | 122 | Requires: %{name}-devel = %{version}-%{release} |
bc0b5507 JB |
123 | |
124 | %description static | |
3bdcad6f | 125 | Static D-BUS library. |
bc0b5507 | 126 | |
702c1f82 | 127 | %description static -l pl.UTF-8 |
3bdcad6f | 128 | Statyczna biblioteka D-BUS. |
3f8dd6e4 | 129 | |
3f8dd6e4 AF |
130 | %prep |
131 | %setup -q | |
132 | %patch0 -p1 | |
d40e6d8d | 133 | %patch1 -p1 |
d63e2026 | 134 | %patch2 -p1 |
312606de | 135 | %patch3 -p1 |
3f8dd6e4 AF |
136 | |
137 | %build | |
138 | %{__libtoolize} | |
609b792a | 139 | %{__aclocal} -I m4 |
3f8dd6e4 | 140 | %{__autoconf} |
60d211c4 | 141 | %{__autoheader} |
3f8dd6e4 | 142 | %{__automake} |
92f6f38b | 143 | %configure \ |
d728aff5 | 144 | %{?debug:--enable-verbose-mode} \ |
f100943e | 145 | --disable-silent-rules \ |
7dee3cfe | 146 | --disable-asserts \ |
d728aff5 | 147 | --disable-tests \ |
4f16c093 | 148 | --enable-abstract-sockets=auto \ |
0f5eff1c | 149 | %{?with_selinux:--enable-selinux} \ |
845c3048 | 150 | --with-console-auth-dir=%{_localstatedir}/run/console/ \ |
c74466a5 | 151 | --with-session-socket-dir=/tmp \ |
ab3fabda | 152 | --with-system-pid-file=%{_localstatedir}/run/dbus.pid \ |
4c6c017a JK |
153 | --with-xml=expat \ |
154 | %{!?with_X11:--without-x} | |
d31ee46d | 155 | %{__make} |
3f8dd6e4 AF |
156 | |
157 | %install | |
158 | rm -rf $RPM_BUILD_ROOT | |
f922e835 | 159 | install -d $RPM_BUILD_ROOT/etc/{init,profile.d,rc.d/init.d,sysconfig,X11/xinit/xinitrc.d} \ |
9d777b18 PG |
160 | $RPM_BUILD_ROOT%{_datadir}/dbus-1/{services,interfaces} \ |
161 | $RPM_BUILD_ROOT%{_localstatedir}/run/dbus \ | |
162 | $RPM_BUILD_ROOT/%{_lib} | |
3f8dd6e4 AF |
163 | |
164 | %{__make} install \ | |
d31ee46d | 165 | DESTDIR=$RPM_BUILD_ROOT |
3f8dd6e4 | 166 | |
6c17b0ba ER |
167 | install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/messagebus |
168 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d/dbus-daemon-1.sh | |
169 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/messagebus | |
170 | install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d | |
171 | cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/init/messagebus.conf | |
817942a3 | 172 | |
a38affeb | 173 | # upstart (/sbin/init) requires libdbus so it must be in /lib(64) |
2011471a JB |
174 | mv -f $RPM_BUILD_ROOT%{_libdir}/libdbus-1.so.* $RPM_BUILD_ROOT/%{_lib} |
175 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libdbus-1.so.*.*.*) \ | |
176 | $RPM_BUILD_ROOT%{_libdir}/libdbus-1.so | |
a38affeb | 177 | |
38d51c46 JB |
178 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/dbus/api |
179 | ||
3f8dd6e4 | 180 | %clean |
bc0b5507 | 181 | rm -rf $RPM_BUILD_ROOT |
3f8dd6e4 | 182 | |
817942a3 | 183 | %pre |
64d48b42 | 184 | %groupadd -g 122 messagebus |
d3e1076f | 185 | %useradd -u 122 -d /usr/share/empty -s /bin/false -c "System message bus" -g 122 messagebus |
817942a3 | 186 | |
187 | %post | |
817942a3 | 188 | /sbin/chkconfig --add messagebus |
9a0bbf5a | 189 | %service messagebus restart "D-Bus daemon" |
817942a3 | 190 | |
191 | %preun | |
192 | if [ "$1" = "0" ];then | |
9a0bbf5a | 193 | %service messagebus stop |
817942a3 | 194 | /sbin/chkconfig --del messagebus |
195 | fi | |
196 | ||
197 | %postun | |
817942a3 | 198 | if [ "$1" = "0" ]; then |
b5824d21 | 199 | %userremove messagebus |
200 | %groupremove messagebus | |
817942a3 | 201 | fi |
0186cbb3 | 202 | |
f777c982 | 203 | %if 0 |
f922e835 JK |
204 | %post upstart |
205 | %upstart_post messagebus | |
206 | ||
207 | %postun upstart | |
208 | %upstart_postun messagebus | |
f777c982 | 209 | %endif |
f922e835 | 210 | |
2c14f3cc | 211 | %post libs -p /sbin/ldconfig |
212 | %postun libs -p /sbin/ldconfig | |
f82a8a7b | 213 | |
b89dd173 | 214 | %triggerpostun -- %{name} < 0.92 |
215 | %banner %{name} << EOF | |
216 | WARNING!!! | |
217 | configuration file /etc/sysconfig/dbus has been moved to /etc/sysconfig/messagebus! | |
218 | EOF | |
219 | ||
e4a64dc3 JR |
220 | if [ -f /etc/sysconfig/dbus ]; then |
221 | mv -f /etc/sysconfig/messagebus{,.rpmnew} | |
222 | mv -f /etc/sysconfig/{dbus,messagebus} | |
223 | elif [ -f /etc/sysconfig/dbus.rpmsave ]; then | |
224 | mv -f /etc/sysconfig/messagebus{,.rpmnew} | |
225 | mv -f /etc/sysconfig/{dbus.rpmsave,messagebus} | |
226 | fi | |
b89dd173 | 227 | |
3f8dd6e4 AF |
228 | %files |
229 | %defattr(644,root,root,755) | |
60d211c4 | 230 | %attr(755,root,root) %{_bindir}/dbus-cleanup-sockets |
08c9542c | 231 | %attr(755,root,root) %{_bindir}/dbus-daemon |
e5453be6 | 232 | %attr(755,root,root) %{_bindir}/dbus-uuidgen |
d6c9dbd7 | 233 | # R: libX11 |
2b8f3b50 | 234 | %attr(755,root,root) %{_bindir}/dbus-launch |
d31ee46d | 235 | %attr(755,root,root) %{_bindir}/dbus-monitor |
60d211c4 | 236 | %attr(755,root,root) %{_bindir}/dbus-send |
9fb96e41 | 237 | %attr(4754,root,messagebus) %{_libdir}/dbus-daemon-launch-helper |
9fb96e41 | 238 | %dir %{_datadir}/dbus-1 |
39b52e3f | 239 | %dir %{_datadir}/dbus-1/interfaces |
9fb96e41 JB |
240 | %dir %{_datadir}/dbus-1/services |
241 | %dir %{_datadir}/dbus-1/system-services | |
f82a8a7b | 242 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dbus-1/*.conf |
b89dd173 | 243 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/messagebus |
817942a3 | 244 | %attr(754,root,root) /etc/rc.d/init.d/* |
6f305975 | 245 | %attr(755,root,root) /etc/profile.d/dbus-daemon-1.sh |
4673fbd5 | 246 | %attr(755,root,root) /etc/X11/xinit/xinitrc.d/*.sh |
184f238c | 247 | %dir %{_localstatedir}/run/dbus |
d7c0a93c | 248 | %dir /var/lib/dbus |
60d211c4 | 249 | %{_mandir}/man1/dbus-cleanup-sockets.1* |
08c9542c | 250 | %{_mandir}/man1/dbus-daemon.1* |
e5453be6 | 251 | %{_mandir}/man1/dbus-uuidgen.1* |
d6c9dbd7 | 252 | %{_mandir}/man1/dbus-launch.1* |
d31ee46d | 253 | %{_mandir}/man1/dbus-monitor.1* |
60d211c4 | 254 | %{_mandir}/man1/dbus-send.1* |
3f8dd6e4 | 255 | |
5e4a018f | 256 | %if "%{pld_release}" != "ti" |
f922e835 JK |
257 | %files upstart |
258 | %defattr(644,root,root,755) | |
259 | %config(noreplace) %verify(not md5 mtime size) /etc/init/messagebus.conf | |
5e4a018f | 260 | %endif |
f922e835 | 261 | |
9d777b18 PG |
262 | %files dirs |
263 | %defattr(644,root,root,755) | |
264 | %dir %{_sysconfdir}/dbus-1 | |
265 | %dir %{_sysconfdir}/dbus-1/system.d | |
266 | %dir %{_sysconfdir}/dbus-1/session.d | |
267 | ||
0186cbb3 | 268 | %files libs |
3f8dd6e4 | 269 | %defattr(644,root,root,755) |
e58eea39 | 270 | %doc AUTHORS COPYING ChangeLog NEWS README doc/TODO |
a38affeb JR |
271 | %attr(755,root,root) /%{_lib}/libdbus-1.so.*.*.* |
272 | %attr(755,root,root) %ghost /%{_lib}/libdbus-1.so.3 | |
0186cbb3 | 273 | |
274 | %files devel | |
275 | %defattr(644,root,root,755) | |
276 | %doc doc/*.{html,txt} | |
2009405e | 277 | %attr(755,root,root) %{_libdir}/libdbus-1.so |
60d211c4 | 278 | %{_libdir}/libdbus-1.la |
9fb96e41 JB |
279 | %dir %{_libdir}/dbus-1.0 |
280 | %{_libdir}/dbus-1.0/include | |
92f6f38b | 281 | %{_pkgconfigdir}/dbus-1.pc |
9fb96e41 | 282 | %{_includedir}/dbus-1.0 |
bc0b5507 JB |
283 | |
284 | %files static | |
285 | %defattr(644,root,root,755) | |
60d211c4 | 286 | %{_libdir}/libdbus-1.a |