1 # 2 # spec file for package SUNWmysql-python 3 # 4 # Copyright 2008 Sun Microsystems, Inc. 5 # This file and all modifications and additions to the pristine 6 # package are under the same license as the package itself. 7 # 8 %define owner liyuan 9 # 10 11 %include Solaris.inc 12 13 %define OSR 8096:1.2.2 14 15 Name: SUNWmysql-python26 16 Summary: A MySQL database adapter for the Python programming language 17 URL: http://sourceforge.net/projects/mysql-python 18 Version: 1.2.2 19 Source: %{sf_download}/mysql-python/MySQL-python-%{version}.tar.gz 20 SUNW_BaseDir: %{_basedir} 21 SUNW_Copyright: %{name}.copyright 22 BuildRoot: %{_tmppath}/%{name}-%{version}-build 23 24 %include default-depend.inc 25 BuildRequires: SUNWPython26-devel 26 BuildRequires: SUNWpython26-setuptools 27 Requires: SUNWPython26 28 Requires: SUNWmysql51u 29 Requires: SUNWmysql51lib 30 31 %define python_version 2.6 32 33 %prep 34 %setup -q -n MySQL-python-%{version} 35 36 %build 37 PATH=/usr/mysql/bin:${PATH};export PATH #For correct mysql_config 38 export LDFLAGS="-L/usr/mysql/lib/mysql -R/usr/mysql/lib/mysql" 39 python%{python_version} setup.py build 40 41 %install 42 rm -rf $RPM_BUILD_ROOT 43 python%{python_version} setup.py install --root=$RPM_BUILD_ROOT --prefix=%{_prefix} --no-compile 44 45 # move to vendor-packages 46 mkdir -p $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/vendor-packages 47 mv $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/site-packages/* \ 48 $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/vendor-packages/ 49 rmdir $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/site-packages 50 51 %{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT} 52 53 %clean 54 rm -rf $RPM_BUILD_ROOT 55 56 %files 57 %defattr (-, root, bin) 58 %dir %attr (0755, root, bin) %{_libdir} 59 %{_libdir}/python%{python_version}/vendor-packages/ 60 %doc PKG-INFO 61 %doc(bzip2) GPL ChangeLog HISTORY README 62 %dir %attr (0755, root, sys) %{_datadir} 63 %dir %attr (0755, root, other) %{_datadir}/doc 64 65 %changelog 66 * Mon Nov 16 2009 - li.yuan@sun.com 67 - Change owner to liyuan. 68 * Mon Oct 05 2009 - darren.kenny@sun.com 69 - Create python2.6 bindings based on 2.4 version. 70 * Tue June 02 2009 - dave.lin@sun.com 71 - Add 'Requires: SUNWmysql51lib' to fix CR6846734. 72 * Tue Apr 21 2009 - dave.lin@sun.com 73 - Move the dependency from SUNWmysql5u to SUNWmysql51u 74 * Tue Sep 16 2008 - matt.keenn@sun.com 75 - Update copyright 76 * Tue Feb 19 2008 - darren.kenny@sun.com 77 - Rename spec-file to match ARC-ed package name (and community name) of 78 mysql-python. Also ensure that it's looking at the /usr/mysql SUNWmysql5u 79 packages rather than the sfw version. 80 * Tue Feb 12 2008 - dermot.mccluskey (at] sun.com 81 - initial version 82