summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 31030c87b6fb7604e0f4ad2192611f933f7d7ee3 (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
# Contributor: Marcell Meszaros < marcell.meszaros AT runbox.eu >
# Contributor: SaultDon <sault.don gmail>
# Contributor: Bruno Pagani <archange@archlinux.org>
# Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org
# Contributor: William Rea <sillywilly@gmail.com>

pkgname=postgis-sfcgal
_pkgname=${pkgname%-sfcgal}
pkgver=3.4.2
pkgrel=1
pkgdesc='A spatial database extender for PostgreSQL, with SFCGAL support'
arch=('i686' 'x86_64')
url='https://postgis.net/'
license=(
  'GPL-3.0-or-later'    # PostGIS is GPL-2.0-or-later, but pkg has to be GPL3+ if linked with GPL3+ code like cgal (via sfcgal)
  'LicenseRef-PostGIS'
)
depends=(
  'gcc-libs'
  'gdal'
  'geos'
  'glibc'
  'json-c'
  'libxml2'
  'pcre2'
  'postgresql-libs'
  'proj'
  'protobuf-c'
  'sfcgal'
  'sh'
)
makedepends=(
  'clang'
  'llvm'
  'postgresql'
)
optdepends=('perl: for contrib script postgis_restore.pl')
provides=("${_pkgname}=${pkgver}")
conflicts=(${_pkgname})
source=("https://download.osgeo.org/postgis/source/${_pkgname}-${pkgver}.tar.gz")
b2sums=('30951950ae24ae0e0432658ef09ec95ffcf0ef377f79e45fb302f20b40d773c9d551d4ac2a07eab4f743ebeff2aae4730c8b7c2516c36a17f44a1410fbdc3069')

prepare() {
  cd "${_pkgname}-${pkgver}"
  autoreconf -vfi
}

build() {
  cd "${_pkgname}-${pkgver}"

  ./configure \
    --prefix=/usr \
    --libexecdir="/usr/lib/${_pkgname}" \
    --sysconfdir=/etc \
    --sharedstatedir="/var/lib/${_pkgname}" \
    --localstatedir=/var \
    --enable-static=no \
    --enable-lto \
    --with-sfcgal

  make
}

package() {
  cd "${_pkgname}-${pkgver}"

  make DESTDIR="${pkgdir}" install
  install -Dm644 LICENSE.TXT -t "${pkgdir}/usr/share/licenses/${pkgname}"
}