debian/files
debian/pgfincore-*
debian/postgresql-*
+results/
+*.so
+pgfincore*.tar.gz
+09//2011 CΓ©dric Villemain <cedric@2ndQuadrant.fr>
+ * 1.1.1 - Fix Makefile again, as well as debian scripts (VPATH)
+ - Add checks (make installcheck)
+ - Improve .gitignore
+
09/07/2011 CΓ©dric Villemain <cedric@2ndQuadrant.fr>
* 1.1.0 - Fix Makefile and remove the dir sql/ (useless and error prone)
- Fix the printf of int64 by casting to long long int (i386 and
EXTENSION = pgfincore
EXTVERSION = 1.1
+EXTCOMMENT = examine and manage the os buffer cache
MODULES = $(EXTENSION)
-DATA = $(EXTENSION).sql uninstall_$(EXTENSION).sql
DOCS = README.rst
-REGRESS = $(EXTENSION)
PG_CONFIG = pg_config
BUILD_EXTENSION = $(shell $(PG_CONFIG) --version | grep -qE "8\.|9\.0" && echo no || echo yes)
+# Default (no Extension support)
+DATA = $(EXTENSION).sql uninstall_$(EXTENSION).sql
+REGRESS = $(EXTENSION)
+pgf_files := $(DOCS) $(DATA)
+
+# we need to build with Extension support:
ifeq ($(BUILD_EXTENSION),yes)
-all: $(EXTENSION)--$(EXTVERSION).sql
+all: $(EXTENSION)--$(EXTVERSION).sql $(EXTENSION)--unpackaged--$(EXTVERSION).sql
+# this copy the extension.sql to extension--version.sql
$(EXTENSION)--$(EXTVERSION).sql: $(EXTENSION).sql
- cp $< $@
+ cp $< $@
+
+# this build the extension--unpackaged-version.sql from uninstall_extension.sql
+$(EXTENSION)--unpackaged--$(EXTVERSION).sql: uninstall_$(EXTENSION).sql
+ sed 's/DROP /ALTER EXTENSION $(EXTENSION) ADD /' $< > $@
+
+# this build extension.control from extension.control.in
+$(EXTENSION).control: $(EXTENSION).control.in
+ sed 's/EXTVERSION/$(EXTVERSION)/;s/EXTENSION/$(EXTENSION)/;s/EXTCOMMENT/$(EXTCOMMENT)/' $< > $@
DATA = $(EXTENSION)--unpackaged--$(EXTVERSION).sql $(EXTENSION)--$(EXTVERSION).sql
REGRESS = $(EXTENSION).ext
-EXTRA_CLEAN = $(EXTENSION)--$(EXTVERSION).sql
+EXTRA_CLEAN = $(DATA) $(EXTENSION).control
+pgf_files := $(DOCS)
endif
+# Workaround for lack of good VPATH support in pgxs for extension/contrib
+ifdef VPATH
+pgf_files_build:= $(addprefix $(CURDIR)/, $(pgf_files))
+all: $(pgf_files_build)
+$(pgf_files_build): $(CURDIR)/%: $(VPATH)/%
+ cp $< $@
+endif # VPATH
+
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
+++ /dev/null
-usr/lib/postgresql/8.4/lib
-usr/share/postgresql/8.4/contrib
+++ /dev/null
-README.rst
+++ /dev/null
-debian/pgfincore-8.4/pgfincore.so usr/lib/postgresql/8.4/lib
-pgfincore.sql usr/share/postgresql/8.4/contrib
-uninstall_pgfincore.sql usr/share/postgresql/8.4/contrib
+++ /dev/null
-usr/lib/postgresql/9.0/lib
-usr/share/postgresql/9.0/contrib
+++ /dev/null
-README.rst
+++ /dev/null
-debian/pgfincore-9.0/pgfincore.so usr/lib/postgresql/9.0/lib
-pgfincore.sql usr/share/postgresql/9.0/contrib
-uninstall_pgfincore.sql usr/share/postgresql/9.0/contrib
+++ /dev/null
-usr/lib/postgresql/9.1/lib
-usr/share/postgresql/9.1/extension
+++ /dev/null
-README.rst
+++ /dev/null
-debian/pgfincore-9.1/pgfincore.so usr/lib/postgresql/9.1/lib
-debian/pgfincore-9.1/pgfincore*.sql usr/share/postgresql/9.1/extension
-pgfincore--unpackaged--1.1.sql usr/share/postgresql/9.1/extension
-pgfincore.control usr/share/postgresql/9.1/extension
override_dh_auto_install:
# then install each of them
- for v in `pg_buildext supported-versions $(SRCDIR)`; do \
- ls;\
- dh_install -ppostgresql-$$v-$(EXTNAME) ;\
- done
+ +pg_buildext install $(SRCDIR) $(TARGET) postgresql-%v-$(EXTNAME)
orig: clean
cd .. && tar czf $(EXTNAME)_$(PKGVERS).orig.tar.gz $(EXCLUDE) $(EXTNAME)
+++ /dev/null
-
-ALTER EXTENSION pgfincore ADD FUNCTION pgsysconf_pretty();
-ALTER EXTENSION pgfincore ADD FUNCTION pgsysconf();
-
-ALTER EXTENSION pgfincore ADD FUNCTION pgfadvise_willneed(regclass);
-ALTER EXTENSION pgfincore ADD FUNCTION pgfadvise_dontneed(regclass);
-ALTER EXTENSION pgfincore ADD FUNCTION pgfadvise_normal(regclass);
-ALTER EXTENSION pgfincore ADD FUNCTION pgfadvise_sequential(regclass);
-ALTER EXTENSION pgfincore ADD FUNCTION pgfadvise_random(regclass);
-ALTER EXTENSION pgfincore ADD FUNCTION pgfadvise(regclass, text, int);
-
-ALTER EXTENSION pgfincore ADD FUNCTION pgfadvise_loader(regclass, text, int, bool, bool, varbit);
-ALTER EXTENSION pgfincore ADD FUNCTION pgfadvise_loader(regclass, int, bool, bool, varbit);
-
-ALTER EXTENSION pgfincore ADD FUNCTION pgfincore(regclass);
-ALTER EXTENSION pgfincore ADD FUNCTION pgfincore(regclass, bool);
-ALTER EXTENSION pgfincore ADD FUNCTION pgfincore(regclass, text, bool);
-
+++ /dev/null
-# pgfincore extension
-comment = 'examine and manage the os buffer cache'
-default_version = '1.1'
-module_pathname = '$libdir/pgfincore'
-relocatable = true
--- /dev/null
+# EXTENSION extension
+comment = 'EXTCOMMENT'
+default_version = 'EXTVERSION'
+module_pathname = '$libdir/EXTENSION'
+relocatable = true