SUNWgnome-python26-libs.spec
author liyuan
Thu, 26 Mar 2009 07:17:54 +0000
changeset 15503 122c52d1fd43
parent 15038 57b35073a2c1
child 15650 dbcf7e3715dd
permissions -rw-r--r--
2009-03-26 Li Yuan <[email protected]> * SUNWgnome-a11y-libs.spec: * SUNWgnome-python-libs.spec: * SUNWgnome-python26-libs.spec: * base-specs/pyspi.spec: Move pyspi from SUNWgnome-python-libs to SUNWgnome-a11y-libs.

#
# spec file for package SUNWgnome-python26-libs
#
# includes module(s): pyorbit gnome-python pygtk2
#
# Copyright 2009 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Owner: laca
#
%include Solaris.inc
%define pythonver 2.6
%define python_version %{pythonver}

%use pyorbit = pyorbit.spec
%use pycairo = pycairo.spec
%use gnome_python = gnome-python.spec
%use pygobject = pygobject.spec
%use pygtk2 = pygtk2.spec
%use pygtksourceview = pygtksourceview.spec

Name:              SUNWgnome-python26-libs
Summary:           Python 2.6 support libraries for GNOME
Version:           %{default_pkg_version}
SUNW_BaseDir:      %{_basedir}
SUNW_Copyright:    SUNWgnome-python-libs.copyright
BuildRoot:         %{_tmppath}/%{name}-%{version}-build

%include default-depend.inc
Requires: SUNWgnome-component
Requires: SUNWgnome-file-mgr
Requires: SUNWgnome-print
Requires: SUNWgnome-libs
Requires: SUNWPython26-extra
Requires: SUNWgnome-config
Requires: SUNWPython26
Requires: SUNWgnome-base-libs
Requires: SUNWgnome-vfs
Requires: SUNWlibms
Requires: SUNWlibpopt
Requires: SUNWmlib
Requires: SUNWgnome-gtksourceview
BuildRequires: SUNWPython26-devel
BuildRequires: SUNWgnome-config-devel
BuildRequires: SUNWgnome-vfs-devel
BuildRequires: SUNWlibpopt-devel
BuildRequires: SUNWgnome-libs-devel
BuildRequires: SUNWgnome-base-libs-devel
BuildRequires: SUNWgnome-file-mgr-devel
BuildRequires: SUNWgnome-print-devel
BuildRequires: SUNWPython26-extra
BuildRequires: SUNWgnome-component-devel
BuildRequires: SUNWgnome-config-devel
BuildRequires: SUNWgnome-gtksourceview-devel
BuildRequires: SUNWpython26-setuptools

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

%prep
rm -rf %name-%version
mkdir %name-%version
%pygobject.prep -d %name-%version
%pycairo.prep -d %name-%version
%pygtk2.prep -d %name-%version
%pyorbit.prep -d %name-%version
%gnome_python.prep -d %name-%version
%pygtksourceview.prep -d %name-%version

%build
PKG_CONFIG_DISABLE_UNINSTALLED=
unset PKG_CONFIG_DISABLE_UNINSTALLED

export PKG_CONFIG_PATH=../pyorbit-%{pyorbit.version}:../pygtk-%{pygtk2.version}:%{_pkg_config_path}:../pygobject-%{pygobject.version}:../pycairo-%{pycairo.version}
export PYTHON="/usr/bin/python2.6"
export CPPFLAGS="-I/usr/xpg4/include -I/usr/include/python%{pythonver}"
export CFLAGS="%optflags -I/usr/xpg4/include -I%{_includedir} -I/usr/include/python%{pythonver} -I%{_builddir}/%name-%version/pyorbit-%pyorbit.version/src -I%{_builddir}/%name-%version/pycairo-%pycairo.version/cairo"
export RPM_OPT_FLAGS="$CFLAGS"
export LDFLAGS="%_ldflags"
export PYCC_CC="$CC"
export PYCC_CXX="$CXX"

