Home | History | Annotate | Download | only in trunk
      1 #
      2 # spec file for package SUNWdbus-bindings
      3 #
      4 # includes module(s): dbus_glib, dbus_python
      5 #
      6 # Copyright 2008 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 # bugdb: bugzilla.freedesktop.org
     12 #
     13 %include Solaris.inc
     14 
     15 %ifarch amd64 sparcv9
     16 %include arch64.inc
     17 %use dbus_glib_64   = dbus-glib.spec
     18 %define _libdir %{_basedir}/lib
     19 %use dbus_python_64 = dbus-python.spec
     20 %endif
     21 
     22 %include base.inc
     23 %use dbus_glib   = dbus-glib.spec
     24 %use dbus_python = dbus-python.spec
     25 
     26 Name:                    SUNWdbus-bindings
     27 Summary:                 Simple IPC library based on messages
     28 Version:                 %{default_pkg_version}
     29 Source:                  %{name}-manpages-0.1.tar.gz
     30 SUNW_BaseDir:            %{_basedir}
     31 SUNW_Copyright:          %{name}.copyright
     32 BuildRoot:               %{_tmppath}/%{name}-%{version}-build
     33 %include default-depend.inc
     34 Requires:	SUNWdbus
     35 Requires:	SUNWgnome-base-libs
     36 Requires:	SUNWlxml
     37 Requires:       SUNWlexpt
     38 Requires:       SUNWPython-extra
     39 BuildRequires:	SUNWdbus-devel
     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 %prep
     52 rm -rf %name-%version
     53 mkdir %name-%version
     54 
     55 %ifarch amd64 sparcv9
     56 mkdir %name-%version/%_arch64
     57 %dbus_glib_64.prep -d %name-%version/%_arch64
     58 %dbus_python_64.prep -d %name-%version/%_arch64
     59 %endif
     60 
     61 mkdir %name-%version/%{base_arch}
     62 %dbus_glib.prep -d %name-%version/%{base_arch}
     63 %dbus_python.prep -d %name-%version/%{base_arch}
     64 
     65 cd %{_builddir}/%name-%version
     66 gzcat %SOURCE0 | tar xf -
     67 
     68 %build
     69 PKG_CONFIG_DISABLE_UNINSTALLED=
     70 unset PKG_CONFIG_DISABLE_UNINSTALLED
     71 %if %cc_is_gcc
     72 export EXTRA_CFLAGS="-I/usr/sfw/include"
     73 %else
     74 export EXTRA_CFLAGS="-xc99 -D_REENTRANT -I/usr/sfw/include -D__EXTENSIONS__"
     75 %endif
     76 # Put /usr/ccs/lib first in the PATH so that cpp is picked up from there
     77 # note: I didn't put /usr/lib in the PATH because there's too much other
     78 # stuff in there
     79 #
     80 export PATH=/usr/ccs/lib:$PATH
     81 
     82 %ifarch amd64 sparcv9
     83 export PYTHON=%{_bindir}/%{_arch64}/python
     84 export EXTRA_LDFLAGS="-L/usr/sfw/lib/%{_arch64} -R/usr/sfw/lib/%{_arch64} -lexpat"
     85 export PKG_CONFIG_PATH=../dbus-glib-%{dbus_glib.version}:/usr/lib/%{_arch64}/pkgconfig
     86 %dbus_glib_64.build -d %name-%version/%_arch64
     87 %dbus_python_64.build -d %name-%version/%_arch64
     88 %endif
     89 
     90 export PKG_CONFIG_PATH=../dbus-glib-%{dbus_glib.version}
     91 export EXTRA_LDFLAGS="-L/usr/sfw/lib -R/usr/sfw/lib -lexpat"
     92 export PYTHON=%{_bindir}/python
     93 %dbus_glib.build -d %name-%version/%{base_arch}
     94 %dbus_python.build -d %name-%version/%{base_arch}
     95 
     96 %install
     97 rm -rf $RPM_BUILD_ROOT
     98 %ifarch amd64 sparcv9
     99 %dbus_glib_64.install -d %name-%version/%_arch64
    100 %dbus_python_64.install -d %name-%version/%_arch64
    101 %endif
    102 
    103 %dbus_glib.install -d %name-%version/%{base_arch}
    104 %dbus_python.install -d %name-%version/%{base_arch}
    105 
    106 rm -rf $RPM_BUILD_ROOT%{_mandir}
    107 cd %{_builddir}/%name-%version/sun-manpages
    108 make install DESTDIR=$RPM_BUILD_ROOT
    109 
    110 %{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}
    111 
    112 %clean
    113 rm -rf $RPM_BUILD_ROOT
    114 
    115 %if %(test -f /usr/sadm/install/scripts/i.manifest && echo 0 || echo 1)
    116 %iclass manifest -f i.manifest
    117 %endif
    118 
    119 %files
    120 %defattr (-, root, bin)
    121 %dir %attr (0755, root, bin) %{_bindir}
    122 %{_bindir}/*
    123 %dir %attr (0755, root, bin) %{_libdir}
    124 %{_libdir}/lib*.so*
    125 %{_libdir}/python*
    126 %dir %attr (0755, root, sys) %{_datadir}
    127 %{_datadir}/dbus-1
    128 %dir %attr(0755, root, bin) %{_mandir}
    129 %dir %attr(0755, root, bin) %{_mandir}/man3
    130 %{_mandir}/man3/*
    131 %ifarch amd64 sparcv9
    132 %dir %attr (0755, root, bin) %{_libdir}/%{_arch64}
    133 %{_libdir}/%{_arch64}/lib*.so*
    134 %endif
    135 
    136 %files devel
    137 %defattr (-, root, bin)
    138 %dir %attr (0755, root, bin) %{_libdir}
    139 %dir %attr (0755, root, other) %{_libdir}/pkgconfig
    140 %{_libdir}/pkgconfig/*
    141 %dir %attr (0755, root, bin) %{_includedir}
    142 %{_includedir}/*
    143 %dir %attr (0755, root, sys) %{_datadir}
    144 %dir %attr (0755, root, other) %{_datadir}/doc
    145 %{_datadir}/doc/*
    146 %{_datadir}/gtk-doc
    147 %ifarch amd64 sparcv9
    148 %dir %attr (0755, root, bin) %{_libdir}/%{_arch64}
    149 %dir %attr (0755, root, other) %{_libdir}/%{_arch64}/pkgconfig
    150 %{_libdir}/%{_arch64}/pkgconfig/*.pc
    151 %endif
    152 
    153 %changelog
    154 * Thu Mar 27 2008 - brian.cameron@sun.com
    155 - Add SUNW_Copyright
    156 * Tue Nov 20 2007 - brian.cameron@sun.com
    157 - Add libdbus-glib-1.3 manpage.
    158 * Fri Sep 28 2007 - laca@sun.com
    159 - convert to new style multi-ISA build
    160 - delete SUNWxwrtl dep
    161 * Sat Feb 25 2007 - dougs@truemail.co.th
    162 - updated to include 64-bit build RFE: #6480511
    163 * Fri Jan 26 2007 - damien.carbery@sun.com
    164 - Set PKG_CONFIG vars in %build because dbus-python use autofoo/configure/make
    165   process rather than setup.py.
    166 * Thu Jan 25 2007 - damien.carbery@sun.com
    167 - Add %{_datadir}/doc to devel pkg, because of new dbus-python tarball.
    168 * Thu Dec 21 2006 - brian.cameron@sun.com
    169 - Remove references to SUNWdbus-bindings-root since we do not
    170   build this package.
    171 * Thu Sep 21 2006 - brian.cameron@sun.com
    172 - Created.
    173 
    174