| 1 | # sitelib for noarch packages, sitearch for others (remove the unneeded one) |
|---|
| 2 | %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} |
|---|
| 3 | %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} |
|---|
| 4 | |
|---|
| 5 | Name: python-chardet |
|---|
| 6 | Version: 2.0.1 |
|---|
| 7 | Release: 4%{?_dist_release} |
|---|
| 8 | Summary: Character encoding auto-detection in Python |
|---|
| 9 | Summary(ja): Python で文字エンコーディングを自動検出 |
|---|
| 10 | |
|---|
| 11 | Group: Development/Languages |
|---|
| 12 | License: LGPLv2 |
|---|
| 13 | URL: http://chardet.feedparser.org |
|---|
| 14 | Source0: http://chardet.feedparser.org/download/python2-chardet-%{version}.tgz |
|---|
| 15 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
|---|
| 16 | |
|---|
| 17 | BuildArch: noarch |
|---|
| 18 | BuildRequires: python-devel, python-setuptools |
|---|
| 19 | |
|---|
| 20 | %description |
|---|
| 21 | Character encoding auto-detection in Python. As |
|---|
| 22 | smart as your browser. Open source. |
|---|
| 23 | |
|---|
| 24 | %prep |
|---|
| 25 | %setup -q -n python2-chardet-%{version} |
|---|
| 26 | |
|---|
| 27 | |
|---|
| 28 | |
|---|
| 29 | %build |
|---|
| 30 | # Remove CFLAGS=... for noarch packages (unneeded) |
|---|
| 31 | %{__python} setup.py build |
|---|
| 32 | |
|---|
| 33 | |
|---|
| 34 | %install |
|---|
| 35 | rm -rf $RPM_BUILD_ROOT |
|---|
| 36 | %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT |
|---|
| 37 | chmod -x COPYING |
|---|
| 38 | |
|---|
| 39 | %clean |
|---|
| 40 | rm -rf $RPM_BUILD_ROOT |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | %files |
|---|
| 44 | %defattr(-,root,root,-) |
|---|
| 45 | %doc COPYING |
|---|
| 46 | # For noarch packages: sitelib |
|---|
| 47 | %{python_sitelib}/* |
|---|
| 48 | |
|---|
| 49 | |
|---|
| 50 | %changelog |
|---|
| 51 | * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.0.1-4 |
|---|
| 52 | - rebuild with python-2.7.2 |
|---|
| 53 | |
|---|
| 54 | * Wed Sep 29 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> 2.0.1-3 |
|---|
| 55 | - rebuilt with rpm-4.8.1 for pkg-config |
|---|
| 56 | |
|---|
| 57 | * Sat Feb 6 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> 2.0.1-2 |
|---|
| 58 | - rebuilt with python-2.6.4 |
|---|
| 59 | |
|---|
| 60 | * Mon Nov 23 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> 2.0.1-1 |
|---|
| 61 | - new upstream release |
|---|
| 62 | - fixed Japanese summary |
|---|
| 63 | |
|---|
| 64 | * Mon Sep 21 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.0.1-1 |
|---|
| 65 | - initial build for VineSeed |
|---|
| 66 | |
|---|
| 67 | * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-2 |
|---|
| 68 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild |
|---|
| 69 | |
|---|
| 70 | * Mon Aug 04 2008 Kushal Das <kushal@fedoraproject.org> 1.0.1-1 |
|---|
| 71 | - Initial release |
|---|
| 72 | |
|---|