wok-6.x 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 | e2ec3520cf88 |
children | 72a5a0693342 |
files | pgrouting/receipt postgis/receipt |
line diff
1.1 --- a/pgrouting/receipt Wed Mar 07 15:49:31 2018 +0100 1.2 +++ b/pgrouting/receipt Fri Mar 09 08:29:59 2018 +0100 1.3 @@ -30,4 +30,18 @@ 1.4 { 1.5 mkdir -p $fs/usr 1.6 cp -a $install/usr/* $fs/usr 1.7 + sed -i 's|\$libdir|/usr/lib/postgresql|' \ 1.8 + $fs/usr/share/postgresql/extension/*.sql 1.9 } 1.10 + 1.11 +post_install_example() 1.12 +{ 1.13 + database=test 1.14 + chroot "$1/" createdb -U postgres -h localhost $database 1.15 + chroot "$1/" psql -U postgres -U postgres $database <<EOT 1.16 +create extension pgrouting; 1.17 +\q 1.18 +EOT 1.19 + sed 1d $1/usr/share/postgresql/extension/pgrouting--$VERSION.sql | 1.20 + chroot "$1/" psql -U postgres $database 1.21 +}
2.1 --- a/postgis/receipt Wed Mar 07 15:49:31 2018 +0100 2.2 +++ b/postgis/receipt Fri Mar 09 08:29:59 2018 +0100 2.3 @@ -27,3 +27,13 @@ 2.4 cp -a $install/* $fs 2.5 rm -f $fs/usr/bin/shp2pgsql-gui 2.6 } 2.7 + 2.8 +post_install_example() 2.9 +{ 2.10 + database=test 2.11 + chroot "$1/" createdb -U postgres -h localhost $database 2.12 + chroot "$1/" psql -U postgres $database <<EOT 2.13 +create extension postgis; 2.14 +\q 2.15 +EOT 2.16 +}