Blob Blame Raw
%global commit 86a331e6d8bad7fac1a4a53b46a2bd49c848f348
%global module_name TileStache

Name:           python-tilestache
Version:        1.49.11
Release:        13%{?dist}
Summary:        A stylish alternative for caching your map tiles

License:        BSD
URL:            http://tilestache.org
Source0:        https://github.com/%{module_name}/%{module_name}/archive/%{commit}/%{module_name}-%{commit}.tar.gz
# Modify font search to find the system DejaVuSansMono.ttf - Not submitted upstream
Patch0:         %{name}-1.49.11-use-system-fonts.patch
# Don't install the bundled font or docs - Not submitted upstream
Patch1:         %{name}-1.49.11-unbundle-installs.patch

BuildArch:      noarch

BuildRequires:  python2-devel
BuildRequires:  python2-setuptools

%package examples
Summary:        Example code for TileStache

%global _description\
TileStache is a Python-based server application that can serve up map tiles\
based on rendered geographic data. You might be familiar with TileCache, the\
venerable open source WMS server from MetaCarta. TileStache is similar, but we\
hope simpler and better-suited to the needs of designers and cartographers.

%description %_description

%package -n python2-tilestache
Summary: %summary
Requires:       font(dejavusansmono)
Requires:       python2-imaging
Requires:       python2-modestmaps
Requires:       python2-simplejson
Requires:       python2-werkzeug
Requires:       python2-tilestache%{?isa} = %{version}-%{release}
%{?python_provide:%python_provide python2-tilestache}

%description -n python2-tilestache %_description

%description examples
Example code for TileStache: A stylish alternative for caching your map tiles

%prep
%setup -qn %{module_name}-%{commit}
%patch0 -p1
%patch1 -p1

# Remove shebang from a script
sed -i '1{\@^#!/usr/bin/env python@d}' %{module_name}/Goodies/Caches/GoogleCloud.py

# Add shebang to a script
sed -i '1i #!/bin/bash' examples/zoom_example/run_server.sh

%build
%{__python2} setup.py build

%install
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}

mkdir -p %{buildroot}%{_mandir}/man1
install -p -m0644 man/tilestache-clean.1 %{buildroot}%{_mandir}/man1/
install -p -m0644 man/tilestache-render.1 %{buildroot}%{_mandir}/man1/
install -p -m0644 man/tilestache-seed.1 %{buildroot}%{_mandir}/man1/
install -p -m0644 man/tilestache-server.1 %{buildroot}%{_mandir}/man1/

mkdir -p %{buildroot}%{_datadir}/%{module_name}
cp -a examples %{buildroot}%{_datadir}/%{module_name}/

%files -n python2-tilestache
%doc CHANGELOG LICENSE README.md
%{_bindir}/tilestache-clean.py
%{_bindir}/tilestache-compose.py
%{_bindir}/tilestache-list.py
%{_bindir}/tilestache-render.py
%{_bindir}/tilestache-seed.py
%{_bindir}/tilestache-server.py
%{_mandir}/man1/tilestache-clean.1.gz
%{_mandir}/man1/tilestache-render.1.gz
%{_mandir}/man1/tilestache-seed.1.gz
%{_mandir}/man1/tilestache-server.1.gz
%{python2_sitelib}/%{module_name}/
%{python2_sitelib}/%{module_name}-%{version}-py?.?.egg-info

%files examples
%doc CHANGELOG LICENSE README.md
%{_datadir}/%{module_name}

%changelog
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.49.11-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.49.11-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Wed Feb 28 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.49.11-11
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.49.11-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.49.11-9
- Python 2 binary package renamed to python2-tilestache
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.49.11-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.49.11-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.49.11-6
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.49.11-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.49.11-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Mon Dec 15 2014 Scott K Logan <logans@cottsay.net> - 1.49.11-3
- More spec clean-ups for Package Review
- Use GitHub upstream
- Add examples subpackage

* Sun Nov 30 2014 Scott K Logan <logans@cottsay.net> - 1.49.11-2
- Spec clean-ups for Package Review

* Sun Sep 28 2014 Scott K Logan <logans@cottsay.net> - 1.49.11-1
- Initial package