SUNWdbus.spec
author laca
Sat, 29 Sep 2007 04:38:49 +0000
changeset 10572 8cdee8cd9c9c
parent 10465 523441b3f443
child 10579 81555ebcf4e4
permissions -rw-r--r--
2007-09-29 Laszlo (Laca) Peter <[email protected]> More indiana build changes * SUNWPython.spec: add option to build with FOX X libs * SUNWbrltty.spec: add option to build with FOX instead of Nevada X * SUNWdbus-bindings.spec: convert to new style multi-ISA build; delete SUNWxwrtl dep * SUNWdbus.spec: convert to new style multi-ISA build; delete SUNWxwrtl dep * SUNWfirefox.spec: delete Nevada X deps; disable developer guide dep if sun branding is not requested * SUNWgnome-a11y-dasher.spec: delete Nevada X deps; delete some unneeded env vars * SUNWgnome-a11y-libs.spec: disable java access bridge if build without java support * SUNWgnome-a11y-speech.spec: disable packaging java stuff if the --without-java option is used * SUNWgnome-applets.spec: delete Nevada X deps; make xorg-xkb dep dependent upon nevada X build * SUNWgnome-config.spec: convert to new style multi-ISA build * SUNWgnome-desktop-prefs.spec: add support to build on FOX instead of Nevada X; disable emacs support * SUNWgnome-dialog.spec: delete Nevada X dep * SUNWgnome-file-mgr.spec: delete Nevada X dep * SUNWgnome-img-editor.spec: delete Nevada X dep * SUNWgnome-img-organizer.spec: delete Nevada X dep * SUNWgnome-img-viewer.spec: delete Nevada X dep * SUNWgnome-libs.spec: delete Nevada X dep * SUNWgnome-media-mp3.spec: delete some unneeded env vars * SUNWgnome-media.spec: delete SUNWxwrtl dep * SUNWgnome-panel.spec: delete Nevada X deps; make xorg-xkb dep dependent upon nevada X build; delete some unneeded env vars * SUNWgnome-python-libs.spec: delete some unnecessary env vars * SUNWgnome-remote-desktop.spec: disable building the java client when --without-java is used; delete unneeded env variables * SUNWgnome-session.spec: delete Nevada X deps; delete some unneeded env vars * SUNWgnome-terminal.spec: delete Nevada X deps; delete some unneeded env vars * SUNWgnome-themes.spec: disable building blueprint when the --without-blueprint option is used; disable building sun-gdm-themes when --with-sun-branding is not used * SUNWgnome-utils.spec: delete Nevada X deps; delete some unneeded env vars * SUNWlibrsvg.spec: delete Nevada X dep * SUNWprint-monitor.spec: delete SUNWxwrtl dependency, twice... * base-specs/GConf.spec: convert to new style multi-ISA build * base-specs/ORBit2.spec: convert to new style multi-ISA build * base-specs/dbus-glib.spec: convert to new style multi-ISA build * base-specs/dbus-python.spec: convert to new style multi-ISA build * base-specs/dbus.spec: convert to new style multi-ISA build * base-specs/firefox.spec: do not add developer guide bookmark when sun branding is not requested * base-specs/glib2.spec: add support for building with GNU libiconv * base-specs/gnome-backgrounds.spec: do not install sun branded desktop wallpapers when sun branding is not requested * base-specs/gnome-desktop.spec: disable the jds branding patch when jds branding is not requested * base-specs/gnome-icon-theme.spec: do not install sun java icon when sun branding is not requested * base-specs/gnome-speech.spec: disable java stuff if the --without-java option is used * base-specs/libIDL.spec: convert to new style multi-ISA build * base-specs/libbonobo.spec: convert to new style multi-ISA build * base-specs/metacity.spec: disable tjds patch when tjds support is not requested * cron-script.sh: add --with-sun-branding option

#
# spec file for package SUNWdbus
#
# includes module(s): dbus
#
# Copyright 2007 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Owner: yippi
#

%include Solaris.inc

%ifarch amd64 sparcv9
%include arch64.inc
%use dbus_64 = dbus.spec
%endif

%include base.inc
%use dbus = dbus.spec

