Files
rpms/fedora/SPECS/mod_tile.spec

135 lines
4.3 KiB
RPMSpec
Raw Normal View History

2019-11-08 12:04:53 +01:00
Name: mod_tile
2022-01-06 07:55:17 +01:00
Version: 0.6.1
2022-04-08 09:37:59 +02:00
Release: 3%{?dist}
2019-11-08 12:04:53 +01:00
Summary: A program to efficiently render and serve map tiles for www.openstreetmap.org map using Apache and Mapnik.
2022-01-06 08:30:30 +01:00
%define geo_user geo
%define daemon_name renderd
2019-11-08 12:04:53 +01:00
License: GPLv2
URL: https://github.com/openstreetmap/mod_tile
2022-01-06 07:55:17 +01:00
Source0: %{name}-%{version}.tar.gz
2019-11-08 12:04:53 +01:00
Source1: 10-tile.conf
2022-01-06 07:55:17 +01:00
Source2: mod_tile.conf
2022-01-06 08:30:30 +01:00
Source3: mod_tile_renderd.service
Source4: mod_tile_tmp_d.conf
2019-11-08 12:04:53 +01:00
BuildRequires: httpd-devel, apr
BuildRequires: mapnik-devel
2022-01-06 08:30:30 +01:00
BuildRequires: libcurl-devel
2022-01-06 07:55:17 +01:00
BuildRequires: iniparser-devel
2022-04-08 09:37:59 +02:00
BuildRequires: libmemcached-devel
BuildRequires: librados-devel
BuildRequires: cairo-devel
BuildRequires: glib2-devel
2022-01-06 07:55:17 +01:00
BuildRequires: sqlite-devel
2019-11-08 12:04:53 +01:00
%description
The rendering is implemented in a multithreaded process
called renderd which opens either a unix or tcp socket
and listens for requests to render tiles. It uses Mapnik
to render tiles using the rendering rules defined in
the configuration file /etc/renderd.conf. Its configuration
also allows to specify the number of rendering
threads.
The render daemon implements a queuing mechanism with multiple
priority levels to provide an as up-to-date viewing experience
given the available rendering resources. The highest priority
is for on the fly rendering of tiles not yet in the tile cache,
two priority levels for re-rendering out of date tiles on the fly
and two background batch rendering queues. The on the fly rendering
queues are limited to a short 32 metatile size to minimize latency.
The size of the main background queue is determined
at compile time, see: render_config.h
%prep
%setup -q -n %{name}-%{version}
%build
2022-01-06 07:55:17 +01:00
./autogen.sh
2019-11-08 12:04:53 +01:00
%configure \
--with-apxs \
2022-01-06 08:30:30 +01:00
--with-libmapnik \
--with-libcurl
2019-11-08 12:04:53 +01:00
%{__make}
%install
%{__make} install DESTDIR=%{buildroot}
%{__make} install-%{name} DESTDIR=%{buildroot}
2019-11-16 19:15:20 +01:00
%{__install} -D %{S:1} %{buildroot}%{_sysconfdir}/httpd/conf.modules.d/10-tile.conf
2022-01-06 07:55:17 +01:00
%{__install} -D %{S:2} %{buildroot}%{_sysconfdir}/httpd/conf.d/mod_tile.conf
2022-01-06 08:30:30 +01:00
%{__install} -D %{S:3} %{buildroot}%{_systemd_util_dir}/system/%{daemon_name}.service
%{__install} -D %{S:4} %{buildroot}%{_sysconfdir}/tmpfiles.d/%{daemon_name}.conf
2022-01-06 08:53:34 +01:00
%{__install} -d %{buildroot}%{_rundir}/%{daemon_name}
%{__install} -d %{buildroot}/geodata/mod_tile
2022-01-06 08:30:30 +01:00
%pre
if [ $1 -eq 1 ]; then
getent group %{geo_user} > /dev/null || groupadd -r %{geo_user}
getent passwd %{geo_user} > /dev/null || \
useradd -r -d %{_localstatedir}/lib/nginx -g %{geo_user} \
-s /sbin/nologin -c "Nginx web server" %{geo_user}
exit 0
fi
2019-11-08 14:23:00 +01:00
2019-11-08 12:04:53 +01:00
%post
if [ $1 -eq 1 ]; then
/usr/bin/systemctl reload httpd.service >/dev/null 2>&1 || :
2022-01-06 08:30:30 +01:00
%systemd_post %{daemon_name}.service
2019-11-08 12:04:53 +01:00
fi
%postun
if [ $1 -eq 1 ]; then
/usr/bin/systemctl reload httpd.service >/dev/null 2>&1 || :
fi
2022-01-06 08:30:30 +01:00
%preun
if [ $1 -eq 0 ]; then
%systemd_preun %{daemon_name}.service
fi
2019-11-08 12:04:53 +01:00
%clean
[ "%{buildroot}" != "/" ] && [ -d "%{buildroot}" ] && rm -rf %{buildroot}
[ "%{_builddir}" != "/" ] && [ -d "%{_builddir}" ] && rm -rf %{_builddir}/*
%files
2022-01-06 07:55:17 +01:00
%doc COPYING
2022-01-06 08:30:30 +01:00
%config(noreplace) %{_sysconfdir}/%{daemon_name}.conf
2019-11-16 19:15:20 +01:00
%config %{_sysconfdir}/httpd/conf.modules.d/10-tile.conf
2022-01-06 08:30:30 +01:00
%config(noreplace) %{_sysconfdir}/httpd/conf.d/mod_tile.conf
2022-01-06 08:53:34 +01:00
%config %{_systemd_util_dir}/system/%{daemon_name}.service
%config(noreplace) %{_sysconfdir}/tmpfiles.d/%{daemon_name}.conf
2019-11-08 12:04:53 +01:00
%{_bindir}/render*
%{_libdir}/httpd/modules/%{name}.so
%{_mandir}/man1/*
2022-01-06 08:30:30 +01:00
%attr(0755, %{geo_user}, %{geo_user}) %dir /geodata/mod_tile
2022-01-06 08:53:34 +01:00
%attr(0775, %{geo_user}, %{geo_user}) %dir %{_rundir}/%{daemon_name}
2019-11-08 12:04:53 +01:00
%changelog
2022-04-08 09:37:59 +02:00
* Fri Mar 25 2022 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Build dependencies added
2022-01-06 08:30:30 +01:00
* Thu Jan 6 2022 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Add systemd startup config. Add socket dir. Add tmpfiles.d config.
- Create cache directory, which is not default.
2022-01-06 07:55:17 +01:00
* Tue Jan 4 2022 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to latest (0.6.1).
2022-01-06 08:53:34 +01:00
* Fri May 22 2020 Daniel Steiner <daniel.steiner@daniel-steiner.org>
- First build on Fedora 34.
* Sat Oct 31 2020 Daniel Steiner <daniel.steiner@daniel-steiner.org>
- First build on Fedora 33.
* Thu Jul 23 2020 Daniel Steiner <daniel.steiner@daniel-steiner.org>
- Patch for duplicated variables definition added, this compiles now on Fedora 32 and gcc 10.
* Sat Nov 9 2019 Daniel Steiner <daniel.steiner@daniel-steiner.org>
2019-11-16 19:15:20 +01:00
- Fix for modules config path.
* Fri Nov 8 2019 Daniel Steiner <daniel.steiner@daniel-steiner.org>
2019-11-08 12:04:53 +01:00
- First build on Fedora 31 httpd-2.4.41.