the Fink project is an effort to port
popular Unix programs to Mac OS X
Info4: <<
Package: postgis%type_pkg[postgresql]
Version: 1.5.1
Revision: 2
Distribution: 10.4, 10.5, 10.6
Description: PostgreSQL geographic object support
Type: postgresql (8.0 8.1 8.2)
License: BSD
Maintainer: Benjamin Reed
Depends: <<
libgeos3.2.0-shlibs (>= 3.2.0-4),
libxml2-shlibs,
(%type_raw[postgresql] <= 8.0) postgresql%type_pkg[postgresql]-unified-shlibs,
(%type_raw[postgresql] >= 8.1) postgresql%type_pkg[postgresql]-shlibs,
proj-shlibs
<<
BuildDepends: <<
fink (>= 0.30.0-1),
jts,
libgeos3.2.0 (>= 3.2.0-4),
libiconv-dev,
libxml2,
(%type_raw[postgresql] <= 8.0) postgresql%type_pkg[postgresql]-unified-dev,
(%type_raw[postgresql] >= 8.1) postgresql%type_pkg[postgresql]-dev,
postgresql-java (>= %type_raw[postgresql]-1),
proj,
system-openssl-dev,
system-java (>= 1.5-1)
<<
Replaces: postgresql%type_pkg[postgresql]
GCC: 4.0
Source: http://postgis.refractions.net/download/postgis-%v.tar.gz
Source-MD5: 8353b38c38282b2192f01693f71b8d28
PatchScript: sed -e 's,@FINKPREFIX@,%p,g; s,@FINKPGRAWVERSION@,%type_raw[postgresql],g; s,@FINKPGVERSION@,%type_pkg[postgresql],g' %{PatchFile} | patch -p1
PatchFile: postgis-%v.patch
PatchFile-MD5: 5ac5c298bfaba1bf4b2a5eed4d2e6cf5
SetCPPFLAGS: -I%p/include/postgresql -I%p/include -fno-common
NoSetCPPFLAGS: true
NoSetLDFLAGS: true
UseMaxBuildJobs: true
ConfigureParams: --with-pgconfig=%p/bin/pg_config-%type_raw[postgresql] --with-geosconfig=%p/opt/libgeos3.2.0/bin/geos-config --with-projdir=%p --with-xml2config=%p/bin/xml2-config
CompileScript: <<
#!/bin/sh -ev
export lt_cv_sys_max_cmd_len=65536 PGCONFIG=%p/bin/pg_config-%type_raw[postgresql]
export CPPFLAGS="-I%p/lib/system-openssl/include -DHAVE_OPTRESET -fno-common"
export LDFLAGS="-L%p/lib/system-openssl/lib"
export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home"
export PATH="/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/bin:$PATH"
./configure %c
make libdir="%p/lib/postgresql-%type_raw[postgresql]" LPATH="%p/lib/postgresql-%type_raw[postgresql]"
pushd java/jdbc
make
popd
<<
InstallScript: <<
#!/bin/sh -ev
make -j1 install DESTDIR=%d libdir=%p/lib/postgresql-%type_raw[postgresql] LPATH="%p/lib/postgresql-%type_raw[postgresql]" datadir=%p/share/doc/%N
for file in pgsql2shp shp2pgsql; do
mv %i/bin/$file %i/bin/$file-%type_raw[postgresql]
done
<<
DocFiles: COPYING CREDITS ChangeLog NEWS README* TODO
SplitOff: <<
Package: %N-java
Depends: <<
jts,
postgresql-java (>= %type_raw[postgresql]-1)
<<
JarFiles: java/jdbc/postgis.jar java/pljava/postgis_pljava.jar
<<
PostInstScript: <<
for file in pgsql2shp shp2pgsql; do
%p/sbin/update-alternatives --install "%p/bin/$file" "$file" "%p/bin/$file-%type_raw[postgresql]" %type_pkg[postgresql]
done
# obsolete, from the old package
for file in createdb.postgis mktemplate_gis mktemplate_gis.sh postgis_env.sh postgres_lib.sh rmtemplate_gis rmtemplate_gis.sh; do
%p/sbin/update-alternatives --remove "$file" "%p/bin/$file-%type_raw[postgresql]"
done
for file in createdb.postgis.1 mktemplate_gis.1 rmtemplate_gis.1; do
%p/sbin/update-alternatives --remove "$file" "%p/bin/$file-%type_raw[postgresql]"
done
%p/sbin/update-alternatives --remove "postgis-default" "%p/etc/%N"
cat <
your database!
If this is the first time you're using PostGIS in a particular database,
you must install the schema like so:
sudo %p/bin/pgsql.sh-%type_raw[postgresql] start
sudo -u postgres %p/bin/psql-%type_raw[postgresql] -f %p/share/doc/%N/contrib/postgis-1.5/postgis.sql -d
If you are upgrading your database from a previous PostGIS version, you
need to upgrade the schema like so:
sudo %p/bin/pgsql.sh-%type_raw[postgresql] start
sudo -u postgres %p/bin/psql-%type_raw[postgresql] -f %p/share/doc/%N/contrib/postgis-1.5/postgis_upgrade_XX_to_15.sql -d
EOF
<<
PreRmScript: <<
if [ "$1" != "upgrade" ]; then
for file in pgsql2shp shp2pgsql; do
%p/sbin/update-alternatives --remove "$file" "%p/bin/$file-%type_raw[postgresql]"
done
fi
<<
Homepage: http://postgis.refractions.net/
DescDetail: <<
PostGIS adds support for geographic objects to the PostgreSQL
object-relational database. In effect, PostGIS "spatially enables" the
PostgreSQL server, allowing it to be used as a backend spatial database for
geographic information systems (GIS), much like ESRI's SDE or Oracle's Spatial
extension. PostGIS follows the OpenGIS "Simple Features Specification for
SQL" and has been certified as compliant with the "Types and Functions"
profile.
<<
DescUsage: <<
Note: This package does not do anything until you add it's schema to
your database!
If this is the first time you're using PostGIS in a particular database,
you must install the schema like so:
sudo %p/bin/pgsql.sh-%type_raw[postgresql] start
sudo -u postgres %p/bin/psql-%type_raw[postgresql] \
-f %p/share/doc/%N/contrib/postgis-1.5/postgis.sql \
-d
If you are upgrading your database from a previous PostGIS version, you
need to upgrade the schema like so:
sudo %p/bin/pgsql.sh-%type_raw[postgresql] start
sudo -u postgres %p/bin/psql-%type_raw[postgresql] \
-f %p/share/doc/%N/contrib/postgis-1.5/postgis_upgrade_XX_to_15.sql \
-d
<<
<<
diff -Nurd postgis-1.5.1/postgis/Makefile.in postgis-1.5.1-new/postgis/Makefile.in
--- postgis-1.5.1/postgis/Makefile.in 2010-01-08 17:48:29.000000000 -0500
+++ postgis-1.5.1-new/postgis/Makefile.in 2010-03-19 15:35:41.000000000 -0400
@@ -68,8 +68,8 @@
# to an existing liblwgeom.so in the PostgreSQL $libdir supplied by an
# older version of PostGIS, rather than with the static liblwgeom.a
# supplied with newer versions of PostGIS
-PG_CPPFLAGS+=@CPPFLAGS@ -I../liblwgeom
-SHLIB_LINK+=@SHLIB_LINK@ ../liblwgeom/liblwgeom.a
+PG_CPPFLAGS+=@CPPFLAGS@ @PGSQL_FE_CPPFLAGS@ -I../liblwgeom
+SHLIB_LINK+=@SHLIB_LINK@ @PGSQL_FE_LDFLAGS@ ../liblwgeom/liblwgeom.a
# Extra files to remove during 'make clean'
EXTRA_CLEAN=$(SQL_OBJS)