Author: nd-guest Date: 2007-10-22 14:43:19 +0000 (Mon, 22 Oct 2007) New Revision: 1239
Added: packages/debian-gis/hooks/ packages/debian-gis/hooks/10-default packages/debian-gis/hooks/20-osm Log: Add hook dir. 10-defaults executes deborphan and updatedb. 20-osm imports planet-osm data into an postgres db Added: packages/debian-gis/hooks/10-default =================================================================== --- packages/debian-gis/hooks/10-default (rev 0) +++ packages/debian-gis/hooks/10-default 2007-10-22 14:43:19 UTC (rev 1239) @@ -0,0 +1,10 @@ +#! /bin/sh + +echo "Executing $0" +wallpaper=/root/debiangis_wallpaper.png + +# run deborphan +aptitude remove --purge $(deborphan) + +# run updatedb +updatedb Added: packages/debian-gis/hooks/20-osm =================================================================== --- packages/debian-gis/hooks/20-osm (rev 0) +++ packages/debian-gis/hooks/20-osm 2007-10-22 14:43:19 UTC (rev 1239) @@ -0,0 +1,29 @@ +#! /bin/sh +# Populate postgres with osm planet data + +echo "Executing $0" + +planet=/root/planet-latest.osm.bz2 + +if [ ! -f "$planet" ]; then + echo "No planet file found!" + exit 1 +fi +if [ ! -x /usr/bin/osm2pgsql ]; then + echo "osm2pgsql not installed!" + exit 1 +fi + +/etc/init.d/postgresql-8.2 start +sudo -u postgres createuser -Upostgres -S -D -R gis +sudo -u postgres createdb -Upostgres -EUNICODE gis +echo GRANT ALL ON SCHEMA PUBLIC TO gis | sudo -u postgres psql -Upostgres gis +sudo -u postgres createlang -Upostgres plpgsql gis +sudo -u postgres psql gis < /usr/share/postgresql-8.2-postgis/lwpostgis.sql +echo GRANT ALL ON geometry_columns TO gis | sudo -u postgres psql -Upostgres gis +echo GRANT ALL ON spatial_ref_sys TO gis | sudo -u postgres psql -Upostgres gis +sudo -u postgres /usr/bin/osm2pgsql $planet +/etc/init.d/postgresql-8.2 stop +rm -f "$planet" + + _______________________________________________ Pkg-grass-devel mailing list Pkg-grass-devel@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/pkg-grass-devel