blob: 5ded84ce60c4f66d56ac6cc122bab256ec4f0a93 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
# Contributor: Calimero <calimeroteknik@free.fr>
# Contributor: jerry73204 <jerry73204@gmail.com>
# Maintainer: David Hummel <hummeltech@sherpaguru.com>
pkgname=('mod_tile-git' 'renderd-git')
pkgver=0.8.0.beta.r14.g5aadf31
pkgrel=1
pkgdesc='A daemon and apache module for rendering and serving Mapnik raster tiles'
arch=('i686' 'x86_64')
url='https://github.com/openstreetmap/mod_tile'
license=('GPL-2.0-or-later')
optdepends=('libmemcached: Memcached tile storage support')
makedepends=('apache' 'apr' 'cmake' 'git' 'glib2' 'iniparser' 'mapnik')
checkdepends=('curl' 'jq')
source=('git+https://github.com/openstreetmap/mod_tile.git'
'renderd.service'
'renderd-postgresql.service'
'renderd.sysusers'
'renderd.tmpfiles')
sha256sums=('SKIP'
'7bb1c67f92e9d253cecbb2f17048fba151a67e470c231fc33605937917b0567a'
'd6c009e95380d8a9be41f0bd077638cb6adbebb74fff238a2bfc9fbbb3ed49fa'
'cd6871cdb3e640912c95499e97fe1a2496ba95f102ec65f112bcd546ba736514'
'cc450b47539d8a3e0d3d78634c78b0019a15097d2fb4e86fa3332957abd82d89')
pkgver() {
git -C mod_tile describe --long --tags | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
}
prepare() {
export LDFLAGS
cmake -B build -S mod_tile \
-DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \
-DCMAKE_CXX_STANDARD:STRING=17 \
-DCMAKE_C_FLAGS:STRING="${CFLAGS}" \
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DCMAKE_INSTALL_RUNSTATEDIR:PATH=/run \
-DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc \
-DENABLE_TESTS:BOOL=ON \
-DUSE_CAIRO:BOOL=OFF \
-DUSE_CURL:BOOL=OFF \
-DUSE_RADOS:BOOL=OFF
}
build() {
# Override VERSION with ${pkgver}
sed -i 's/VERSION ".*"/VERSION "'${pkgver}'"/g' mod_tile/includes/config.h.in
cmake --build build
}
check() {
export CTEST_PARALLEL_LEVEL=${CTEST_PARALLEL_LEVEL:-$(nproc)}
ctest \
--output-on-failure \
--test-dir build
}
package_mod_tile-git() {
conflicts=('mod_tile')
depends=('apache' 'apr' 'glib2' 'iniparser')
install="${pkgname}.install"
pkgdesc='An Apache 2 module to deliver map tiles'
provides=('mod_tile')
DESTDIR="${pkgdir}" cmake --install build --strip
# License
install -Dm644 "${srcdir}"/mod_tile/COPYING "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE
# Example Map
install -Dm644 "${srcdir}"/mod_tile/etc/apache2/renderd-example-map.conf "${pkgdir}"/etc/httpd/conf/extra/httpd-tile-renderd-example-map.conf
install -dm755 "${pkgdir}"/usr/share/renderd
cp -av "${srcdir}"/mod_tile/utils/example-map "${pkgdir}"/usr/share/renderd/example-map
# "/etc/renderd.conf", "/usr/bin", "/usr/share/man", "/var/cache/renderd/tiles" & "/run/renderd" are contained in "renderd" package
pushd "${pkgdir}" || return
rm -rf etc/renderd.conf run usr/bin usr/share/man var
}
package_renderd-git() {
conflicts=('renderd')
backup=('etc/renderd.conf')
depends=('glib2' 'iniparser' 'mapnik')
pkgdesc='A daemon that renders map tiles using mapnik'
provides=('renderd')
DESTDIR="${pkgdir}" cmake --install build --strip
# Systemd service units, sysusers.d & tmpfiles.d configuration files
install -Dm644 -t "${pkgdir}"/usr/lib/systemd/system/ "${srcdir}"/renderd-postgresql.service "${srcdir}"/renderd.service
install -Dm644 "${srcdir}"/renderd.sysusers "${pkgdir}"/usr/lib/sysusers.d/renderd.conf
install -Dm644 "${srcdir}"/renderd.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/renderd.conf
# License
install -Dm644 "${srcdir}"/mod_tile/COPYING "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE
# "/var/cache/renderd/tiles" & "/run/renderd" will be handled by "renderd.tmpfiles"
# "/etc/httpd" & "/usr/lib/httpd" are contained in "mod_tile" package
pushd "${pkgdir}" || return
rm -rf etc/httpd run usr/lib/httpd var
}
|