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