Name:                    SUNWdbus
Summary:                 Simple IPC library based on messages
Version:                 %{dbus.version}
SUNW_BaseDir:            %{_basedir}
BuildRoot:               %{_tmppath}/%{name}-%{version}-build
Source1:        dbus.xml
Source2:        svc-dbus
%include default-depend.inc
Requires:	SUNWdbus-root
Requires:	SUNWgnome-base-libs
Requires:	SUNWlxml
Requires:       SUNWlexpt
Requires:       SUNWPython-extra
BuildRequires:	SUNWgnome-base-libs-devel
BuildRequires:	SUNWlxml
BuildRequires:  SUNWsfwhea
BuildRequires:  SUNWPython-extra

%package devel
Summary:                 %{summary} - development files
SUNW_BaseDir:            %{_basedir}
%include default-depend.inc
Requires:       SUNWgnome-base-libs

%package root
Summary:                 %{summary} - / filesystem
SUNW_BaseDir:            /
%include default-depend.inc

%prep
rm -rf %name-%version
mkdir %name-%version

%ifarch amd64 sparcv9
mkdir %name-%version/%_arch64
%dbus_64.prep -d %name-%version/%_arch64
%endif

mkdir %name-%version/%{base_arch}
%dbus.prep -d %name-%version/%{base_arch}

%build
# Put /usr/ccs/lib first in the PATH so that cpp is picked up from there
# note: I didn't put /usr/lib in the PATH because there's too much other
# stuff in there
#
export PATH=/usr/ccs/lib:$PATH
%ifarch amd64 sparcv9
%dbus_64.build -d %name-%version/%_arch64
%endif
 
%dbus.build -d %name-%version/%{base_arch}

%install
rm -rf $RPM_BUILD_ROOT
%dbus.install -d %name-%version

# Create symlink to support hal which was built with an older version of dbus.
cd $RPM_BUILD_ROOT%{_libdir}
ln -s libdbus-1.so.3 libdbus-1.so.2 
%ifarch amd64 sparcv9
cd %{_arch64}
ln -s libdbus-1.so.3.2.0 libdbus-1.so.2 
cd ../../bin/%{_arch64}
rm dbus-launch dbus-monitor dbus-cleanup-sockets dbus-send dbus-uuidgen
cd ..
rmdir %{_arch64}
%endif

mkdir -p $RPM_BUILD_ROOT/var/svc/manifest/system
chmod -R 755 $RPM_BUILD_ROOT/var/svc
cp %SOURCE1 $RPM_BUILD_ROOT/var/svc/manifest/system/
mkdir -p $RPM_BUILD_ROOT/lib/svc/method
chmod -R 755 $RPM_BUILD_ROOT/lib
cp %SOURCE2 $RPM_BUILD_ROOT/lib/svc/method/

mkdir -p $RPM_BUILD_ROOT/etc/security
echo 'solaris.smf.manage.dbus:::Manage D-BUS Service States::help=SmfDBUSStates.html' > $RPM_BUILD_ROOT/etc/security/auth_attr
echo 'D-BUS Management:::Manage D-BUS:auths=solaris.smf.manage.dbus;help=RtDBUSMngmnt.html' > $RPM_BUILD_ROOT/etc/security/prof_attr

%{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}

%clean
rm -rf $RPM_BUILD_ROOT

%if %(test -f /usr/sadm/install/scripts/i.manifest && echo 0 || echo 1)
%iclass manifest -f i.manifest
%endif

%pre root
#!/bin/sh
#
# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#

# Presence of this temp file will tell postinstall script
# that the dbus service is already installed, in which case
# the current service state will be preserved, be it enabled
# or disabled.
rm -f $PKG_INSTALL_ROOT/var/dbus_installed.tmp > /dev/null 2>&1

if [ -f $PKG_INSTALL_ROOT/var/svc/manifest/system/dbus.xml ]; then 
	touch $PKG_INSTALL_ROOT/var/dbus_installed.tmp
fi

exit 0

%post root
#!/bin/sh
#
# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#

# Preinstall script will create this file if dbus service was already
# installed, in which case we preserve current service state,
# be it enabled or disabled.
if [ -f $PKG_INSTALL_ROOT/var/dbus_installed.tmp ]; then
	rm -f $PKG_INSTALL_ROOT/var/dbus_installed.tmp
