Björn Esser 8de14b1
# Conditional for release and snapshot builds. Uncomment for release-builds.
Björn Esser e84d7a8
%global rel_build 1
Björn Esser 8de14b1
Björn Esser 8de14b1
# Setup _pkgdocdir if not defined already.
Björn Esser cbebcc5
%{!?_py3docdir:%global _py3docdir	%{_docdir}/python3-%{pypi_name}%{!?_pkgdocdir:-%{version}}}
Björn Esser 8de14b1
%{!?_pkgdocdir:%global _pkgdocdir	%{_docdir}/%{name}-%{version}}
Björn Esser 8de14b1
Björn Esser 8de14b1
# Settings used for build from snapshots.
Björn Esser 8de14b1
%{!?rel_build:%global commit		ab2dc2db9db979816a4a7c4fd269ad2f27ef2d0b}
Björn Esser 8de14b1
%{!?rel_build:%global commit_date	20150104}
Björn Esser 8de14b1
%{!?rel_build:%global shortcommit	%(c=%{commit};echo ${c:0:7})}
Björn Esser 8de14b1
%{!?rel_build:%global gitver		git%{commit_date}-%{shortcommit}}
Björn Esser 8de14b1
%{!?rel_build:%global gitrel		.git%{commit_date}.%{shortcommit}}
Björn Esser 8de14b1
Björn Esser 8de14b1
# Proper naming for the tarball from github.
Björn Esser 8de14b1
%global gittar %{name}-%{version}%{!?rel_build:-%{gitver}}.tar.gz
Björn Esser 8de14b1
Björn Esser 8de14b1
# Upstream name
Björn Esser d68e95b
%global pypi_name django-angular
Björn Esser d68e95b
Björn Esser 8de14b1
Name:			python-%{pypi_name}
ee39530
Version:		2.0.3
e247bff
Release:		12%{?gitrel}%{?dist}
Björn Esser 8de14b1
Summary:		Classes and utility functions to integrate AngularJS with Django
Björn Esser d68e95b
Björn Esser 8de14b1
License:		MIT
Björn Esser 8de14b1
URL:			https://github.com/jrief/%{pypi_name}
Björn Esser 8de14b1
# Sources for release-builds.
Björn Esser 8de14b1
%{?rel_build:Source0:	%{url}/archive/%{version}.tar.gz#/%{gittar}}
Björn Esser 8de14b1
# Sources for snapshot-builds.
Björn Esser 8de14b1
%{!?rel_build:Source0:	%{url}/archive/%{commit}.tar.gz#/%{gittar}}
Björn Esser d68e95b
Björn Esser 8de14b1
BuildArch:		noarch
Björn Esser d68e95b
12fdd1f
%description
12fdd1f
Django-Angular is a collection of utilities, which aim to ease the
12fdd1f
integration of Django with AngularJS by providing reusable components.
12fdd1f
12fdd1f
Björn Esser 8de14b1
%package -n python3-%{pypi_name}
Björn Esser 8de14b1
Summary:		Classes and utility functions to integrate AngularJS with Django
Björn Esser 8de14b1
a857828
BuildRequires: make
Björn Esser 8de14b1
BuildRequires:		python3-devel
Björn Esser 8de14b1
BuildRequires:		python3-setuptools
Björn Esser 8de14b1
Björn Esser 8de14b1
Requires:		python3-six
Björn Esser 8de14b1
Requires:		python3-django
12fdd1f
de7b154
Obsoletes:		python2-%{pypi_name} < 1.1.2-2
de7b154
Obsoletes:		python-%{pypi_name} < 1.1.2-2
de7b154
d5edd02
%{?python_provide:%python_provide python3-%{pypi_name}}
d5edd02
Björn Esser 8de14b1
Björn Esser 8de14b1
%description -n python3-%{pypi_name}
Björn Esser d68e95b
Django-Angular is a collection of utilities, which aim to ease the
Björn Esser d68e95b
integration of Django with AngularJS by providing reusable components.
Björn Esser d68e95b
Björn Esser d68e95b
Björn Esser 8de14b1
%package -n python3-%{pypi_name}-doc
Björn Esser 8de14b1
Summary:		Documentation-files for python3-%{pypi_name}
Björn Esser 8de14b1
Björn Esser 8de14b1
BuildRequires:		dos2unix
Björn Esser 8de14b1
BuildRequires:		python3-sphinx
Björn Esser 8de14b1
de7b154
Obsoletes:		python2-%{pypi_name}-doc < 1.1.2-2
de7b154
Obsoletes:		python-%{pypi_name}-doc < 1.1.2-2
de7b154
de7b154
%{?python_provide:%python_provide python3-%{pypi_name}-doc}
de7b154
Björn Esser 8de14b1
%description -n python3-%{pypi_name}-doc
Björn Esser 8de14b1
This package contains the documentation-files for python3-%{pypi_name}.
Björn Esser 8de14b1
Björn Esser 8de14b1
Björn Esser 8de14b1
%prep
12fdd1f
%if 0%{?rel_build}
12fdd1f
%autosetup -n %{pypi_name}-%{version} -p 1
12fdd1f
%else
12fdd1f
%autosetup -n %{pypi_name}-%{commit} -p 1
12fdd1f
%endif
Björn Esser 8de14b1
Björn Esser 8de14b1
# Remove bundled egg-info and unneded files.
Björn Esser 8de14b1
%{__rm} -rf *.egg-info examples/.coveragerc
Björn Esser 8de14b1
Björn Esser 8de14b1
Björn Esser 8de14b1
# Fix hashbangs.
Björn Esser 8de14b1
for _file in $(%{__grep} -Rle '^#![ \t]*/usr/bin/env[ \t]*python' .)
Björn Esser 8de14b1
do
de7b154
  %{__sed} -e 's~^#![ \t]*/usr/bin/env[ \t]*python.*$~#!%{__python3}~'	\
Björn Esser 8de14b1
	< ${_file} > ${_file}.new
Björn Esser 8de14b1
  /bin/touch -r ${_file} ${_file}.new
Björn Esser 8de14b1
  %{__mv} -f ${_file}.new ${_file}
Björn Esser 8de14b1
done
Björn Esser d68e95b
Björn Esser d68e95b
Björn Esser d68e95b
%build
12fdd1f
%py3_build
Björn Esser 8de14b1
Björn Esser 8de14b1
# Documentation
Björn Esser 8de14b1
pushd docs
de7b154
%make_build html SPHINXBUILD=sphinx-build-3
Björn Esser 8de14b1
%{__rm} -f _build/html/{.buildinfo,objects.inv}
Björn Esser 8de14b1
%{_bindir}/find _build/html -type f -print0 |				\
Björn Esser 8de14b1
	%{_bindir}/xargs -0 %{_bindir}/dos2unix -k -o -s
Björn Esser 8de14b1
popd
Björn Esser 8de14b1
Björn Esser d68e95b
Björn Esser d68e95b
%install
12fdd1f
%py3_install
Björn Esser 8de14b1
Björn Esser 8de14b1
# Documentation
Björn Esser 8de14b1
%{__mkdir} -p %{buildroot}%{?_py3docdir}
12fdd1f
%{__cp} -a CONTRIBUTING.md README.md docs/_build/html client examples	\
Björn Esser 8de14b1
		%{buildroot}%{?_py3docdir}
12fdd1f
%if 0%{?rhel} && 0%{?rhel} <= 6
12fdd1f
%{__cp} -a LICENSE.txt %{buildroot}%{?_py3docdir}
12fdd1f
%endif
Björn Esser 8de14b1
Björn Esser 8de14b1
Björn Esser 8de14b1
%check
Björn Esser 8de14b1
# noop
Björn Esser 8de14b1
Björn Esser d68e95b
Björn Esser 8de14b1
%files -n python3-%{pypi_name}
Björn Esser 8de14b1
%doc %dir %{?_py3docdir}
12fdd1f
%if 0%{fedora} || 0%{?rhel} >= 7
12fdd1f
%license LICENSE.txt
12fdd1f
%else
Björn Esser 8de14b1
%doc %{?_py3docdir}/LICENSE.txt
12fdd1f
%endif
d5edd02
%{python3_sitelib}/djng
Björn Esser 8de14b1
%{python3_sitelib}/django_angular-%{version}-py%{python3_version}.egg-info
Björn Esser 8de14b1
Björn Esser 8de14b1
%files -n python3-%{pypi_name}-doc
12fdd1f
%if 0%{fedora} || 0%{?rhel} >= 7
12fdd1f
%license %{_datadir}/licenses/python3-%{pypi_name}*
12fdd1f
%endif
Björn Esser 8de14b1
%doc %{?_py3docdir}
Björn Esser 8de14b1
Björn Esser d68e95b
Björn Esser d68e95b
%changelog
e247bff
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-12
e247bff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
e247bff
9d764b9
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.0.3-11
9d764b9
- Rebuilt for Python 3.10
9d764b9
5845c88
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-10
5845c88
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
5845c88
620152d
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-9
620152d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
620152d
f827d08
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2.0.3-8
f827d08
- Rebuilt for Python 3.9
f827d08
7022313
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-7
7022313
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
7022313
e965ff9
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.0.3-6
e965ff9
- Rebuilt for Python 3.8.0rc1 (#1748018)
e965ff9
baf16b2
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2.0.3-5
baf16b2
- Rebuilt for Python 3.8
baf16b2
d933a91
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-4
d933a91
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
d933a91
8e0dc47
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-3
8e0dc47
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
8e0dc47
f376fb4
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-2
f376fb4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
f376fb4
ee39530
* Mon Jul 09 2018 Matthias Runge <mrunge@redhat.com> - 2.0.3-1
ee39530
- update to 2.0.3 (rhbz#1490109)
ee39530
e4af527
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.1.2-4
e4af527
- Rebuilt for Python 3.7
e4af527
f2fbf37
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-3
f2fbf37
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
f2fbf37
de7b154
* Tue Jan 16 2018 Miro Hrončok <mhroncok@redhat.com> - 1.1.2-2
de7b154
- Removed Python 2 subpackage for https://fedoraproject.org/wiki/Changes/Django20
de7b154
- Add %%python_provide to the docs subpackage
de7b154
2f86399
* Thu Aug 24 2017 Björn Esser <besser82@fedoraproject.org> - 1.1.2-1
2f86399
- Update to 1.1.2 (rhbz#1480933)
2f86399
5219442
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-2
5219442
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
5219442
12fdd1f
* Mon Jul 24 2017 Björn Esser <besser82@fedoraproject.org> - 1.0.0-1
12fdd1f
- Update to 1.0.0 (rhbz#1474123)
12fdd1f
- Update spec file to recent guidelines
12fdd1f
d784142
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.3-3
d784142
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
d784142
6895013
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.8.3-2
6895013
- Rebuild for Python 3.6
6895013
d5edd02
* Wed Aug 31 2016 Matthias Runge <mrunge@redhat.com > - 0.8.3-1
d5edd02
- update to 0.8.3
d5edd02
37ddaa8
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.16-2
37ddaa8
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
37ddaa8
dd1a007
* Tue Feb 23 2016 Matthias Runge <mrunge@redhat.com> - 0.7.16-1
dd1a007
- update to 0.7.16 (rhbz#1310274)
dd1a007
a11bb2c
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.15-3
a11bb2c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
a11bb2c
cc65a29
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.15-2
cc65a29
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
cc65a29
Björn Esser 2dc2ec9
* Thu Jun 18 2015 Björn Esser <bjoern.esser@gmail.com> - 0.7.15-1
Björn Esser 2dc2ec9
- Update to 0.7.15 (#1219993)
Björn Esser 2dc2ec9
Björn Esser e84d7a8
* Tue Mar 31 2015 Björn Esser <bjoern.esser@gmail.com> - 0.7.13-1
Björn Esser e84d7a8
- new upstream release v0.7.13 (#1207442)
Björn Esser e84d7a8
Björn Esser 9350666
* Fri Jan 16 2015 Björn Esser <bjoern.esser@gmail.com> - 0.7.10-3.git20150104.ab2dc2d
Björn Esser 9350666
- updated to latest post-release-snapshot
Björn Esser 9350666
Björn Esser cbebcc5
* Fri Jan 16 2015 Björn Esser <bjoern.esser@gmail.com> - 0.7.10-2
Björn Esser cbebcc5
- fix versioning in %%{_py3docdir}
Björn Esser cbebcc5
Björn Esser 8de14b1
* Thu Jan 15 2015 Björn Esser <bjoern.esser@gmail.com> - 0.7.10-1
Björn Esser 8de14b1
- new upstream release 0.7.10
Björn Esser 8de14b1
- added sphinx-documentation
Björn Esser 8de14b1
- added Python3-build
Björn Esser 8de14b1
- several improvements to spec-file
Björn Esser 8de14b1
Björn Esser d68e95b
* Thu Jan 15 2015 Björn Esser <bjoern.esser@gmail.com> - 0.7.1-3
Björn Esser d68e95b
- initial import (#1182533)
Björn Esser d68e95b
Björn Esser d68e95b
* Mon May 26 2014 Matthias Runge <mrunge@redhat.com> - 0.7.1-2
Björn Esser d68e95b
- require python-django
Björn Esser d68e95b
Björn Esser d68e95b
* Tue May 20 2014 Matthias Runge <mrunge@redhat.com> - 0.7.1-1
Björn Esser d68e95b
- Initial package.