346ba33
%if 0%{?fedora}
346ba33
%global with_python3 1
346ba33
%endif
346ba33
f7c154c
%global pypi_name XStatic-JQuery.quicksearch
346ba33
%global pkgname XStatic-JQuery-quicksearch
f7c154c
346ba33
Name:           python-%{pkgname}
f7c154c
Version:        2.0.3.1
78a727b
Release:        10%{?dist}
346ba33
Summary:        JQuery.quicksearch (XStatic packaging standard)
f7c154c
f7c154c
License:        MIT
f7c154c
URL:            http://plugins.jquery.com/jquery.quicksearch/
346ba33
Source0:        https://files.pythonhosted.org/packages/source/X/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
f7c154c
BuildArch:      noarch
346ba33
346ba33
%description
346ba33
JavaScript library packaged for setuptools (easy_install) / pip.
346ba33
346ba33
This package is intended to be used by any project that needs these files.
346ba33
346ba33
It intentionally does not provide any extra code except some metadata
346ba33
nor has any extra requirements.
346ba33
346ba33
%package -n python2-%{pkgname}
346ba33
Summary:        %{summary}
346ba33
f7c154c
BuildRequires:  python2-devel
346ba33
BuildRequires:  python2-setuptools
f7c154c
346ba33
Requires:       python2-XStatic
346ba33
Requires:       xstatic-jquery-quicksearch-common
f7c154c
346ba33
%{?python_provide:%python_provide python2-%{pkgname}}
f7c154c
346ba33
%description -n python2-%{pkgname}
346ba33
JavaScript library packaged for setuptools (easy_install) / pip.
f7c154c
346ba33
This package is intended to be used by any project that needs these files.
f7c154c
346ba33
It intentionally does not provide any extra code except some metadata
346ba33
nor has any extra requirements.
f7c154c
346ba33
This package provides Python 2 build of %{pkgname}.
f7c154c
346ba33
%if 0%{?with_python3}
346ba33
%package -n python3-%{pkgname}
346ba33
Summary:        %{summary}
f7c154c
346ba33
BuildRequires:  python3-devel
346ba33
BuildRequires:  python3-setuptools
f7c154c
346ba33
Requires:       python3-XStatic
346ba33
Requires:       xstatic-jquery-quicksearch-common
f7c154c
346ba33
%{?python_provide:%python_provide python3-%{pkgname}}
f7c154c
346ba33
%description -n python3-%{pkgname}
346ba33
JavaScript library packaged for setuptools (easy_install) / pip.
f7c154c
346ba33
This package is intended to be used by any project that needs these files.
f7c154c
346ba33
It intentionally does not provide any extra code except some metadata
346ba33
nor has any extra requirements.
346ba33
346ba33
This package provides Python 3 build of %{pkgname}.
346ba33
%endif
346ba33
346ba33
%package -n xstatic-jquery-quicksearch-common
346ba33
Summary:        %{summary}
f7c154c
346ba33
BuildRequires:  web-assets-devel
346ba33
Requires:       web-assets-filesystem
346ba33
346ba33
%description -n xstatic-jquery-quicksearch-common
346ba33
JavaScript library packaged for setuptools (easy_install) / pip.
346ba33
346ba33
This package is intended to be used by any project that needs these files.
346ba33
346ba33
It intentionally does not provide any extra code except some metadata
346ba33
nor has any extra requirements.
346ba33
346ba33
This package contains the javascript files.
346ba33
346ba33
%prep
346ba33
%autosetup -n %{pypi_name}-%{version}
346ba33
# patch to use webassets dir
346ba33
sed -i "s|^BASE_DIR = .*|BASE_DIR = '%{_jsdir}/jquery_quicksearch'|" xstatic/pkg/jquery_quicksearch/__init__.py
f7c154c
346ba33
%build
346ba33
%py2_build
346ba33
%if 0%{?with_python3}
346ba33
%py3_build
346ba33
%endif
f7c154c
346ba33
%install
346ba33
%py2_install
346ba33
mkdir -p %{buildroot}%{_jsdir}/jquery_quicksearch
346ba33
mv %{buildroot}%{python2_sitelib}/xstatic/pkg/jquery_quicksearch/data/jquery.quicksearch.js %{buildroot}%{_jsdir}/jquery_quicksearch
346ba33
rmdir %{buildroot}%{python2_sitelib}/xstatic/pkg/jquery_quicksearch/data/
346ba33
# fix execute flags for js
346ba33
chmod 644 %{buildroot}%{_jsdir}/jquery_quicksearch/jquery.quicksearch.js
346ba33
346ba33
%if 0%{?with_python3}
346ba33
%py3_install
346ba33
# Remove static files, already created by the python2 subpkg
346ba33
rm -rf %{buildroot}%{python3_sitelib}/xstatic/pkg/jquery_quicksearch/data
346ba33
%endif
346ba33
346ba33
%files -n python2-%{pkgname}
f7c154c
%doc README.txt
f7c154c
%{python2_sitelib}/xstatic/pkg/jquery_quicksearch
346ba33
%{python2_sitelib}/XStatic_JQuery.quicksearch-%{version}-py%{python2_version}.egg-info
346ba33
%{python2_sitelib}/XStatic_JQuery.quicksearch-%{version}-py%{python2_version}-nspkg.pth
346ba33
346ba33
%if 0%{?with_python3}
346ba33
%files -n python3-%{pkgname}
346ba33
%doc README.txt
346ba33
%{python3_sitelib}/xstatic/pkg/jquery_quicksearch
346ba33
%{python3_sitelib}/XStatic_JQuery.quicksearch-%{version}-py%{python3_version}.egg-info
346ba33
%{python3_sitelib}/XStatic_JQuery.quicksearch-%{version}-py%{python3_version}-nspkg.pth
346ba33
%endif
346ba33
346ba33
%files -n xstatic-jquery-quicksearch-common
346ba33
%doc README.txt
f7c154c
%{_jsdir}/jquery_quicksearch
f7c154c
f7c154c
%changelog
78a727b
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3.1-10
78a727b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
78a727b
6cfda6a
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3.1-9
6cfda6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
6cfda6a
a9d24bc
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3.1-8
a9d24bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
a9d24bc
0994c4c
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 2.0.3.1-7
0994c4c
- Rebuild for Python 3.6
0994c4c
346ba33
* Wed Oct 12 2016 Jan Beran <jberan@redhat.com> - 2.0.3.1-6
346ba33
- Provides a Python 3 subpackage
346ba33
80283e9
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.3.1-5
80283e9
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
80283e9
b6d0642
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3.1-4
b6d0642
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
b6d0642
7088dee
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.3.1-3
7088dee
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
7088dee
f7c154c
* Thu Sep 04 2014 Matthias Runge <mrunge@redhat.com> - 2.0.3.1-2
f7c154c
- change BR to python2-devel (rhbz#1134900)
f7c154c
f7c154c
* Thu Aug 28 2014 Matthias Runge <mrunge@redhat.com> - 2.0.3.1-1
f7c154c
- Initial package.