blob: 0bb72114f488d068ad38aa2b35e764e287e4ef84 (
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
|
# Contributor: Calimero <calimeroteknik@free.fr>
# Contributor: jerry73204 <jerry73204@gmail.com>
# Maintainer: David Hummel <david dot hummel at gmail point com>
pkgname=('mod_tile-git' 'renderd-git')
pkgver=0.7.0.r43.g4f04956
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=('ceph-libs: RADOS tile storage support'
'libmemcached: Memcached tile storage support')
makedepends=('apache' 'apr' 'boost' 'cairo' 'cmake' 'git' 'glib2' 'iniparser' 'mapnik')
checkdepends=('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() {
# Override VERSION with ${pkgver}
sed -i 's/@VERSION@/'${pkgver}'/g' mod_tile/includes/config.h.in
}
build() {
export CMAKE_BUILD_PARALLEL_LEVEL=${CMAKE_BUILD_PARALLEL_LEVEL:-$(nproc)}
cmake -B build -S mod_tile \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_RUNSTATEDIR=/run \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DENABLE_TESTS:BOOL=ON
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' 'cairo' 'curl' 'glib2')
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
cd "$pkgdir" || return
rm -rf etc/renderd.conf usr/bin usr/share/man var
}
package_renderd-git() {
conflicts=('renderd')
backup=('etc/renderd.conf')
depends=('cairo' 'curl' '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
cd "$pkgdir" || return
rm -rf var etc/httpd usr/lib/httpd
}
|