%global gitversion 7211cb7 %global gitdate 20161124 %{!?_httpd_confdir: %{expand: %%global _httpd_confdir %%{_sysconfdir}/httpd/conf.d}} %{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}} Name: mod_tile Version: 0.%{gitdate}.%{gitversion} Release: 1%{?dist} Summary: Tile Map Server License: GPLv2+ URL: http://wiki.openstreetmap.org/wiki/Mod_tile # git clone https://github.com/openstreetmap/mod_tile/ # git branch -vv # tar cJf mod_tile-%%{gitversion}.tar.xz mod_tile Source0: mod_tile-%{gitversion}.tar.xz Source1: renderd.service Patch0: mod_tile-gcc7.patch BuildRequires: autoconf, automake, libtool BuildRequires: httpd-devel, apr-devel, mapnik-devel, iniparser-devel BuildRequires: gcc, gcc-c++ Requires: httpd %description mod_tile is a system to serve raster tiles for example to use within a slippy map. It provides a dynamic combination of efficient caching and on the fly rendering. Due to its dynamic rendering, only a small fraction of overall tiles need to be kept on disk, reducing the resources required. At the same time, its caching strategy allows for a high performance serving and can support several thousand requests per second. %prep %setup -q -n %{name} %patch0 -p0 -b .gcc7 %build ./autogen.sh %configure #make %{?_smp_mflags} make %install rm -rf $RPM_BUILD_ROOT %make_install make install-mod_tile DESTDIR=$RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT%{_httpd_confdir} %if "%{_httpd_modconfdir}" != "%{_httpd_confdir}" install -d $RPM_BUILD_ROOT%{_httpd_modconfdir} head -n4 < mod_tile.conf > $RPM_BUILD_ROOT%{_httpd_modconfdir}/10-mod_tile.conf tail -n150 < mod_tile.conf > $RPM_BUILD_ROOT%{_httpd_confdir}/mod_tile.conf %else install -m 644 mod_tile.conf $RPM_BUILD_ROOT%{_httpd_confdir}/mod_tile.conf %endif rm -f $RPM_BUILD_ROOT%{_libdir}/libiniparser.a rm -f $RPM_BUILD_ROOT%{_libdir}/libiniparser.la rm -f $RPM_BUILD_ROOT%{_libdir}/libiniparser.so install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/mod_tile install -d $RPM_BUILD_ROOT%{_localstatedir}/run/renderd install -d $RPM_BUILD_ROOT/lib/systemd/system/ install %{SOURCE1} $RPM_BUILD_ROOT/lib/systemd/system/ %files %defattr(-,root,root,-) %license COPYING %doc readme.txt %config(noreplace) %{_sysconfdir}/renderd.conf %{_bindir}/render_expired %{_bindir}/render_list %{_bindir}/render_old %{_bindir}/render_speedtest %{_bindir}/renderd %config(noreplace) %{_httpd_confdir}/mod_tile.conf %if "%{_httpd_modconfdir}" != "%{_httpd_confdir}" %config %{_httpd_modconfdir}/10-mod_tile.conf %endif %{_libdir}/httpd/modules/mod_tile.so #%{_libdir}/libiniparser.so.3 #%{_libdir}/libiniparser.so.3.0.0 %{_mandir}/man1/*.1* %{_mandir}/man8/*.8* %dir %attr(0755,apache,apache) %{_localstatedir}/lib/mod_tile %dir %attr(0750,apache,apache) %{_localstatedir}/run/renderd /lib/systemd/system/renderd.service %changelog * Tue Dec 15 2015 Thomas Sailer - initial package