SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "pgrouting"

# SliTaz package receipt.

PACKAGE="pgrouting"
VERSION="2.6.3"
CATEGORY="misc"
SHORT_DESC="Provide geospatial routing for PostGIS and PostgreSQL."
MAINTAINER="pascal.bellard@slitaz.org"
LICENSE="GPL2"
WEB_SITE="https://pgrouting.org/"

TARBALL="$PACKAGE-$VERSION.tar.gz"
WGET_URL="https://github.com/pgRouting/$PACKAGE/archive/v$VERSION.tar.gz"

DEPENDS="cgal gcc-lib-base gmp libboost-chrono libboost-date-time \
    libboost-system libboost-thread"
BUILD_DEPENDS="cgal-dev cmake gmp-dev libboost-dev libboost-graph-dev \
    libboost-thread-dev libboost-tr1-dev mpfr-dev postgresql-dev"

current_version()
{
    wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \
    sed '/archive.*tar/!d;s|.*/v\(.*\).tar.*|\1|;q'
}

# Rules to configure and make the package.
compile_rules()
{
    sed -i 's/INT2ARRAYOID/1005/' src/common/get_check_data.c

    mkdir build &&
    cd build &&
    cmake .. &&
    make &&
    make install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/usr
    cp -a $install/usr/*    $fs/usr
    sed -i 's|\$libdir|/usr/lib/postgresql|' \
        $fs/usr/share/postgresql/extension/*.sql
}

post_install_example()
{
    database=test
    chroot "$1/" createdb -U postgres -h localhost $database
    chroot "$1/" psql -U postgres -U postgres $database <<EOT
create extension pgrouting;
\q
EOT
    sed 1d $1/usr/share/postgresql/extension/pgrouting--$VERSION.sql |
    chroot "$1/" psql -U postgres $database
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)