Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
Build using the set of provided patches instead of via the postgresql
Browse files Browse the repository at this point in the history
source tree.
  • Loading branch information
perltrustly committed Aug 11, 2014
1 parent 31c210b commit 8ef4df9
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 470 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MAKE_BANKAPI=$(MAKE) -f debian/bankapi/rules
MAKE_POSTGRES=$(MAKE) -f debian/postgresql-pgcrypto-signatures/rules
MAKE_POSTGRES=$(MAKE) -f debian/postgresql-pgcrypto-openpgp/rules

all: deb

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ installation:
pg\_hba.conf file: local www-data bankapi peer
- To optionally install the test bank data: sudo -u postgres psql --dbname=bankapi --single-transaction --no-psqlrc --file=testdata/index.sql

### postgresql-pgcrypto-signatures-9.3.deb
### postgresql-pgcrypto-openpgp-9.3.deb

This is an extension to the pgcrypto PostgreSQL extension. The extension only
installs with the extended functions, all functions normally in pgcrypto is
still accessed from the standard pgcrypto extension. The extension is called
pgcrypto\_signatures.
pgcrypto\_openpgp.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

VERSION=1.2-1
PGVERSION=$$(pg_config --version | sed 's/.* //' | cut -f1-2 -d.)
PACKAGE=postgresql-pgcrypto-signatures-$(PGVERSION)
PACKAGE=postgresql-pgcrypto-openpgp-$(PGVERSION)
ROOT=$(PWD)
DEBIAN=$(ROOT)/debian/postgresql-pgcrypto-signatures
DEBIAN=$(ROOT)/debian/postgresql-pgcrypto-openpgp
PACKAGEDIR=$(ROOT)/$(PACKAGE)-$(VERSION)
BUILDDIR=$(ROOT)/$(PACKAGE)-$(VERSION)-build
CP=cp -p
Expand All @@ -17,16 +17,16 @@ build: clean
mkdir -p "$(PACKAGEDIR)" \
"$(PACKAGEDIR)/DEBIAN"
mkdir -p "$(BUILDDIR)"
if [ ! -e "$(ROOT)/postgres/.git" ]; then \
git submodule update --init; \
fi
tar -C postgres -cf - --exclude=.git . | tar -C "$(BUILDDIR)" -xf -
(cd "$(BUILDDIR)"; patch -t -p1 < "$(DEBIAN)/000-build.patch")
(cd "$(BUILDDIR)"; patch -t -p1 < "$(DEBIAN)/001-disablefunctions.patch")
(cd "$(BUILDDIR)/contrib/pgcrypto"; USE_PGXS=1 $(MAKE))
perl -p -i -e 's/pgcrypto/pgcrypto_signatures/' "$(BUILDDIR)/contrib/pgcrypto/pgcrypto.control" "$(BUILDDIR)/contrib/pgcrypto/pgcrypto--1.2.sql"
(cd "$(BUILDDIR)/contrib/pgcrypto"; USE_PGXS=1 $(MAKE) DESTDIR=$(PACKAGEDIR) install)
(cd "$(PACKAGEDIR)"; find . -type f -name "*pgcrypto*" -exec rename 's/pgcrypto/pgcrypto_signatures/' '{}' \;)
(cd "$(BUILDDIR)"; apt-get source postgresql-contrib-$(PGVERSION))
(cd "$(BUILDDIR)" ; \
set -e; \
cd */contrib/pgcrypto; \
for file in $$(ls $(DEBIAN)/patches/* | sort -n); do \
patch -t -p1 < "$$file"; \
done; \
$(MAKE); \
$(MAKE) DESTDIR=$(PACKAGEDIR) install ; \
)

install:

Expand Down
12 changes: 0 additions & 12 deletions debian/postgresql-pgcrypto-signatures/000-build.patch

This file was deleted.

Loading

0 comments on commit 8ef4df9

Please sign in to comment.