Blob Blame History Raw
%global pkg_name flask-security
%global mod_name Flask-Security
%global desc Flask-Security quickly adds security features to your Flask application.

Name:       python-%{pkg_name}
Version:    3.0.0
Release:    1%{?dist}
Summary:    Simple security for Flask apps
Group:      Development/Libraries
License:    MIT
URL:        http://github.com/mattupstate/%{pkg_name}/
Source0:    https://files.pythonhosted.org/packages/source/F/%{mod_name}/%{mod_name}-%{version}.tar.gz
BuildArch:  noarch

BuildRequires: python2-devel, python%{python3_pkgversion}-devel
BuildRequires: python2-pytest-runner, python%{python3_pkgversion}-pytest-runner
BuildRequires: python2-babel, python%{python3_pkgversion}-babel
BuildRequires: python2-flask-sphinx-themes, python%{python3_pkgversion}-flask-sphinx-themes
BuildRequires: python2-flask-babelex, python%{python3_pkgversion}-flask-babelex
BuildRequires: python2-flask-login, python%{python3_pkgversion}-flask-login
BuildRequires: python2-flask-principal, python%{python3_pkgversion}-flask-principal
BuildRequires: python2-passlib, python%{python3_pkgversion}-passlib
BuildRequires: python2-flask-wtf, python%{python3_pkgversion}-flask-wtf


%description
%{desc}

%package -n python2-%{pkg_name}
Summary: Simple security for Flask apps
Requires: python2-flask
Requires: python2-flask-login
Requires: python2-flask-mail
Requires: python2-flask-principal
Requires: python2-flask-wtf
Requires: python2-flask-babel
Requires: python2-itsdangerous
Requires: python2-passlib

%{?python_provide:%python_provide python2-%{pkg_name}}

%description -n python2-%{pkg_name}
%{desc}

%package -n python%{python3_pkgversion}-%{pkg_name}
Summary: Simple security for Flask apps
Requires: python%{python3_pkgversion}-flask
Requires: python%{python3_pkgversion}-flask-login
Requires: python%{python3_pkgversion}-flask-mail
Requires: python%{python3_pkgversion}-flask-principal
Requires: python%{python3_pkgversion}-flask-wtf
Requires: python%{python3_pkgversion}-flask-babel
Requires: python%{python3_pkgversion}-itsdangerous
Requires: python%{python3_pkgversion}-passlib

%{?python_provide:%python_provide python%{python3_pkgversion}-%{pkg_name}}

%description -n python%{python3_pkgversion}-%{pkg_name}
%{desc}

%package doc
Summary:        Documentation for %{name}, includes full API docs
%{?python_provide:%python_provide python2-%{pkg_name}-doc}
%description doc
This package contains the full API documentation for %{name}.

%prep
%setup -q -n %{mod_name}-%{version}

%build
%py2_build
%py3_build

pushd docs
make html
make man
rm -f docs/_build/html/.buildinfo
popd

%install
%py2_install
%py3_install
install -Dp docs/_build/man/flask-security.1 %{buildroot}%{_mandir}/man1/flask-security.1

%files doc
%doc README.rst AUTHORS CHANGES docs/_build/html
%license LICENSE
%{_mandir}/man1/flask-security.*

%files -n python2-%{pkg_name}
%{python2_sitelib}/*.egg-info/
%{python2_sitelib}/flask_security

%files -n python%{python3_pkgversion}-%{pkg_name}
%{python3_sitelib}/*.egg-info/
%{python3_sitelib}/flask_security

%changelog
* Thu Mar 01 2018 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 3.0.0-1
- new version 3.0.0

* Thu Mar 01 2018 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 1.7.5-2
- improve spec file

* Tue Jan  3 2017 Jakub Dorňák <jakub.dornak@misli.cz> - 1.7.5-1
- Initial package