Blob Blame History Raw
# Python3 packaging is turned off until pagure itself is ported to python3.
%global with_python3 0

%{!?_licensedir: %global license %%doc}

%global modname pagure-dist-git
%global sum     Pagure gitolite plugin for Fedora's dist-git setup.

Name:               pagure-dist-git
Version:            0.1
Release:            1%{?dist}
Summary:            %{sum}

License:            GPLv2+
URL:                http://pypi.python.org/pypi/pagure-dist-git
Source0:            https://pypi.io/packages/source/p/%{modname}/%{modname}-%{version}.tar.gz
BuildArch:          noarch


%description
Since 3.0 pagure offers a way to customize the creation and compilation the
of the gitolite configuration file.

This project hosts the logic to generate gitolite's configuration file for
dist-git which has a different access model than regular projects on pagure
(for example, forced pushed is forbidden).

%package -n python2-%{modname}
Summary:            Pagure gitolite plugin for Fedora's dist-git setup.
%{?python_provide:%python_provide python2-%{modname}}

BuildRequires:      python2-devel
BuildRequires:      python2-setuptools

Requires:           python2-pdc-client
Requires:           python2-dogpile-cache
Requires:           pagure

%description -n python2-%{modname}
Since 3.0 pagure offers a way to customize the creation and compilation the
of the gitolite configuration file.

This project hosts the logic to generate gitolite's configuration file for
dist-git which has a different access model than regular projects on pagure
(for example, forced pushed is forbidden).

%if 0%{?with_python3}
%package -n python3-%{modname}
Summary:            Pagure gitolite plugin for Fedora's dist-git setup.
%{?python_provide:%python_provide python3-%{modname}}

BuildRequires:      python3-devel
BuildRequires:      python3-setuptools

Requires:           python3-pdc-client
Requires:           python3-dogpile-cache
Requires:           python3-pagure

%description -n python3-%{modname}
Since 3.0 pagure offers a way to customize the creation and compilation the
of the gitolite configuration file.

This project hosts the logic to generate gitolite's configuration file for
dist-git which has a different access model than regular projects on pagure
(for example, forced pushed is forbidden).
%endif

%prep
%autosetup -n %{modname}-%{version}

%build
%py2_build
%if 0%{?with_python3}
%py3_build
%endif

%install
%py2_install
%if 0%{?with_python3}
%py3_install
%endif

# The tests require network access, so don't run them.
#%%check
#%%{__python2} setup.py test
#%%if 0%%{?with_python3}
#%%{__python3} setup.py test
#%%endif

%files -n python2-%{modname}
%doc README.rst
%license LICENSE
%{python2_sitelib}/dist_git_auth.py*
%{python2_sitelib}/pagure_dist_git-%{version}*

%if 0%{?with_python3}
%files -n python3-%{modname}
%doc README.rst
%license LICENSE
%{python3_sitelib}/dist_git_auth.py*
%{python3_sitelib}/pagure_dist_git-%{version}*
%endif

%changelog
* Fri Jun 30 2017 Ralph Bean <rbean@redhat.com> - 0.1-1
- Initial packaging for Fedora