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