2005-09-20 Laszlo Peter <
[email protected]>
* SUNWPython.spec: move python 2.4.1 to /usr and keep python 2.3
in /usr/sfw for backcompat
* SUNWlxml.spec: define SUNWlxml-python
* SUNWlxsl.spec: define SUNWlxsl-python
#
# spec file for package SUNWPython
#
# includes module(s): Python
#
# Copyright (c) 2004 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
%include Solaris.inc
%define p23_version 2.3.3
%define p23_subdir sfw
%define p23_prefix %{_basedir}/%{p23_subdir}
%define p23_bindir %{p23_prefix}/bin
%define p23_libdir %{p23_prefix}/lib
%define p23_includedir %{p23_prefix}/include
%define p23_sysconfdir /etc
%define p23_datadir %{p23_prefix}/share
%define p23_mandir %{p23_datadir}/man
Name: SUNWPython
Summary: The Python interpreter, libraries and utilities
Version: 2.4.1
SUNW_BaseDir: %{_basedir}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.bz2
Source1: http://www.python.org/ftp/python/%{p23_version}/Python-%{p23_version}.tar.bz2
Source2: l10n-configure.sh
%include default-depend.inc
BuildRequires: SUNWTk
BuildRequires: SUNWTcl
BuildRequires: SUNWlexpt
BuildRequires: SUNWsfwhea
Requires: SUNWPython-share
Requires: SUNWlibms
Requires: SUNWopenssl-libraries
Requires: SUNWTk
Requires: SUNWTcl
Requires: SUNWlexpt
Requires: SUNWxwrtl
Requires: SUNWxwplt
Requires: SUNWbzip
%package share
Summary: The Python interperer, libraries and utilities - platform independent files, /usr/sfw/share
SUNW_BaseDir: %{_basedir}
%include default-depend.inc
%package devel
Summary: The Python interpreter, libraries and utilities - develper files - platform dependent, /usr filesystem
%include default-depend.inc
Requires: SUNWPython
%prep
%setup -q -c -n %name-%version
%setup -q -D -T -b 1 -c -n %name-%version
%build
cd Python-%{p23_version}
CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
if test "x$CPUS" = "x" -o $CPUS = 0; then
CPUS=1
fi
export CXXFLAGS="%cxx_optflags"
%if %cc_is_gcc
export CFLAGS="%optflags"
%else
# -xregs=no%%frameptr breaks the build of Python 2.4.1
export CFLAGS=`echo '%optflags' | sed -e 's/-xregs=no%%frameptr//'`
export CFLAGS="$CFLAGS -DANSICPP -D__STDC_VERSION__=199409L"
%endif
export BASECFLAGS=$CFLAGS
export RPM_OPT_FLAGS="$CFLAGS"
export LD_RUN_PATH="/usr/sfw/lib"
export CPP="$CC -E $CFLAGS"
./configure --prefix=%{p23_prefix} \
--libdir=%{p23_libdir} \
--mandir=%{p23_mandir} \
--datadir=%{p23_datadir} \
--infodir=%{p23_datadir}/info
make -j$CPUS
cd ../Python-%{version}
./configure --prefix=%{_prefix} \
--libdir=%{_libdir} \
--mandir=%{_mandir} \
--datadir=%{_datadir} \
--infodir=%{_datadir}/info
%if %cc_is_gcc
perl -pi -e "s/^#define _POSIX_C_SOURCE/\/\//" pyconfig.h
perl -pi -e "s/^#define _XOPEN_SOURCE/\/\//" pyconfig.h
perl -pi -e "s/^#define _XOPEN_SOURCE_EXTENDED/\/\//" pyconfig.h
%endif
make -j$CPUS
%install
[ "$RPM_BUILD_ROOT" != "" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT
cd Python-%{p23_version}
make install DESTDIR=$RPM_BUILD_ROOT
cd ../Python-%{version}
make install DESTDIR=$RPM_BUILD_ROOT
cd $RPM_BUILD_ROOT%{_bindir} && rm python && ln -s python2.4 python
rm -rf $RPM_BUILD_ROOT%{_libdir}/python2.4/bsddb
cd $RPM_BUILD_ROOT%{p23_bindir} && rm python && ln -s ../../bin/python2.4 python
rm -rf $RPM_BUILD_ROOT%{p23_libdir}/python2.3/bsddb
%{?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, other)
%dir %attr (0755, root, bin) %{p23_prefix}
%dir %attr (0755, root, bin) %{p23_bindir}
%{p23_bindir}/*
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/*
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/*
%dir %attr (0755, root, bin) %{p23_libdir}
%{p23_libdir}/*
%files share
%defattr (-, root, other)
%dir %attr (0755, root, bin) %{p23_prefix}
%dir %attr(0755, root, sys) %{_datadir}
%dir %attr(0755, root, bin) %{p23_datadir}
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/*
%{_mandir}/*/*
%dir %attr(0755, root, bin) %{p23_mandir}
%dir %attr(0755, root, bin) %{p23_mandir}/*
%{p23_mandir}/*/*
%files devel
%defattr (-, root, other)
%dir %attr (0755, root, bin) %{p23_prefix}
%dir %attr (0755, root, bin) %{_includedir}
%{_includedir}/*
%dir %attr (0755, root, bin) %{p23_includedir}
%{p23_includedir}/*
%changelog
* Tue Sep 20 2005 - [email protected]
- move python 2.4.1 to /usr and keep python 2.3 in /usr/sfw for backcompat
- omit -xregs=no%frameptr as it breaks the build
* Fri Aug 26 2005 - [email protected]
- update to 2.4.1
* Tue Aug 02 2005 - [email protected]
- added SUNWsfwhea build dependency needed for expat headers
* Tue Aug 02 2005 - [email protected]
- Add SUNWlexpt dependency as the Expat library is required for building.
* Fri Jul 29 2005 - [email protected]
- Add missing runtime dependencies, fixes 6208617.
* Sun Nov 14 2004 - [email protected]
- add /usr/sfw/lib to RPATH
* Fri Oct 22 2004 - [email protected]
- remove bsddb bits (won't work without bsd db itself), fixes 6176600
* Sat Oct 02 2004 - [email protected]
- added %pkgbuild_postprocess
* Sat Sep 18 2004 - [email protected]
- move to /usr/sfw
* Tue Jun 22 2004 - [email protected]
- changed install location to /usr/lib and /usr/bin
* Fri Mar 05 2005 - [email protected]
- remove package root def'n
* Thu Mar 04 2004 - [email protected]
- initial version added to CVS