Missing configurations added
This commit is contained in:
@@ -1,16 +1,22 @@
|
|||||||
Name: mod_tile
|
Name: mod_tile
|
||||||
Version: 0.6.1
|
Version: 0.6.1
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: A program to efficiently render and serve map tiles for www.openstreetmap.org map using Apache and Mapnik.
|
Summary: A program to efficiently render and serve map tiles for www.openstreetmap.org map using Apache and Mapnik.
|
||||||
|
|
||||||
|
%define geo_user geo
|
||||||
|
%define daemon_name renderd
|
||||||
|
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: https://github.com/openstreetmap/mod_tile
|
URL: https://github.com/openstreetmap/mod_tile
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
Source1: 10-tile.conf
|
Source1: 10-tile.conf
|
||||||
Source2: mod_tile.conf
|
Source2: mod_tile.conf
|
||||||
|
Source3: mod_tile_renderd.service
|
||||||
|
Source4: mod_tile_tmp_d.conf
|
||||||
|
|
||||||
BuildRequires: httpd-devel, apr
|
BuildRequires: httpd-devel, apr
|
||||||
BuildRequires: mapnik-devel
|
BuildRequires: mapnik-devel
|
||||||
|
BuildRequires: libcurl-devel
|
||||||
BuildRequires: iniparser-devel
|
BuildRequires: iniparser-devel
|
||||||
BuildRequires: sqlite-devel
|
BuildRequires: sqlite-devel
|
||||||
|
|
||||||
@@ -40,7 +46,8 @@ at compile time, see: render_config.h
|
|||||||
./autogen.sh
|
./autogen.sh
|
||||||
%configure \
|
%configure \
|
||||||
--with-apxs \
|
--with-apxs \
|
||||||
--with-libmapnik
|
--with-libmapnik \
|
||||||
|
--with-libcurl
|
||||||
%{__make}
|
%{__make}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@@ -48,10 +55,24 @@ at compile time, see: render_config.h
|
|||||||
%{__make} install-%{name} DESTDIR=%{buildroot}
|
%{__make} install-%{name} DESTDIR=%{buildroot}
|
||||||
%{__install} -D %{S:1} %{buildroot}%{_sysconfdir}/httpd/conf.modules.d/10-tile.conf
|
%{__install} -D %{S:1} %{buildroot}%{_sysconfdir}/httpd/conf.modules.d/10-tile.conf
|
||||||
%{__install} -D %{S:2} %{buildroot}%{_sysconfdir}/httpd/conf.d/mod_tile.conf
|
%{__install} -D %{S:2} %{buildroot}%{_sysconfdir}/httpd/conf.d/mod_tile.conf
|
||||||
|
%{__install} -D %{S:3} %{buildroot}%{_systemd_util_dir}/system/%{daemon_name}.service
|
||||||
|
%{__install} -D %{S:4} %{buildroot}%{_sysconfdir}/tmpfiles.d/%{daemon_name}.conf
|
||||||
|
%{__install} -d %{S:4} %{buildroot}%{_rundir}%{daemon_name}
|
||||||
|
%{__install} -d %{S:4} %{buildroot}/geodata/mod_tile
|
||||||
|
|
||||||
|
%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
|
||||||
|
|
||||||
%post
|
%post
|
||||||
if [ $1 -eq 1 ]; then
|
if [ $1 -eq 1 ]; then
|
||||||
/usr/bin/systemctl reload httpd.service >/dev/null 2>&1 || :
|
/usr/bin/systemctl reload httpd.service >/dev/null 2>&1 || :
|
||||||
|
%systemd_post %{daemon_name}.service
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
@@ -59,20 +80,33 @@ if [ $1 -eq 1 ]; then
|
|||||||
/usr/bin/systemctl reload httpd.service >/dev/null 2>&1 || :
|
/usr/bin/systemctl reload httpd.service >/dev/null 2>&1 || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
%preun
|
||||||
|
if [ $1 -eq 0 ]; then
|
||||||
|
%systemd_preun %{daemon_name}.service
|
||||||
|
fi
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
[ "%{buildroot}" != "/" ] && [ -d "%{buildroot}" ] && rm -rf %{buildroot}
|
[ "%{buildroot}" != "/" ] && [ -d "%{buildroot}" ] && rm -rf %{buildroot}
|
||||||
[ "%{_builddir}" != "/" ] && [ -d "%{_builddir}" ] && rm -rf %{_builddir}/*
|
[ "%{_builddir}" != "/" ] && [ -d "%{_builddir}" ] && rm -rf %{_builddir}/*
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc COPYING
|
%doc COPYING
|
||||||
%config(noreplace) %{_sysconfdir}/renderd.conf
|
%config(noreplace) %{_sysconfdir}/%{daemon_name}.conf
|
||||||
%config %{_sysconfdir}/httpd/conf.modules.d/10-tile.conf
|
%config %{_sysconfdir}/httpd/conf.modules.d/10-tile.conf
|
||||||
%config %{_sysconfdir}/httpd/conf.d/mod_tile.conf
|
%config(noreplace) %{_sysconfdir}/httpd/conf.d/mod_tile.conf
|
||||||
|
%config %{_sysconfdir}/tmpfiles.d/%{daemon_name}.conf
|
||||||
|
%config(noreplace) %{buildroot}%{_sysconfdir}/tmpfiles.d/%{daemon_name}.conf
|
||||||
%{_bindir}/render*
|
%{_bindir}/render*
|
||||||
%{_libdir}/httpd/modules/%{name}.so
|
%{_libdir}/httpd/modules/%{name}.so
|
||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
|
%attr(0755, %{geo_user}, %{geo_user}) %dir /geodata/mod_tile
|
||||||
|
%attr(0775, %{geo_user}, %{geo_user}) %dir %{_rundir}%{daemon_name}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* 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.
|
||||||
|
|
||||||
* Tue Jan 4 2022 Daniel Steiner <daniel.steiner@dsteiner.ch>
|
* Tue Jan 4 2022 Daniel Steiner <daniel.steiner@dsteiner.ch>
|
||||||
- Update to latest (0.6.1).
|
- Update to latest (0.6.1).
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user