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