Permalink
Browse files

Package for 9.1, as an extension, with the upgrading from unpackaged …

…script.
  • Loading branch information...
1 parent 2ce5d32 commit ff36dc372a4c372d754d73490660152efec0c90f @dimitri committed Sep 5, 2011
View
@@ -1,5 +1,6 @@
PKGNAME = prefix
-PKGVERS = 1.1.0
+PKGVERS = $(shell dpkg-parsechangelog | awk -F '[:-]' '/^Version:/ { print substr($$2, 2) }')
+EXTVERS = $(shell awk -F "[= ']" '/default_version/ {print $$5}' prefix.control)
DEBDIR = /tmp/$(PKGNAME)
EXPORT = $(DEBDIR)/export/$(PKGNAME)-$(PKGVERS)
@@ -8,7 +9,7 @@ ARCHIVE= $(DEBDIR)/export/$(PKGNAME)-$(PKGVERS).tar.gz
DEBEXTS= {gz,changes,build,dsc}
MODULES = prefix
-DATA_built = prefix.sql
+DATA = prefix.sql
DOCS = $(wildcard *.txt)
# support for 8.1 which didn't expose PG_VERSION_NUM -- another trick from ip4r
@@ -37,7 +38,7 @@ deb:
rsync -Ca . $(EXPORT)
# get rid of temp and build files
- for n in ".#*" "*~" "build-stamp" "configure-stamp" "prefix.sql" "prefix.so"; do \
+ for n in ".#*" "*~" "build-stamp" "configure-stamp" "prefix.so"; do \
find $(EXPORT) -name "$$n" -print0|xargs -0 rm -f; \
done
@@ -54,6 +55,6 @@ deb:
cp $(EXPORT)/debian/control debian
cp -a $(DEBDIR)/export/*.deb ..
- cp -a $(DEBDIR)/export/$(PKGNAME)[_-]$(PKGVERS)*.$(DEBEXTS) ..
+ find $(DEBDIR)/export -name "*.$(DEBEXTS)" -print0| xargs -0 -I% cp -a % ..
cp -a $(ARCHIVE) ..
cp -a $(ORIG) ..
View
@@ -2,26 +2,12 @@ Source: prefix
Section: database
Priority: extra
Maintainer: Dimitri Fontaine <dim@tapoueh.org>
-Build-Depends: debhelper (>= 7), postgresql-server-dev-all, postgresql-server-dev-8.3, postgresql-server-dev-8.4
+Build-Depends: debhelper (>= 7), postgresql-server-dev-all
Standards-Version: 3.8.3
-Package: postgresql-8.3-prefix
+Package: postgresql-9.1-prefix
Architecture: any
-Depends: ${shlibs:Depends}, postgresql-8.3
-Description: Prefix Range module for PostgreSQL
- This PostgreSQL module provides the prefix_range datatype, which
- allows to index searches such as finding the longest prefix matching
- a telephone number, having prefixes in a table and telephone number
- as a parameter:
- .
- select * from prefixes where prefix @> '0100091234';
- .
- The prefix column has to be of type prefix_range, and any text field
- can get indexed by the provided GiST opclass.
-
-Package: postgresql-8.4-prefix
-Architecture: any
-Depends: ${shlibs:Depends}, postgresql-8.4
+Depends: ${shlibs:Depends}, postgresql-9.1
Description: Prefix Range module for PostgreSQL
This PostgreSQL module provides the prefix_range datatype, which
allows to index searches such as finding the longest prefix matching
View
@@ -2,7 +2,7 @@ Source: prefix
Section: database
Priority: extra
Maintainer: Dimitri Fontaine <dim@tapoueh.org>
-Build-Depends: debhelper (>= 7), postgresql-server-dev-all, postgresql-server-dev-8.3, postgresql-server-dev-8.4
+Build-Depends: debhelper (>= 7), postgresql-server-dev-all
Standards-Version: 3.8.3
Package: postgresql-PGVERSION-prefix
View
@@ -1,4 +1,6 @@
#8.1
-#8.2
-#8.3
+8.2
+8.3
8.4
+9.0
+9.1
@@ -1,2 +1,2 @@
debian/prefix-8.3/prefix.so usr/lib/postgresql/8.3/lib
-debian/prefix-8.3/prefix.sql usr/share/postgresql/8.3/contrib
+prefix.sql usr/share/postgresql/8.3/contrib
@@ -1,2 +1,2 @@
debian/prefix-8.4/prefix.so usr/lib/postgresql/8.4/lib
-debian/prefix-8.4/prefix.sql usr/share/postgresql/8.4/contrib
+prefix.sql usr/share/postgresql/8.4/contrib
@@ -0,0 +1,2 @@
+usr/lib/postgresql/9.0/lib
+usr/share/postgresql/9.0/contrib
@@ -0,0 +1 @@
+README.txt
@@ -0,0 +1,2 @@
+debian/prefix-9.0/prefix.so usr/lib/postgresql/9.0/lib
+prefix.sql usr/share/postgresql/9.0/contrib
@@ -0,0 +1,2 @@
+usr/lib/postgresql/9.1/lib
+usr/share/postgresql/9.1/contrib
@@ -0,0 +1 @@
+README.txt
@@ -0,0 +1,4 @@
+debian/prefix-9.1/prefix.so usr/lib/postgresql/9.1/lib
+prefix.control usr/share/postgresql/9.1/extension
+prefix.sql usr/share/postgresql/9.1/extension
+prefix--unpackaged--1.1.sql usr/share/postgresql/9.1/extension
@@ -0,0 +1 @@
+usr/share/postgresql/9.1/extension/prefix.sql usr/share/postgresql/9.1/extension/prefix--1.1.sql
@@ -0,0 +1,47 @@
+ alter extension prefix add cast(prefix_range as text);
+ alter extension prefix add cast(text as prefix_range);
+ alter extension prefix add function gpr_compress(internal);
+ alter extension prefix add function gpr_consistent(internal,prefix_range,smallint,oid);
+ alter extension prefix add function gpr_consistent(internal,prefix_range,smallint,oid,internal);
+ alter extension prefix add function gpr_decompress(internal);
+ alter extension prefix add function gpr_penalty(internal,internal,internal);
+ alter extension prefix add function gpr_picksplit(internal,internal);
+ alter extension prefix add function gpr_picksplit_jordan(internal,internal);
+ alter extension prefix add function gpr_picksplit_presort(internal,internal);
+ alter extension prefix add function gpr_same(prefix_range,prefix_range,internal);
+ alter extension prefix add function gpr_union(internal,internal);
+ alter extension prefix add function length(prefix_range);
+ alter extension prefix add function prefix_range_cmp(prefix_range,prefix_range);
+ alter extension prefix add function prefix_range_contained_by(prefix_range,prefix_range);
+ alter extension prefix add function prefix_range_contained_by_strict(prefix_range,prefix_range);
+ alter extension prefix add function prefix_range_contains(prefix_range,prefix_range);
+ alter extension prefix add function prefix_range_contains_strict(prefix_range,prefix_range);
+ alter extension prefix add function prefix_range_eq(prefix_range,prefix_range);
+ alter extension prefix add function prefix_range_ge(prefix_range,prefix_range);
+ alter extension prefix add function prefix_range_gt(prefix_range,prefix_range);
+ alter extension prefix add function prefix_range_in(cstring);
+ alter extension prefix add function prefix_range_inter(prefix_range,prefix_range);
+ alter extension prefix add function prefix_range_le(prefix_range,prefix_range);
+ alter extension prefix add function prefix_range_lt(prefix_range,prefix_range);
+ alter extension prefix add function prefix_range_neq(prefix_range,prefix_range);
+ alter extension prefix add function prefix_range_out(prefix_range);
+ alter extension prefix add function prefix_range_overlaps(prefix_range,prefix_range);
+ alter extension prefix add function prefix_range_recv(internal);
+ alter extension prefix add function prefix_range_send(prefix_range);
+ alter extension prefix add function prefix_range(text);
+ alter extension prefix add function prefix_range(text,text,text);
+ alter extension prefix add function prefix_range_union(prefix_range,prefix_range);
+ alter extension prefix add function pr_penalty(prefix_range,prefix_range);
+ alter extension prefix add function text(prefix_range);
+ alter extension prefix add operator class btree_prefix_range_ops using btree;
+ alter extension prefix add operator class gist_prefix_range_ops using gist;
+ alter extension prefix add operator family btree_prefix_range_ops using btree;
+ alter extension prefix add operator family gist_prefix_range_ops using gist;
+ alter extension prefix add operator <=(prefix_range,prefix_range);
+ alter extension prefix add operator <(prefix_range,prefix_range);
+ alter extension prefix add operator =(prefix_range,prefix_range);
+ alter extension prefix add operator |(prefix_range,prefix_range);
+ alter extension prefix add operator @>(prefix_range,prefix_range);
+ alter extension prefix add operator &(prefix_range,prefix_range);
+ alter extension prefix add operator &&(prefix_range,prefix_range);
+ alter extension prefix add type prefix_range;
View
@@ -53,12 +53,12 @@
#ifdef PG_VERSION_NUM
#define PG_MAJOR_VERSION (PG_VERSION_NUM / 100)
#else
-#define PG_MAJOR_VERSION PREFIX_PGVER
+#define PG_MAJOR_VERSION PREFIX_PGVER
#endif
#if PG_MAJOR_VERSION != 801 && PG_MAJOR_VERSION != 802 \
&& PG_MAJOR_VERSION != 803 && PG_MAJOR_VERSION != 804 \
- && PG_MAJOR_VERSION != 900
+ && PG_MAJOR_VERSION != 900 && PG_MAJOR_VERSION != 901
#error "Unknown or unsupported postgresql version"
#endif
View
@@ -0,0 +1,5 @@
+# prefix extension
+comment = 'Prefix Range module for PostgreSQL'
+default_version = '1.1'
+module_pathname = '$libdir/prefix'
+relocatable = true
Oops, something went wrong.

0 comments on commit ff36dc3

Please sign in to comment.