wok annotate pgrouting/receipt @ rev 20237

postgis, pgrouting: add post_install_example
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Mar 09 08:29:59 2018 +0100 (2018-03-09)
parents 8570053d906b
children b5be5be4609a
rev   line source
pascal@16725 1 # SliTaz package receipt.
pascal@16725 2
pascal@16725 3 PACKAGE="pgrouting"
pascal@19906 4 VERSION="2.4.1"
pascal@16725 5 CATEGORY="misc"
pascal@16725 6 SHORT_DESC="provide geospatial routing for PostGIS / PostgreSQL."
pascal@16725 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@16725 8 LICENSE="GPL2"
pascal@16725 9 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@16725 10 WEB_SITE="http://pgrouting.org/"
pascal@16725 11 WGET_URL="https://codeload.github.com/pgRouting/pgrouting/tar.gz/v$VERSION"
pascal@16725 12
pascal@20229 13 DEPENDS="gcc-lib-base cgal gmp libboost-thread libboost-system \
pascal@20229 14 boost-chrono boost-date-time"
pascal@16725 15 BUILD_DEPENDS="wget cmake postgresql-dev libboost-dev cgal-dev gmp-dev \
pascal@19802 16 mpfr-dev libboost-graph-dev libboost-thread-dev libboost-tr1-dev"
pascal@16725 17
pascal@16725 18 # Rules to configure and make the package.
pascal@16725 19 compile_rules()
pascal@16725 20 {
pascal@16725 21 mkdir build
pascal@16725 22 cd build
pascal@16725 23 cmake -DWITH_DD=ON ..
pascal@16725 24 make
pascal@16725 25 make install
pascal@16725 26 }
pascal@16725 27
pascal@16725 28 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@16725 29 genpkg_rules()
pascal@16725 30 {
pascal@16725 31 mkdir -p $fs/usr
pascal@16725 32 cp -a $install/usr/* $fs/usr
pascal@20237 33 sed -i 's|\$libdir|/usr/lib/postgresql|' \
pascal@20237 34 $fs/usr/share/postgresql/extension/*.sql
pascal@16725 35 }
pascal@20237 36
pascal@20237 37 post_install_example()
pascal@20237 38 {
pascal@20237 39 database=test
pascal@20237 40 chroot "$1/" createdb -U postgres -h localhost $database
pascal@20237 41 chroot "$1/" psql -U postgres -U postgres $database <<EOT
pascal@20237 42 create extension pgrouting;
pascal@20237 43 \q
pascal@20237 44 EOT
pascal@20237 45 sed 1d $1/usr/share/postgresql/extension/pgrouting--$VERSION.sql |
pascal@20237 46 chroot "$1/" psql -U postgres $database
pascal@20237 47 }