Blob Blame History Raw
%global pypi_name Nik4

Name:		nik4
Version:	1.6.0
Release:	1%{?dist}
Summary:	Command-line interface to a Mapnik rendering toolkit

License:	WTFPL
URL:		https://github.com/Zverik/Nik4
Source0:	https://files.pythonhosted.org/packages/source/N/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch:	noarch

# We cannot provide the Python 3 version for F23 since there is only a
# Python 2 version of the Python mapnik bindings available
%if 0%{?fedora} >= 24
Requires:	python3-mapnik
%else
Requires:	mapnik-python
%endif

%if 0%{?fedora} >= 24
BuildRequires:	python3-setuptools
BuildRequires:	python3-devel
%else
BuildRequires:	python-setuptools
BuildRequires:	python2-devel
%endif

%description
Nik4 is a mapnik-to-image exporting script.

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

%build
%if 0%{?fedora} >= 24
%py3_build
%else
%py2_build
%endif

%install
%if 0%{?fedora} >= 24
%py3_install
%else
%py2_install
%endif

mv %{buildroot}/%{_bindir}/nik4.py %{buildroot}/%{_bindir}/nik4

%files
%license LICENSE.txt
%doc README.md
%{_bindir}/nik4
%if 0%{?fedora} >= 24
%{python3_sitelib}/*
%else
%{python2_sitelib}/*
%endif

%changelog
* Sat Jul 09 2016 Eduardo Mayorga Téllez <mayorga@fedoraproject.org> - 1.6.0-1
- Initial packaging