|
| 1 | +Name: mod_tile |
| 2 | +Version: 0.8.0.beta |
| 3 | +Release: 1%{?dist} |
| 4 | +Summary: Renders and serves OpenStreetMap map tiles using apache |
| 5 | +URL: https://github.com/openstreetmap/mod_tile |
| 6 | +Source0: %{name}-%{version}.tar.gz |
| 7 | +Source1: mod_tile.conf |
| 8 | +Source2: mod_tile.module.conf |
| 9 | +Source3: renderd.service |
| 10 | +Source4: renderd.tmpfiles |
| 11 | +Source5: netdata-mod_tile.chart.py |
| 12 | +Source6: netdata-mod_tile.conf |
| 13 | +Source7: netdata-renderd.chart.py |
| 14 | +Source8: netdata-renderd.conf |
| 15 | +Patch0: mod_tile-fix-renderd-conf.patch |
| 16 | +License: GPLv2+ |
| 17 | +Requires: httpd |
| 18 | +BuildRoot: %{_tmppath}/%{name}-%{version}-root |
| 19 | +BuildRequires: autoconf |
| 20 | +BuildRequires: automake |
| 21 | +BuildRequires: binutils |
| 22 | +BuildRequires: boost-devel |
| 23 | +BuildRequires: cairo-devel |
| 24 | +BuildRequires: cmake |
| 25 | +BuildRequires: gcc |
| 26 | +BuildRequires: gcc-c++ |
| 27 | +BuildRequires: gdal-devel |
| 28 | +BuildRequires: glib2 |
| 29 | +BuildRequires: pkgconfig |
| 30 | +BuildRequires: glib2-devel |
| 31 | +BuildRequires: harfbuzz-devel |
| 32 | +BuildRequires: httpd-devel |
| 33 | +BuildRequires: iniparser-devel |
| 34 | +BuildRequires: kernel-devel |
| 35 | +BuildRequires: libcurl-devel |
| 36 | +BuildRequires: libicu-devel |
| 37 | +BuildRequires: libjpeg-devel |
| 38 | +BuildRequires: libmemcached-devel |
| 39 | +BuildRequires: librados-devel |
| 40 | +BuildRequires: libxml2-devel |
| 41 | +BuildRequires: libtiff-devel |
| 42 | +BuildRequires: libtool |
| 43 | +BuildRequires: libwebp-devel |
| 44 | +BuildRequires: make |
| 45 | +BuildRequires: mapnik-devel |
| 46 | +BuildRequires: proj-devel |
| 47 | +BuildRequires: systemd |
| 48 | +BuildRequires: sqlite-devel |
| 49 | +Requires: renderd = %{version} |
| 50 | + |
| 51 | +%description |
| 52 | +A program to efficiently render and serve map tiles for |
| 53 | +OpenStreetMap map using Apache and Mapnik. |
| 54 | + |
| 55 | +%package -n renderd |
| 56 | +Summary: Renders OpenStreetMap map tiles daemon |
| 57 | +Requires(post): systemd-sysv |
| 58 | + |
| 59 | +%description -n renderd |
| 60 | +Renders OpenStreetMap map tiles for mod_tile |
| 61 | + |
| 62 | +%package munin |
| 63 | +Summary: Munin plugins for mod_tile |
| 64 | +Requires: munin-node |
| 65 | + |
| 66 | +%description munin |
| 67 | +Munin plugins for mod_tile |
| 68 | + |
| 69 | +%package netdata |
| 70 | +Summary: netdata plugins for mod_tile |
| 71 | +Requires: netdata |
| 72 | + |
| 73 | +%description netdata |
| 74 | +netdata plugins for mod_tile |
| 75 | + |
| 76 | +%prep |
| 77 | +%setup -q -n mod_tile-0.8.0-beta |
| 78 | +%patch0 |
| 79 | +./autogen.sh |
| 80 | + |
| 81 | +%build |
| 82 | +%{configure} |
| 83 | +%{__make} |
| 84 | +%{__make} test |
| 85 | + |
| 86 | +#%%cmake \ |
| 87 | +# %{_cmake_skip_rpath} \ |
| 88 | +# -DCMAKE_BUILD_TYPE:STRING=Release \ |
| 89 | +# -DENABLE_TESTS:BOOL=ON |
| 90 | +#%%cmake_build |
| 91 | +#%%ctest |
| 92 | + |
| 93 | +%install |
| 94 | +%{__make} install DESTDIR="%{buildroot}" |
| 95 | +%{__make} install-mod_tile DESTDIR="%{buildroot}" |
| 96 | +%{__mkdir_p} %{buildroot}%{_sysconfdir}/httpd/conf.d |
| 97 | +%{__mkdir_p} %{buildroot}%{_sysconfdir}/httpd/conf.modules.d |
| 98 | +%{__install} -Dp -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}.conf |
| 99 | +%{__install} -Dp -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/httpd/conf.modules.d/99-%{name}.conf |
| 100 | +%{__install} -Dp -m0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/renderd.conf |
| 101 | +%{__install} utils/{openstreetmap-tiles-update-expire,openstreetmap-tiles-update-rerender,osmosis-db_replag,render_all} %{buildroot}%{_bindir}/ |
| 102 | +%{__mkdir_p} %{buildroot}%{_datadir}/renderd/example-map |
| 103 | +%{__install} utils/example-map/* %{buildroot}%{_datadir}/renderd/example-map/ |
| 104 | +%{__mkdir_p} %{buildroot}%%{_mandir}/{man1,man5} |
| 105 | +%{__install} docs/man/*.1 %{buildroot}%{_mandir}/man1/ |
| 106 | +%{__install} docs/man/*.5 %{buildroot}%{_mandir}/man5/ |
| 107 | + |
| 108 | +# Daemons must be located on %%sbindir |
| 109 | +%{__mkdir_p} %{buildroot}%{_sbindir} |
| 110 | +%{__mv} %{buildroot}%{_bindir}/renderd %{buildroot}%{_sbindir}/renderd |
| 111 | +%{__mkdir_p} %{buildroot}%{_localstatedir}/lib/mod_tile |
| 112 | +%{__install} -Dp -m0644 %{SOURCE3} %{buildroot}%{_unitdir}/renderd.service |
| 113 | + |
| 114 | +# munin plugins |
| 115 | +%{__mkdir_p} %{buildroot}%{_datadir}/munin/plugins |
| 116 | +%{__install} -Dp -m0755 utils/munin/* %{buildroot}%{_datadir}/munin/plugins |
| 117 | + |
| 118 | +# netdata plugins with conf |
| 119 | +%{__mkdir_p} %{buildroot}%{_libexecdir}/netdata/python.d/ |
| 120 | +%{__mkdir_p} %{buildroot}%{_sysconfdir}/netdata/python.d/ |
| 121 | +%{__install} -Dp -m0644 %{SOURCE5} %{buildroot}%{_libexecdir}/netdata/python.d/mod_tile.chart.py |
| 122 | +%{__install} -Dp -m0644 %{SOURCE7} %{buildroot}%{_libexecdir}/netdata/python.d/renderd.chart.py |
| 123 | +%{__install} -Dp -m0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/netdata/python.d/mod_tile.conf |
| 124 | +%{__install} -Dp -m0644 %{SOURCE8} %{buildroot}%{_sysconfdir}/netdata/python.d/renderd.conf |
| 125 | + |
| 126 | +%pre -n renderd |
| 127 | +getent group osm > /dev/null || groupadd -r osm |
| 128 | +getent passwd osm > /dev/null || useradd -r -g osm -c "OpenStreetMap User" -s /sbin/nologin -d /var/lib/mod_tile osm |
| 129 | + |
| 130 | +%post -n renderd |
| 131 | +%if 0%{?systemd_post:1} |
| 132 | +%systemd_post renderd.service |
| 133 | +%else |
| 134 | +if [ $1 = 1 ]; then |
| 135 | + /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : |
| 136 | + /usr/bin/systemd-tmpfiles --create >/dev/null 2>&1 || : |
| 137 | +fi |
| 138 | +%endif |
| 139 | + |
| 140 | +%preun -n renderd |
| 141 | +%if 0%{?systemd_preun:1} |
| 142 | +%systemd_preun renderd.service |
| 143 | +%else |
| 144 | +if [ "$1" = 0 ] ; then |
| 145 | + # Package removal, not upgrade |
| 146 | + /usr/bin/systemctl --no-reload disable renderd.service >/dev/null 2>&1 || : |
| 147 | + /usr/bin/systemctl stop renderd.service >/dev/null 2>&1 || : |
| 148 | +fi |
| 149 | +exit 0 |
| 150 | +%endif |
| 151 | + |
| 152 | +%postun -n renderd |
| 153 | +%if 0%{?systemd_postun_with_restart:1} |
| 154 | +%systemd_postun_with_restart renderd.service |
| 155 | +%else |
| 156 | +/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : |
| 157 | +if [ $1 -ge 1 ]; then |
| 158 | +# Package upgrade, not uninstall |
| 159 | + /usr/bin/systemctl try-restart renderd.service >/dev/null 2>&1 || : |
| 160 | +fi |
| 161 | +%endif |
| 162 | + |
| 163 | +%files |
| 164 | +%doc README.rst docs |
| 165 | +%{_libdir}/httpd/modules/mod_tile.so |
| 166 | +%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf |
| 167 | +%config %{_sysconfdir}/httpd/conf.modules.d/99-%{name}.conf |
| 168 | + |
| 169 | +%files -n renderd |
| 170 | +%config(noreplace) %{_sysconfdir}/renderd.conf |
| 171 | +%{_sbindir}/renderd |
| 172 | +%{_bindir}/render_expired |
| 173 | +%{_bindir}/render_list |
| 174 | +%{_bindir}/render_old |
| 175 | +%{_bindir}/render_speedtest |
| 176 | +%{_bindir}/{openstreetmap-tiles-update-expire,openstreetmap-tiles-update-rerender,osmosis-db_replag,render_all} |
| 177 | +%{_mandir}/man1/* |
| 178 | +%{_mandir}/man5/* |
| 179 | +%attr(0755,osm,osm) %dir %{_localstatedir}/lib/mod_tile |
| 180 | +%{_unitdir}/renderd.service |
| 181 | +%{_datadir}/renderd/example-map/* |
| 182 | + |
| 183 | +%files munin |
| 184 | +%{_datadir}/munin/plugins/* |
| 185 | + |
| 186 | +%files netdata |
| 187 | +%{_libexecdir}/netdata/python.d/*.chart.py* |
| 188 | +%config(noreplace) %{_sysconfdir}/netdata/python.d/*.conf |
| 189 | + |
| 190 | +%changelog |
| 191 | +* Fri Jan 10 2025 Zenon Panoussis <oracle@provocation.net> - 0.7.1 |
| 192 | +- up to 0.8.0.beta |
| 193 | + |
| 194 | +* Sun May 5 2024 Zenon Panoussis <oracle@provocation.net> - 0.7.1 |
| 195 | +- up to 0.7.1 |
| 196 | + |
| 197 | +* Sun Mar 3 2024 Zenon Panoussis <oracle@provocation.net> - 0.7.0 |
| 198 | +- bumped to source release 0.7.0 |
| 199 | +- adjusted patch0 |
| 200 | +- removed slippymap.html, no longer in source |
| 201 | +- removed meta2tile, has been dropped upstream |
| 202 | +- added buildreqs gcc-c++, binutils, sqlite-devel, libcurl-devel, |
| 203 | + memcached-devel and librados-devel |
| 204 | +- fixed manpages |
| 205 | + |
| 206 | +* Tue Jul 04 2017 Didier Fabert <dfabert@b2pweb.com> 0.5-0.8 |
| 207 | +- netdata subpackage |
| 208 | + |
| 209 | +* Thu Jun 29 2017 Didier Fabert <dfabert@b2pweb.com> 0.5-0.7 |
| 210 | +- munin subpackage |
| 211 | +- Add extra/meta2tile |
| 212 | + |
| 213 | +* Sun Jun 18 2017 Didier Fabert <dfabert@b2pweb.com> 0.5-0.6 |
| 214 | +- Stop providing /var/lib/mod-tile directory |
| 215 | +- Fix osm home permissions |
| 216 | + |
| 217 | +* Fri Jun 16 2017 Didier Fabert <dfabert@b2pweb.com> 0.5-0.5 |
| 218 | +- Remove group |
| 219 | +- Rebuild against mapnik 3 |
| 220 | + |
| 221 | +* Thu Jun 15 2017 Didier Fabert <dfabert@b2pweb.com> 0.5-0.4 |
| 222 | +- Run systemd-tmpfiles --create on post |
| 223 | +- Fix osm home to /var/lib/mod_tile |
| 224 | + |
| 225 | +* Mon Jun 12 2017 Didier Fabert <dfabert@b2pweb.com> 0.5-0.3 |
| 226 | +- Fix renderd conf and |
| 227 | + |
| 228 | +* Mon Jun 12 2017 Didier Fabert <dfabert@b2pweb.com> 0.5-0.2 |
| 229 | +- First package |
0 commit comments