Receipt for: postgis

source
# SliTaz package receipt.

PACKAGE="postgis"
VERSION="3.3.10"
CATEGORY="misc"
SHORT_DESC="Support for geographic objects to PostgreSQL"
MAINTAINER="erjo@slitaz.org"
LICENSE="GPL2"
WEB_SITE="http://postgis.refractions.net/"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WGET_URL="http://download.osgeo.org/postgis/source/$TARBALL"

DEPENDS="geos proj libpostgresqlclient libxml2 libgdal libpng sqlite"
BUILD_DEPENDS="pkg-config postgresql-dev geos-dev proj-dev libxml2-dev \
gtk+-dev gdal-dev jasper-dev curl-dev libpostgresqlclient tiff sqlite-dev"

# What is the latest version available today?
current_version()
{
	wget -O - $(dirname $WGET_URL) 2>/dev/null | \
	sed "/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
}

# Rules to configure and make the package.
compile_rules()
{
	./configure --with-gui --without-protobuf $CONFIGURE_ARGS \
			&& make -j 1 && make install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	cp -a $install/* $fs
	rm -f $fs/usr/bin/shp2pgsql-gui 
}

post_install_example()
{
	database=test
	chroot "$1/" createdb -U postgres -h localhost $database
	chroot "$1/" psql -U postgres $database <<EOT
create extension postgis;
\q
EOT
}