From: Cédric Villemain Date: Fri, 7 Aug 2009 22:37:16 +0000 (+0200) Subject: installation script ok X-Git-Tag: 0.2~4 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=5dedf221f20b6e935b4777761843fc14def82b5a;p=pgfincore.git installation script ok --- diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..67fd97f --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +MODULES = pgfincore +DATA_built = pgfincore.sql uninstall_pgfincore.sql +DOCS = README.pgfincore + +#PG_LIBS = -lpgfincore +#SHLIBS_LINK = -lpgfincore + +#PGXS := $(shell pg_config --pgxs) +PGXS = /usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/pgxs.mk +include $(PGXS) diff --git a/configure b/configure index c316ba9..1c68a3b 100755 --- a/configure +++ b/configure @@ -1,25 +1,14 @@ #!/bin/sh -echo "MODULES = pgfincore" > ./Makefile PG_VER=`pg_config --version|awk '{print $2}'` -PG_VER=8.3.0 +PG_VER=8.4.0 + if [[ ($PG_VER < '8.4.0') ]] then - echo "DATA_built = pgfincore_83.sql" >> ./Makefile - echo "DATA = uninstall_pgfincore_83.sql" >> ./Makefile + cp ./pgfincore_83.sql.in ./pgfincore.sql.in + cp ./uninstall_pgfincore_83.sql.in ./uninstall_pgfincore.sql.in else - echo "DATA_built = pgfincore_84.sql" >> ./Makefile - echo "DATA = uninstall_pgfincore_84.sql" >> ./Makefile + cp ./pgfincore_84.sql.in ./pgfincore.sql.in + cp ./uninstall_pgfincore_84.sql.in ./uninstall_pgfincore.sql.in fi -cat <> ./Makefile -DOCS = README.pgfincore -REGRESS = pgfincore - -PG_LIBS = -lpgfincore -SHLIBS_LINK = -lpgfincore -# PG_CPPFLAGS = -lpgfincore - -PGXS := \$(shell pg_config --pgxs) -include \$(PGXS) -EOF diff --git a/pgfincore_83.sql.in b/pgfincore_83.sql.in index e2707e1..82dd539 100644 --- a/pgfincore_83.sql.in +++ b/pgfincore_83.sql.in @@ -2,7 +2,7 @@ SET search_path = public; CREATE OR REPLACE FUNCTION pgfincore(TEXT) RETURNS bigint -AS 'MODULE_PATHNAME','pgfincore_name' +AS 'MODULE_PATHNAME' LANGUAGE C; CREATE OR REPLACE FUNCTION pgfincore(OID) diff --git a/pgfincore_84.sql.in b/pgfincore_84.sql.in index 70b716b..b3b9e19 100644 --- a/pgfincore_84.sql.in +++ b/pgfincore_84.sql.in @@ -1,8 +1,8 @@ SET search_path = public; -CREATE OR REPLACE FUNCTION pgfincore(regclass, TEXT) +CREATE OR REPLACE FUNCTION pgfincore(regclass, text) RETURNS bigint -AS 'MODULE_PATHNAME/pgfincore','pgfincore' +AS 'MODULE_PATHNAME' LANGUAGE C; CREATE OR REPLACE FUNCTION pgfincore(regclass) diff --git a/uninstall_pgfincore_83.sql b/uninstall_pgfincore_83.sql.in similarity index 100% rename from uninstall_pgfincore_83.sql rename to uninstall_pgfincore_83.sql.in diff --git a/uninstall_pgfincore_84.sql b/uninstall_pgfincore_84.sql.in similarity index 100% rename from uninstall_pgfincore_84.sql rename to uninstall_pgfincore_84.sql.in