%define python_platlib %(python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib(1)')
%define mxlibname egenix-mx-base

Summary: eGenix mx-Extensions for Python - BASE package
Summary(ja): eGenix 配布 Python DateTime ライブラリ
Name: python-%{mxlibname}
Version: 3.1.0
Release: 3%{?_dist_release}
License: eGenix.com Public License (similar to the Python 2.0)
Group: Development/Libraries
URL: http://www.egenix.com/files/python/eGenix-mx-Extensions.html
Source: http://www.egenix.com/files/python/%{mxlibname}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{mxlibname}-%{version}-root
Buildrequires: python-devel
Requires: python >= 2.4
Provides: mxDateTime

%description
The eGenix mx Extension Series are a collection of
Python extensions written in ANSI C and Python
which provide a large spectrum of useful additions
to everyday Python programming.

The BASE package includes the Open Source subpackages
of the series and is needed by all other add-on
packages of the series.

This software is brought to you by eGenix.com and
distributed under the eGenix.com Public License.


%prep
%setup -q -n %{mxlibname}-%{version}

#%ifarch x86_64
#%patch0
#cd mx/stdlib/distutils
#%patch0
#%endif


%build
CFLAGS="$RPM_OPT_FLAGS" python setup.py build


%install
rm -rf $RPM_BUILD_ROOT
python setup.py install \
	--root=$RPM_BUILD_ROOT \
	--install-purelib=%{python_platlib} \
	--install-platlib=%{python_platlib} \
	# disabled below, because '*.h' files have been copied to data's directory
	#--install-data=%{_sharedstatedir}/doc/%{name}-%{version}


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root)
%doc mx/Doc mx/LICENSE mx/COPYRIGHT mx/DateTime/README
%{python_platlib}

%changelog
* Tue Feb 02 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.0-3
- rebuild with python-2.6

* Thu Jul 17 2008 Shu KONNO <owa@bg.wakwak.com> 3.1.0-2vl5
- rebuilt with python-2.5.2

* Thu Jul 17 2008 Shu KONNO <owa@bg.wakwak.com> 3.1.0-1vl5
- updated egenix-mx-base to 3.1.0
- applied new versioning policy and spec in utf-8
- added python_platlib macro

* Sat Dec 01 2007 Shu KONNO <owa@bg.wakwak.com> 3.0.0-0vl2
- updated egenix-mx-base to 3.0.0
- dropt Patch0: egenix-mx-base-2.0.6-mxSetup_x86_64.patch
- fixed prereq, buildrequires pkgs

* Wed Sep 19 2007 Shu KONNO <owa@bg.wakwak.com> 2.0.6-0vl4
- fixed %%install directory

* Sat Oct 14 2006 Shu KONNO <owa@bg.wakwak.com> 2.0.6-0vl3
- changed url
- added egenix-mx-base-2.0.6-mxSetup_x86_64.patch
- changed options in %%install

* Sun Apr 03 2005 Shu KONNO <owa@bg.wakwak.com> 2.0.6-0vl2
- rebuilded with python-2.4.1

* Sun Mar 20 2005 Shu KONNO <owa@bg.wakwak.com> 2.0.6-0vl1
- updated egenix-mx-base to 2.0.6
- rebuild with python-2.3.5 for Vine

* Sun Feb 22 2004 Shu KONNO <owa@bg.wakwak.com> 2.0.5-uvl1
- rebuilded with python-2.3

* Sun Aug 31 2003 Shu KONNO <owa@bg.wakwak.com> 2.0.5-py2.1_uvl1
- updated egenix-mx-base to 2.0.5

* Wed Mar 5 2003 Shu KONNO <owa@bg.wakwak.com> 2.0.4-py2.1_0vp1
- updated egenix-mx-base to 2.0.4
- rebuilded with python-2.1

* Mon Jul 1 2002 Shu KONNO <owa@bg.wakwak.com> 2.0.3-0vp1
- created