1 # 2 # spec file for package SUNWdbus 3 # 4 # includes module(s): dbus 5 # 6 # Copyright 2007 Sun Microsystems, Inc. 7 # This file and all modifications and additions to the pristine 8 # package are under the same license as the package itself. 9 # 10 # Owner: yippi 11 # 12 13 %include Solaris.inc 14 15 %ifarch amd64 sparcv9 16 %include arch64.inc 17 %define _libexecdir %{_basedir}/lib 18 %use dbus_64 = dbus.spec 19 %endif 20 21 %include base.inc 22 %use dbus = dbus.spec 23 24 Name: SUNWdbus 25 Summary: Simple IPC library based on messages 26 Version: %{dbus.version} 27 Source: %{name}-manpages-0.1.tar.gz 28 SUNW_BaseDir: %{_basedir} 29 SUNW_Copyright: %{name}.copyright 30 BuildRoot: %{_tmppath}/%{name}-%{version}-build 31 Source1: dbus.xml 32 Source2: svc-dbus 33 Source3: 0005.dbus 34 %include default-depend.inc 35 Requires: SUNWdbus-libs 36 Requires: SUNWdbus-root 37 Requires: SUNWgnome-base-libs 38 Requires: SUNWlxml 39 Requires: SUNWlexpt 40 Requires: SUNWPython-extra 41 BuildRequires: SUNWgnome-base-libs-devel 42 BuildRequires: SUNWlxml 43 BuildRequires: SUNWsfwhea 44 BuildRequires: SUNWPython-extra 45 46 %package devel 47 Summary: %{summary} - development files 48 SUNW_BaseDir: %{_basedir} 49 %include default-depend.inc 50 Requires: SUNWgnome-base-libs 51 52 %package libs 53 Summary: %{summary} - client libraries 54 SUNW_BaseDir: %{_basedir} 55 %include default-depend.inc 56 57 %package root 58 Summary: %{summary} - / filesystem 59 SUNW_BaseDir: / 60 %include default-depend.inc 61 62 %prep 63 rm -rf %name-%version 64 mkdir %name-%version 65 66 %ifarch amd64 sparcv9 67 mkdir %name-%version/%_arch64 68 %dbus_64.prep -d %name-%version/%_arch64 69 %endif 70 71 mkdir %name-%version/%{base_arch} 72 %dbus.prep -d %name-%version/%{base_arch} 73 74 cd %{_builddir}/%name-%version 75 gzcat %SOURCE0 | tar xf - 76 77 %build 78 # Put /usr/ccs/lib first in the PATH so that cpp is picked up from there 79 # note: I didn't put /usr/lib in the PATH because there's too much other 80 # stuff in there 81 # 82 export PATH=/usr/ccs/lib:$PATH 83 %ifarch amd64 sparcv9 84 %dbus_64.build -d %name-%version/%_arch64 85 %endif 86 87 %dbus.build -d %name-%version/%{base_arch} 88 89 %install 90 rm -rf $RPM_BUILD_ROOT 91 92 %ifarch amd64 sparcv9 93 %dbus_64.install -d %name-%version/%_arch64 94 %endif 95 96 %dbus.install -d %name-%version/%{base_arch} 97 rm -rf $RPM_BUILD_ROOT%{_mandir} 98 cd %{_builddir}/%name-%version/sun-manpages 99 make install DESTDIR=$RPM_BUILD_ROOT 100 101 %ifarch amd64 sparcv9 102 cd $RPM_BUILD_ROOT%{_bindir}/%{_arch64} 103 rm dbus-launch dbus-monitor dbus-cleanup-sockets dbus-send dbus-uuidgen 104 cd .. 105 rmdir %{_arch64} 106 %endif 107 108 # The /var/run directory should not be included with the packages. 109 # D-Bus will create it at run-time. 110 # 111 rmdir $RPM_BUILD_ROOT/var/run/dbus 112 rmdir $RPM_BUILD_ROOT/var/run 113 114 # Add SMF integration files. 115 # 116 mkdir -p $RPM_BUILD_ROOT/var/svc/manifest/system 117 chmod -R 755 $RPM_BUILD_ROOT/var/svc 118 cp %SOURCE1 $RPM_BUILD_ROOT/var/svc/manifest/system/ 119 mkdir -p $RPM_BUILD_ROOT/lib/svc/method 120 chmod -R 755 $RPM_BUILD_ROOT/lib 121 cp %SOURCE2 $RPM_BUILD_ROOT/lib/svc/method/ 122 123 # Add in dbus session launching for gdm 124 # 125 install --mode=0755 -d $RPM_BUILD_ROOT/%{_sysconfdir} 126 install --mode=0755 -d $RPM_BUILD_ROOT/%{_sysconfdir}/X11 127 install --mode=0755 -d $RPM_BUILD_ROOT/%{_sysconfdir}/X11/xinit 128 install --mode=0755 -d $RPM_BUILD_ROOT/%{_sysconfdir}/X11/xinit/xinitrc.d 129 install --mode=0755 %SOURCE3 $RPM_BUILD_ROOT/%{_sysconfdir}/X11/xinit/xinitrc.d/0005.dbus 130 131 mkdir -p $RPM_BUILD_ROOT/etc/security 132 echo 'solaris.smf.manage.dbus:::Manage D-BUS Service States::help=SmfDBUSStates.html' > $RPM_BUILD_ROOT/etc/security/auth_attr 133 echo 'D-BUS Management:::Manage D-BUS:auths=solaris.smf.manage.dbus;help=RtDBUSMngmnt.html' > $RPM_BUILD_ROOT/etc/security/prof_attr 134 135 %{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT} 136 137 %clean 138 rm -rf $RPM_BUILD_ROOT 139 140 %if %(test -f /usr/sadm/install/scripts/i.manifest && echo 0 || echo 1) 141 %iclass manifest -f i.manifest 142 %endif 143 144 %pre root 145 #!/bin/sh 146 # 147 # Copyright 2006 Sun Microsystems, Inc. All rights reserved. 148 # Use is subject to license terms. 149 # 150 151 # Presence of this temp file will tell postinstall script 152 # that the dbus service is already installed, in which case 153 # the current service state will be preserved, be it enabled 154 # or disabled. 155 rm -f $PKG_INSTALL_ROOT/var/dbus_installed.tmp > /dev/null 2>&1 156 157 if [ -f $PKG_INSTALL_ROOT/var/svc/manifest/system/dbus.xml ]; then 158 touch $PKG_INSTALL_ROOT/var/dbus_installed.tmp 159 fi 160 161 exit 0 162 163 %post root 164 #!/bin/sh 165 # 166 # Copyright 2006 Sun Microsystems, Inc. All rights reserved. 167 # Use is subject to license terms. 168 # 169 170 # Preinstall script will create this file if dbus service was already 171 # installed, in which case we preserve current service state, 172 # be it enabled or disabled. 173 if [ -f $PKG_INSTALL_ROOT/var/dbus_installed.tmp ]; then 174 rm -f $PKG_INSTALL_ROOT/var/dbus_installed.tmp 175 else 176 # enable dbus: 177 # - PKG_INSTALL_ROOT is / or empty when installing onto a live system 178 # and we can invoke svcadm directly; 179 # - otherwise it's upgrade, so we append to the upgrade script 180 if [ "${PKG_INSTALL_ROOT:-/}" = "/" ]; then 181 if [ `/sbin/zonename` = global ]; then 182 /usr/sbin/svcadm enable svc:/system/dbus:default 183 fi 184 else 185 cat >> ${PKG_INSTALL_ROOT}/var/svc/profile/upgrade <<-EOF 186 if [ \`/sbin/zonename\` = global ]; then 187 /usr/sbin/svcadm enable svc:/system/dbus:default 188 fi 189 EOF 190 fi 191 fi 192 193 exit 0 194 195 %files 196 %defattr (-, root, bin) 197 %dir %attr (0755, root, bin) %{_bindir} 198 %{_bindir}/* 199 %{_libexecdir}/dbus-1 200 %{_libexecdir}/dbus-daemon 201 %dir %attr (0755, root, sys) %{_datadir} 202 %{_datadir}/dbus-1 203 %doc -d %{base_arch}/dbus-%{dbus.version} AUTHORS README 204 %doc(bzip2) -d %{base_arch}/dbus-%{dbus.version} ChangeLog ChangeLog.pre-1-0 205 %doc(bzip2) -d %{base_arch}/dbus-%{dbus.version} ChangeLog.pre-1-2 206 %doc(bzip2) -d %{base_arch}/dbus-%{dbus.version} COPYING NEWS 207 %doc(bzip2) -d %{base_arch}/dbus-%{dbus.version} NEWS.pre-1-0 NEWS.pre-1-2 208 %dir %attr (0755, root, other) %{_datadir}/doc 209 %dir %attr(0755, root, bin) %{_mandir} 210 %dir %attr(0755, root, bin) %{_mandir}/man1 211 %{_mandir}/man1/* 212 213 %files libs 214 %defattr (-, root, bin) 215 %dir %attr (0755, root, bin) %{_libdir} 216 %{_libdir}/libdbus* 217 %ifarch amd64 sparcv9 218 %dir %attr (0755, root, bin) %{_libdir}/%{_arch64} 219 %{_libdir}/%{_arch64}/libdbus* 220 %endif 221 222 %files root 223 %defattr (-, root, bin) 224 %dir %attr (0755, root, sys) %{_sysconfdir} 225 %config %{_sysconfdir}/dbus-1 226 %dir %attr (0755, root, sys) %{_sysconfdir}/X11 227 %dir %attr (0755, root, sys) %{_sysconfdir}/X11/xinit 228 %dir %attr (0755, root, sys) %{_sysconfdir}/X11/xinit/xinitrc.d 229 %{_sysconfdir}/X11/xinit/xinitrc.d/0005.dbus 230 %dir %attr (0755, root, sys) %{_localstatedir} 231 %dir %attr (0755, root, other) %{_localstatedir}/lib 232 %attr (0755, root, root) %{_localstatedir}/lib/dbus 233 %dir %attr (0755, root, sys) /var/svc 234 %dir %attr (0755, root, sys) /var/svc/manifest 235 %dir %attr (0755, root, sys) /var/svc/manifest/system 236 %class(manifest) %attr (0444, root, sys) /var/svc/manifest/system/dbus.xml 237 %attr (0555, root, bin) /lib/svc/method/svc-dbus 238 %dir %attr (0755, root, sys) /etc/security 239 %config %class (rbac) %attr (0644, root, sys) /etc/security/auth_attr 240 %config %class (rbac) %attr (0644, root, sys) /etc/security/prof_attr 241 242 %files devel 243 %defattr (-, root, bin) 244 %dir %attr (0755, root, bin) %{_libdir} 245 %dir %attr (0755, root, other) %{_libdir}/pkgconfig 246 %{_libdir}/pkgconfig/* 247 %{_libdir}/dbus*/include 248 %dir %attr (0755, root, bin) %{_includedir} 249 %{_includedir}/* 250 %ifarch amd64 sparcv9 251 %dir %attr (0755, root, bin) %{_libdir}/%{_arch64} 252 %dir %attr (0755, root, other) %{_libdir}/%{_arch64}/pkgconfig 253 %dir %attr (0755, root, bin) %{_libdir}/%{_arch64}/dbus-1.0 254 %{_libdir}/%{_arch64}/pkgconfig/*.pc 255 %{_libdir}/%{_arch64}/dbus-1.0/* 256 %endif 257 258 %changelog 259 * Wed Oct 29 2008 - ghee.teo@sun.com 260 - Add /etc/X11/xinit/xinitrc.d/0005.dbus to fix 6755007 and d.o.o 4097 so that gdm can 261 launch dbus session for the user. This can be used for both gdm on nevada and 262 OpenSolaris. 263 * Sun Sep 14 2008 - brian.cameron@sun.com 264 - Add new copyright files. 265 * Tue Sep 02 2008 - brian.cameron@sun.com 266 - Place the library in a separate package, so that people who just 267 want to write their own D-Bus services don't need to depend on the 268 daemon. 269 * Wed Aug 20 2008 - brian.cameron (at] sun.com 270 - Move dbus-daemon.3 manpage to dbus-daemon.1 manpage. 271 * Thu Mar 27 2008 - brian.cameron (at] sun.com 272 - Add SUNW_Copyright. 273 * Wed Mar 19 2008 - brian.cameron (at] sun.com 274 - Remove the symlinks that point from /usr/lib/libdbus-1.so.2 to 275 /usr/lib/libdbus-1.so.3. Now that ON updated their build machines to use the 276 new D-Bus library, the symlinks are no longer needed. 277 * Fri Jan 11 2008 - damien.carbery (at] sun.com 278 - Fix amd64/sparcv9 symlink to point to libdbus-1.so.3 (2nd half of Brian's 279 change on Aug 6. Fixes 6624762. 280 * Tue Nov 20 2007 - brian.cameron@sun.com 281 - Add dbus manpages. 282 * Mon Oct 8 2007 - damien.carbery@sun.com 283 - Remove %{_libdir}/dbus-1 line from base package as it only contains a header 284 file and is duplicated in the devel package. Fixes 6613798. 285 * Mon Oct 1 2007 - laca@sun.com 286 - change 64-bit libexecdir to /usr/lib 287 * Mon Oct 1 2007 - damien.carbery@sun.com 288 - Fix %files, adding %{_libdir}/%{_arch64}/dbus-1. 289 * Sun Sep 30 2007 - laca@sun.com 290 - fix %install 291 * Fri Sep 28 2007 - laca@sun.com 292 - convert to new style multi-ISA build 293 - delete SUNWxwrtl dep 294 * Mon Aug 06 2007 - brian.cameron@sun.com 295 - Fix packaging after bumping to 1.1.2. Also fix the symlink so we 296 link to libdbus-1.so.3 rather than libdbus-1.so.3.# so we don't have 297 to update the link each time we upgrade the D-Bus library. 298 * Sun Feb 25 2007 - dougs@truemail.co.th 299 - updated to include 64-bit build RFE: #6480511 300 * Fri Dec 15 2006 - damien.carbery@sun.com 301 - Create symlink to support hal which was built with an older version of dbus. 302 * Mon Nov 27 2006 - brian.cameron@sun.com 303 - Update to 1.0.1. 304 * Fri Nov 24 2006 - damien.carbery@sun.com 305 - Update %files - remove python dir, add %{_localstatedir}/lib/dbus. 306 * Mon Sep 18 2006 - laca@sun.com 307 - revert to normal optimisation flags, the build problems were caused by 308 ld(1) bug 6467925 309 - change /var/run/dbus permissions to root:root, fixes 6460949 310 * Mon Aug 28 2006 - damien.carbery@sun.com 311 - Use '-xO2' optimization (not -xO4) as the latter causes seg faults in build. 312 * Fri Aug 25 2006 - padraig.obriain@sun.com 313 - Use c99 compiler 314 * Fri Jul 28 2006 - laca@sun.com 315 - add pre and post scripts for enabling the dbus svc upon installation 316 but leaving it as is upon upgrade (Artem Kachitchkine, David Bustos) 317 * Fri Jul 21 2006 - laca@sun.com 318 - Add dbus RBAC entries to auth_attr and prof_attr 319 * Mon May 08 2006 - damien.carbery@sun.com 320 - Add Build/Requires dependency on SUNWPython-extra (for Pyrex) so that python 321 bindings are built. 322 * Tue May 02 2006 - laca@sun.com 323 - add SMF support (from Artem Kachitchkine) 324 * Fri Feb 17 2006 - damien.carbery@sun.com 325 - Update Build/Requires after running check-deps.pl script. 326 * Tue Oct 25 2005 - damien.carbery@sun.com 327 - Add the include dir under _libdir. 328 * Fri Oct 21 2005 - damien.carbery@sun.com 329 - Initial spec file created. 330 331