else
	# enable dbus:
	# - PKG_INSTALL_ROOT is / or empty when installing onto a live system
	#   and we can invoke svcadm directly;
	# - otherwise it's upgrade, so we append to the upgrade script
	if [ "${PKG_INSTALL_ROOT:-/}" = "/" ]; then
		if [ `/sbin/zonename` = global ]; then
			/usr/sbin/svcadm enable svc:/system/dbus:default
		fi
	else
		cat >> ${PKG_INSTALL_ROOT}/var/svc/profile/upgrade <<-EOF
		if [ \`/sbin/zonename\` = global ]; then
			/usr/sbin/svcadm enable svc:/system/dbus:default
		fi
EOF
	fi
fi

exit 0

%files
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/*
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/libdbus*
%{_libdir}/dbus-1.0
%{_libexecdir}/dbus-1
%{_libexecdir}/dbus-daemon
%dir %attr (0755, root, sys) %{_datadir}
%{_datadir}/dbus-1
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/man1
%{_mandir}/man1/*
%ifarch amd64 sparcv9
%dir %attr (0755, root, bin) %{_libdir}/%{_arch64}
%{_libdir}/%{_arch64}/libdbus*
%endif

%files root
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_sysconfdir}
%config %{_sysconfdir}/dbus-1
%dir %attr (0755, root, sys) %{_localstatedir}
%dir %attr (0755, root, other) %{_localstatedir}/lib
%attr (0755, root, root) %{_localstatedir}/lib/dbus
%dir %attr (0755, root, sys) %{_localstatedir}/run
%attr (0755, root, root) %{_localstatedir}/run/dbus
%dir %attr (0755, root, sys) /var/svc
%dir %attr (0755, root, sys) /var/svc/manifest
%dir %attr (0755, root, sys) /var/svc/manifest/system
%class(manifest) %attr (0444, root, sys) /var/svc/manifest/system/dbus.xml
%attr (0555, root, bin) /lib/svc/method/svc-dbus
%dir %attr (0755, root, sys) /etc/security
%config %class (rbac) %attr (0644, root, sys) /etc/security/auth_attr
%config %class (rbac) %attr (0644, root, sys) /etc/security/prof_attr

%files devel
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_libdir}
%dir %attr (0755, root, other) %{_libdir}/pkgconfig
%{_libdir}/pkgconfig/*
%{_libdir}/dbus*/include
%dir %attr (0755, root, bin) %{_includedir}
%{_includedir}/*
%ifarch amd64 sparcv9
%dir %attr (0755, root, bin) %{_libdir}/%{_arch64}
%dir %attr (0755, root, other) %{_libdir}/%{_arch64}/pkgconfig
%dir %attr (0755, root, bin) %{_libdir}/%{_arch64}/dbus-1.0
%{_libdir}/%{_arch64}/pkgconfig/*.pc
%{_libdir}/%{_arch64}/dbus-1.0/*
%endif

%changelog
* Fri Sep 28 2007 - [email protected]
- convert to new style multi-ISA build
- delete SUNWxwrtl dep
* Mon Aug 06 2007 - [email protected]
- Fix packaging after bumping to 1.1.2.  Also fix the symlink so we
  link to libdbus-1.so.3 rather than libdbus-1.so.3.# so we don't have
  to update the link each time we upgrade the D-Bus library.
* Sun Feb 25 2007 - [email protected]
- updated to include 64-bit build RFE: #6480511
* Fri Dec 15 2006 - [email protected]
- Create symlink to support hal which was built with an older version of dbus.
* Mon Nov 27 2006 - [email protected]
- Update to 1.0.1.
* Fri Nov 24 2006 - [email protected]
- Update %files - remove python dir, add %{_localstatedir}/lib/dbus.
* Mon Sep 18 2006 - [email protected]
- revert to normal optimisation flags, the build problems were caused by
  ld(1) bug 6467925
- change /var/run/dbus permissions to root:root, fixes 6460949
* Mon Aug 28 2006 - [email protected]
- Use '-xO2' optimization (not -xO4) as the latter causes seg faults in build.
* Fri Aug 25 2006 - [email protected]
- Use c99 compiler
* Fri Jul 28 2006 - [email protected]
- add pre and post scripts for enabling the dbus svc upon installation
  but leaving it as is upon upgrade (Artem Kachitchkine, David Bustos)
* Fri Jul 21 2006 - [email protected]
- Add dbus RBAC entries to auth_attr and prof_attr
* Mon May 08 2006 - [email protected]
- Add Build/Requires dependency on SUNWPython-extra (for Pyrex) so that python
  bindings are built.
* Tue May 02 2006 - [email protected]
- add SMF support (from Artem Kachitchkine)
* Fri Feb 17 2006 - [email protected]
- Update Build/Requires after running check-deps.pl script.
* Tue Oct 25 2005 - [email protected]
- Add the include dir under _libdir.
* Fri Oct 21 2005 - [email protected]
- Initial spec file created.