SUNWavahi-bridge-dsd.spec
author ginnchen
Mon, 12 Apr 2010 08:07:21 +0000
branchgnome-2-28
changeset 18675 d625b72c91d8
parent 18446 89c39fc3e134
permissions -rw-r--r--
2010-04-12 Ginn Chen <[email protected]> * SUNWfirefox.spec: Fix the build issue of Firefox 3.6.3.

#
# spec file for package SUNWavahi-bridge-dsd
#
# includes module(s): avahi
#
# Copyright (c) 2006 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
%define owner padraig
#

%include Solaris.inc

%define pythonver 2.6

%use avahi = avahi.spec 

Name:                    SUNWavahi-bridge-dsd
Summary:                 Avahi client and bridge to SUNWdsd
Version:                 %{avahi.version}
SUNW_BaseDir:            %{_basedir}
BuildRoot:               %{_tmppath}/%{name}-%{version}-build
SUNW_copyright:          %{name}.copyright
Source1:        avahi-bridge-dsd.xml
Source2:        svc-avahi-bridge-dsd

%include default-depend.inc
BuildRequires:  SUNWgtk2-devel
BuildRequires:  SUNWgnome-python-libs-devel
BuildRequires:  SUNWdbus-python26
BuildRequires:  SUNWpython-setuptools
Requires:       SUNWgtk2
Requires:       SUNWdsdu
Requires:       SUNWgnome-python-libs
Requires:       SUNWPython26
Requires:       SUNWdbus-python26
Requires:       SUNWavahi-bridge-dsd-root
Requires:       SUNWlibdaemon
Requires:       SUNWlexpt
Requires:       SUNWdsdr

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

%package devel
Summary:                 %{summary} - development files
SUNW_BaseDir:            %{_prefix}
%include default-depend.inc
Requires: %{name}

%if %build_l10n
%package l10n
Summary:                 %{summary} - l10n files
SUNW_BaseDir:            %{_basedir}
%include default-depend.inc
Requires:                %{name}
%endif

%prep
rm -rf %name-%version
mkdir %name-%version
%avahi.prep -d %name-%version

%build
export PYTHON=/usr/bin/python%{pythonver}

PKG_CONFIG_DISABLE_UNISTALLED=
unset PKG_CONFIG_DISABLE_UNISTALLED
export PKG_CONFIG_PATH=../avahi-%{avahi.version}:%{_pkg_config_path}
export CFLAGS="%optflags -I/usr/sfw/include"
export RPM_OPT_FLAGS="$CFLAGS"
export LDFLAGS="%_ldflags -ldns_sd -lsocket -lnsl -L/usr/sfw/lib -R/usr/sfw/lib -lexpat"

%avahi.build -d %name-%version

%install
%avahi.install -d %name-%version
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/

mv $RPM_BUILD_ROOT%{_sbindir}/avahi-daemon $RPM_BUILD_ROOT%{_sbindir}/avahi-daemon-bridge-dsd
%if %option_with_indiana_branding
rm -rf $RPM_BUILD_ROOT%{_datadir}/applications
%endif

%if %build_l10n
%else
# REMOVE l10n FILES
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
%endif

%{?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

%files
%doc -d avahi-%{avahi.version} README LICENSE
%dir %attr (0755, root, other) %{_datadir}/doc
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/*
%dir %attr (0755, root, bin) %{_sbindir}
%{_sbindir}/avahi-daemon-bridge-dsd
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/libavahi*.so*
%{_libdir}/avahi/service-types.db.pag
%{_libdir}/avahi/service-types.db.dir
%dir %attr (0755, root, sys) %{_datadir}
%{_datadir}/avahi/service-types
%if %option_with_indiana_branding
%else
%dir %attr (0755, root, other) %{_datadir}/applications
%{_datadir}/applications/avahi-discover.desktop
%{_datadir}/applications/bssh.desktop
%{_datadir}/applications/bvnc.desktop
%endif
%{_datadir}/avahi/interfaces/avahi-discover.glade
%{_datadir}/avahi/introspection/Server.introspect
%{_datadir}/avahi/introspection/EntryGroup.introspect
%{_datadir}/avahi/introspection/DomainBrowser.introspect
%{_datadir}/avahi/introspection/ServiceBrowser.introspect
%{_datadir}/avahi/introspection/ServiceTypeBrowser.introspect
%{_datadir}/avahi/introspection/ServiceResolver.introspect
%{_datadir}/avahi/introspection/AddressResolver.introspect
%{_datadir}/avahi/introspection/HostNameResolver.introspect
%{_datadir}/avahi/introspection/RecordBrowser.introspect
%{_datadir}/avahi/avahi-service.dtd
%dir %attr (0755, root, bin) %{_mandir}
%{_mandir}/man1/*
%attr (-, root, bin) %{_libdir}/python*

%files root
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_sysconfdir}
%config %{_sysconfdir}/*
%dir %attr (0755, root, sys) /var
%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/avahi-bridge-dsd.xml
%attr (0555, root, bin) /lib/svc/method/svc-avahi-bridge-dsd

%files devel
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_libdir}
%dir %attr (0755, root, other) %{_libdir}/pkgconfig
%{_libdir}/pkgconfig/*
%dir %attr (0755, root, bin) %{_includedir}
%{_includedir}/*

%if %build_l10n
%files l10n
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%attr (-, root, other) %{_datadir}/locale
%endif

%changelog
* Thu Dec 03 2009 - [email protected]
- Remove postinstall script to enable system/avahi-bridge-dsd on reboot
* Wed Nov 11 2009 - [email protected]
- Change dependency SUNWPython to SUNWPython26
* Mon Oct 05 2009 - [email protected]
- Update python dependencies to 2.6.
* Mon Mar 23 2009 - [email protected]
- Because /usr/bin/avahi-discover (SUNWavahi-bridge-dsd) requires
  /usr/bin/i86/isapython2.4 which is found in SUNWPython, add the dependency.
* Thu Mar 05 2009 - [email protected]
- Change SUNWdbus-bindings to SUNWdbus-python.
* Wed Sep 10 2008 - [email protected]
- Add %doc in %files for copyright
* Wed Aug 06 2008- [email protected]
- add pre and post scripts for enabling the avahi-bridge-dsd svc upon 
  installation but leaving it as is upon upgrade (based on dbus spec file)
* Fri Jun 06 2008 - [email protected]
- Add l10n package.
* Wed Oct 31 2007 - [email protected]
- Add Build/Requires SUNWdbus-bindings/-devel as the dbus python module is used.
* Wed Oct 31 2007 - [email protected]
- Remove references to /usr/lib/mdns from LDFLAGS as the dir doesn't exist.
* Fri Sep 07 2007 - [email protected]
- Add Build/Requires SUNWgnome-base-libs/-devel for glib.
- Add Build/Requires SUNWgnome-python-libs/-devel for gtk Python module.
* Wed Jun 28 2007 - [email protected]
- Initial spec file created.