Skip to content

Commit

Permalink
Continue to adapt packaging to upcoming new toolset from postgresql-c…
Browse files Browse the repository at this point in the history
…ommon.
  • Loading branch information
dimitri committed Jan 11, 2010
1 parent eb67ed4 commit 6561789
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 9 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ deb:
cp $(ORIG) $(ARCHIVE)

# build the debian package and copy them to ..
(cd $(EXPORT) && debuild)
(cd $(EXPORT) && touch debian/control.in && debuild)

cp $(EXPORT)/debian/control debian
cp -a $(DEBDIR)/export/*.deb ..
cp -a $(DEBDIR)/export/$(PKGNAME)[_-]$(PKGVERS)*.$(DEBEXTS) ..
cp -a $(ARCHIVE) ..
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
prefix (1.1.0-2) unstable; urgency=low

* Support pgversions and pgxs_debian_control (Closes: #559610)

-- Dimitri Fontaine <dim@tapoueh.org> Mon, 11 Jan 2010 12:28:34 +0100

prefix (1.1.0-1) unstable; urgency=high

* Fix Btree opclass for supporting sub-ranges
Expand Down
3 changes: 2 additions & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: prefix
Section: database
Priority: extra
Maintainer: Dimitri Fontaine <dim@tapoueh.org>
Build-Depends: debhelper (>= 7), postgresql-dev-common, postgresql-server-dev-8.3, postgresql-server-dev-8.4
Build-Depends: debhelper (>= 7), postgresql-server-dev-all, postgresql-server-dev-8.3, postgresql-server-dev-8.4
Standards-Version: 3.8.3

Package: postgresql-8.3-prefix
Expand Down Expand Up @@ -32,3 +32,4 @@ Description: Prefix Range module for PostgreSQL
.
The prefix column has to be of type prefix_range, and any text field
can get indexed by the provided GiST opclass.

20 changes: 20 additions & 0 deletions debian/control.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
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
Standards-Version: 3.8.3

Package: postgresql-PGVERSION-prefix
Architecture: any
Depends: ${shlibs:Depends}, postgresql-PGVERSION
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.
4 changes: 4 additions & 0 deletions debian/pgversions
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#8.1
#8.2
#8.3
8.4
17 changes: 10 additions & 7 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/make -f

include /usr/share/postgresql-common/pgxs_debian_control.mk

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
Expand All @@ -9,13 +11,12 @@ endif
SRCDIR = $(CURDIR)
TARGET = $(CURDIR)/debian/prefix-%v

build:
build: debian/control

clean:
dh_testdir
dh_testroot
pg_buildext clean $(SRCDIR) $(TARGET) 8.3 "$(CFLAGS)"
pg_buildext clean $(SRCDIR) $(TARGET) 8.4 "$(CFLAGS)"
pg_buildext clean $(SRCDIR) $(TARGET) "$(CFLAGS)"
dh_clean

install: build
Expand All @@ -24,11 +25,13 @@ install: build
dh_prep
dh_installdirs

pg_buildext build $(SRCDIR) $(TARGET) 8.3 "$(CFLAGS)" && \
dh_install -ppostgresql-8.3-prefix || echo "skipping 8.3"
# build all supported version
pg_buildext build $(SRCDIR) $(TARGET) "$(CFLAGS)"

pg_buildext build $(SRCDIR) $(TARGET) 8.4 "$(CFLAGS)" && \
dh_install -ppostgresql-8.4-prefix || echo "skipping 8.4"
# then install each of them
for v in `pg_buildext supported-versions $(SRCDIR)`; do \
dh_install -ppostgresql-$$v-prefix ;\
done

binary-indep: build install
binary-arch: build install
Expand Down

0 comments on commit 6561789

Please sign in to comment.