%pygobject.build -d %name-%version
%pycairo.build -d %name-%version
%pygtk2.build -d %name-%version
cd %name-%version/pygtk-%{pygtk2.version}
ln -s gtk/*.defs .
ln -s gtk pygtk
cd ../..
%pyorbit.build -d %name-%version
echo 'PYTHONPATH=%{_builddir}/%name-%version/pygobject-%{pygobject.version}/codegen:$PYTHONPATH /usr/bin/python %{_builddir}/%name-%version/pygobject-%{pygobject.version}/codegen/codegen.py "$@"' > %{_builddir}/%name-%version/pygtk-codegen-2.0
chmod a+x %{_builddir}/%name-%version/pygtk-codegen-2.0
export PATH=%{_builddir}/%name-%version:$PATH
%gnome_python.build -d %name-%version
export CFLAGS="`echo %optflags | sed -e 's/-xregs=no.frameptr//'`"
%pygtksourceview.build -d %name-%version

%install
rm -rf $RPM_BUILD_ROOT
%pygobject.install -d %name-%version
%pycairo.install -d %name-%version
%pygtk2.install -d %name-%version
%pyorbit.install -d %name-%version
%gnome_python.install -d %name-%version
%pygtksourceview.install -d %name-%version

# move to vendor-packages
if [ -x $RPM_BUILD_ROOT%{_libdir}/python%{pythonver}/site-packages ]; then
mkdir -p $RPM_BUILD_ROOT%{_libdir}/python%{pythonver}/vendor-packages
mv $RPM_BUILD_ROOT%{_libdir}/python%{pythonver}/site-packages/* \
   $RPM_BUILD_ROOT%{_libdir}/python%{pythonver}/vendor-packages/
rmdir $RPM_BUILD_ROOT%{_libdir}/python%{pythonver}/site-packages
fi

# avoid conflict with 2.4:
mv $RPM_BUILD_ROOT%{_libdir}/gnome-vfs-2.0/modules/libpythonmethod.so \
   $RPM_BUILD_ROOT%{_libdir}/gnome-vfs-2.0/modules/libpythonmethod-2.6.so

# Move demo to demo directory.
#
install -d $RPM_BUILD_ROOT%{_prefix}/demo/jds/bin
mv $RPM_BUILD_ROOT%{_bindir}/pygtk-demo $RPM_BUILD_ROOT%{_prefix}/demo/jds/bin/pygtk-demo-2.6

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

%files
%defattr(-, root, bin)
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/python?.?/vendor-packages
%{_libdir}/gnome-vfs-2.0/modules/libpythonmethod-2.6.so
%{_libdir}/libpyglib-2.0.so*
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/*

%files devel
%defattr(-, root, bin)
%dir %attr (0755, root, bin) %{_includedir}
%{_includedir}/*
%dir %attr (0755, root, bin) %{_libdir}
%dir %attr (0755, root, other) %{_libdir}/pkgconfig
%{_libdir}/pkgconfig/*
%{_libdir}/pygtk
%dir %attr (0755, root, sys) %{_datadir}
%{_datadir}/*
%dir %attr (0755, root, bin) %dir %{_prefix}/demo
%dir %attr (0755, root, bin) %dir %{_prefix}/demo/jds
%dir %attr (0755, root, bin) %dir %{_prefix}/demo/jds/bin
%{_prefix}/demo/jds/bin/pygtk-demo-2.6

%changelog
* Wed Mar 25 2009 - [email protected]
- Move pyspi from SUNWgnome-python-libs to SUNWgnome-a11y-libs.
* Mon Feb  2 2009 - [email protected]
- created, based on SUNWgnome-python25-libs.spec
* Tue Nov 25 2008 - [email protected]
- get rid of SUNWgnome-python-libs-common because there are no files
  that we can share between 2.4 and 2.5.
* Mon Nov 24 2008 - [email protected]
- created, based on SUNWPython-extra.spec
* Wed Sep 17 2008 - [email protected]
- set PYTHON to python2.4 (instead of just python) to make sure the
  right version is used for the build
* Tue Aug 12 2008 - [email protected]
- Add %{_libdir}/libpyglib-2.0.so* to %files.
* Mon Aug 11 2008 - [email protected]
- Move site-packages to vendor-packages here because pygobject 2.15.2 borked
  when vendor-packages was specified by pyexecdir and pythondir in make
  install.
* Tue Oct 16 2007 - [email protected]
- Remove unnecessary environment variable settings.
* Mon Oct  8 2007 - [email protected]
- Add SUNWgnome-gtksourceview dependency as it is required to by
  pygtksourceview.
* Sun Oct  7 2007 - [email protected]
- Add pygtksourceview as it is required to build python bindings in gedit.
* Fri Sep 28 2007 - [email protected]
- delete some unnecessary env vars
* Fri Aug 31 2007 - [email protected]
- Remove pygtksourceview.spec. It is still not building and isn't required.
* Thu Jul 05 2007 - [email protected]
- Add pygtksourceview.spec, but disable it because it is not building yet.
* Tue Jan  9 2007 - [email protected]
- define PYCC_CC and PYCC_CXX to override what the configure script sets
  in CC/CXX
* Mon Aug 28 2006 - [email protected]
- Fix typo in PKG_CONFIG_PATH data (s/=/-/).
* Sun Jun 11 2006 - [email protected]
- change group from other to bin/sys
* Fri May 12 2006 - [email protected]
- Small update to dependency list after check-deps.pl run.
* Thu May 11 2006 - [email protected]
- Move pygtk-demo to demo directory.
* Wed Apr  5 2006 - [email protected]
- Add pygobject. It has been moved from pygtk2.
* Mon Feb 20 2006 - [email protected]
- Complete update of Build/Requires after running check-deps.pl script.
* Fri Feb 17 2006 - [email protected]
- Update Build/Requires after running check-deps.pl script.
* Mon Jan 09 2006 - [email protected]
- Add gnome-vfs module.
* Thu Oct 27 2005 - [email protected]
- add pygtk2
* Tue Sep 20 2005 - [email protected]
- move to /usr as Python was also moved there
* Thu Sep 01 2005 - [email protected]
- Remove unused pygtk2 references.
* Wed Aug 30 2005 - [email protected]
- Add Build/Requires for SUNWgnome-file-mgr (nautilus) and SUNWgnome-print
  (libgnomeprint/libgnomeprintui) so that those submodules will be built.
* Mon Aug 29 2005 - [email protected]
- Adjusted to put files under /usr/sfw
* Thu Aug 25 2005 - [email protected]
- Removed the 'export CC="/opt/SUNWspro/bin/cc"' line. No longer needed.
* Mon Aug 22 2005 - [email protected]
- Adjustments needed to make the package proto maps equivalent to what gets
  installed via "make install"
* Thu Aug 11 2005 - [email protected]
- initial version