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