%global pkgname Django-Select2 Name: python-django-select2 Version: 3.1.4 Release: 1%{?dist} Summary: Select2 option fields for Django Group: Development/Languages License: BSD URL: https://github.com/applegrew/django-select2 Source0: http://pypi.python.org/packages/source/D/%{pkgname}/%{pkgname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools %if 0%{?fedora} >= 18 Requires: python-django BuildRequires: python-django %else Requires: Django BuildRequires: Django %endif %description Django includes basic select widget, which just generates tags. Although their ‘looks’ can be improved using basic CSS, but we hit a usability problem when there are too many options to select from. This is where Django-Select2 comes into picture. %prep %setup -q -n %{pkgname}-%{version} # Remove bundled egg-info rm -rf Django_Select2.egg-info # Remove calls to nonexistent files in the template MANIFEST.in sed -i -e '3d' -i -e '5,7d' MANIFEST.in %build python setup.py build %install python setup.py install --skip-build --root %{buildroot} for file in `find %{buildroot}/%{python_sitelib}/django_select2 -type f -perm /a+x ! -name '*.py'`; do chmod -vR a-x $file done %files %doc README PKG-INFO LICENSE.txt %{python_sitelib}/django_select2 %{python_sitelib}/Django_Select2-*.egg-info %changelog * Wed Nov 28 2012 Eduardo Echeverria - 3.1.4-1 - Initial packaging