Revision
38818
Author
landonf@macports.org
Date
2008-07-31 17:41:56 -0700 (Thu, 31 Jul 2008)

Log Message

Also provide a template database that can simply be copied

Modified Paths

Diff

Modified: trunk/dports/databases/spatialite/Portfile (38817 => 38818)


--- trunk/dports/databases/spatialite/Portfile	2008-08-01 00:18:14 UTC (rev 38817)
+++ trunk/dports/databases/spatialite/Portfile	2008-08-01 00:41:56 UTC (rev 38818)
@@ -4,6 +4,7 @@
 
 name			spatialite
 version			2.0
+revision		1
 categories		databases gis
 platforms		darwin
 maintainers		landonf openmaintainer
@@ -12,7 +13,7 @@
 			systems (GIS) that implements the core OpenGIS \
 			specification. It provides SQLite with basic support \
 			for spatial data is intended for lightweight GIS \
-			projects. 
+			projects.
 
 homepage		http://www.gaia-gis.it/spatialite-2.0/
 master_sites		${homepage}
@@ -44,7 +45,11 @@
 }
 
 post-destroot {
-	set dir ${destroot}/${prefix}/share/spatialite
-	file mkdir ${dir}
-	system "gzip -cd ${distpath}/init_spatialite.sql.gz > ${dir}/init_spatialite.sql"
+	# Set up the init SQL
+	set sharedir ${destroot}/${prefix}/share/spatialite
+	file mkdir ${sharedir}
+	system "gzip -cd ${distpath}/init_spatialite.sql.gz > ${sharedir}/init_spatialite.sql"
+
+	# Create a template database
+	system "${destroot}/${prefix}/bin/spatialite ${sharedir}/spatialite.db < ${sharedir}/init_spatialite.sql"
 }