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