%{!?python2_sitelib: %global python2_sitelib %{python_sitelib}} %global pypi_name django-haystack Name: python-%{pypi_name} Version: 2.4.1 Release: 12%{?dist} Summary: Pluggable search for Django. License: BSD URL: http://haystacksearch.org/ Source0: https://pypi.python.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch %if 0%{?rhel} <= 7 BuildRequires: python-devel BuildRequires: python-sphinx BuildRequires: python-setuptools %else #fedora BuildRequires: python2-devel BuildRequires: python2-sphinx BuildRequires: python2-setuptools %endif BuildRequires: python2-django %description Haystack provides modular search for Django. It features a unified, familiar API that allows you to plug in different search backends (such as Solr, Elasticsearch, Whoosh, Xapian, etc.) without having to modify your code. Haystack is BSD licensed, plays nicely with third-party app without needing to modify the source and supports advanced features like faceting, More Like This, highlighting, spatial search and spelling suggestions. You can find more information at http://haystacksearch.org/. %package -n python2-%{pypi_name} Summary: %{summary} Requires: python2-django Provides: python2-%{pypi_name}(abi) = 2.4 %description -n python2-%{pypi_name} %{description} %package docs Summary: Documentation for Django Haystack pluggable search # Not requiring the main package, as users may wish to install # the documentation separately. %description docs Documentation for Django Haystack pluggable search Haystack provides modular search for Django. It features a unified, familiar API that allows you to plug in different search backends (such as Solr, Elasticsearch, Whoosh, Xapian, etc.) without having to modify your code. Haystack is BSD licensed, plays nicely with third-party app without needing to modify the source and supports advanced features like faceting, More Like This, highlighting, spatial search and spelling suggestions. You can find more information at http://haystacksearch.org/. %prep %setup -q -n %{pypi_name}-%{version} rm -rf django_haystack.egg-info %build %{__python} setup.py build # Re-generate documentation # Docs cannot be built in parallel # We cannot build 'linkcheck' because it requires network access pushd docs make clean html htmlhelp latex json pickle changes popd %install %{__python} setup.py install -O1 --skip-build --root %{buildroot} # Remove several useless files from the sources find . -name ".gitignore" -exec rm -f {} \; find . -name ".buildinfo" -exec rm -f {} \; find . -name ".DS_Store" -exec rm -f {} \; find . -name "last_build" -exec rm -f {} \; %files -n python2-%{pypi_name} %doc PKG-INFO README.rst AUTHORS %license LICENSE # For noarch packages: sitelib %{python2_sitelib}/haystack %{python2_sitelib}/django_haystack-%{version}*.egg-info/ %files docs %doc docs/ %changelog * Thu Jan 18 2018 Stephen Gallagher - 2.4.1-12 - Update sitelib macro for Fedora 28 * Mon Jan 15 2018 Stephen Gallagher - 2.4.1-10 - Prepare for modules * Wed Oct 11 2017 Stephen Gallagher - 2.4.1-1 - Update to 2.4.1 * Tue Jun 16 2015 Stephen Gallagher 2.3.1-1 - Update to 2.3.1 * Sat Jun 07 2014 Fedora Release Engineering - 2.1.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Thu Feb 27 2014 Stephen Gallagher 2.1.0-4 - Build -docs subpackage - Remove hidden files and cruft from other OSes - Force rebuild of documentation * Fri Jan 24 2014 Stephen Gallagher 2.1.0-3 - Remove extra BuildRequires: python-django * Thu Jan 23 2014 Stephen Gallagher - 2.1.0-2 - Correct %%description * Thu Jan 23 2014 Stephen Gallagher - 2.1.0-1 - Initial release