Skip to content

Commit

Permalink
Prepare PGXN packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
rjuju committed Jul 19, 2015
1 parent f8fd86f commit 3b4499f
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 4 deletions.
42 changes: 42 additions & 0 deletions META.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "pg_track_settings",
"abstract": "A simple extension which keep track of postgresql settings modifications",
"version": "__VERSION__",
"maintainer": "Julien Rouhaud <[email protected]>",
"license": "postgresql",
"release_status": "stable",
"provides": {
"pg_track_settings": {
"abstract": "A simple extension which keep track of postgresql settings modifications",
"file": "pg_track_settings.sql",
"docfile": "README.md",
"version": "__VERSION__"
}
},
"resources": {
"bugtracker": {
"web": "http://github.com/rjuju/pg_track_settings/issues/"
},
"repository": {
"url": "git://github.com/rjuju/pg_track_settings.git",
"web": "http://github.com/rjuju/pg_track_settings/",
"type": "git"
}
},
"prereqs": {
"runtime": {
"requires": {
"PostgreSQL": "9.1.0"
}
}
},
"generated_by": "Julien Rouhaud",
"meta-spec": {
"version": "1.0.0",
"url": "http://pgxn.org/meta/spec.txt"
},
"tags": [
"monitoring",
"administration"
]
}
27 changes: 23 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
EXTENSION = pg_track_settings
DATA = pg_track_settings--1.0.sql
EXTENSION = pg_track_settings
EXTVERSION = $(shell grep default_version $(EXTENSION).control | sed -e "s/default_version[[:space:]]*=[[:space:]]*'\([^']*\)'/\1/")
TESTS = $(wildcard test/sql/*.sql)
REGRESS = $(patsubst test/sql/%.sql,%,$(TESTS))
REGRESS_OPTS = --inputdir=test
DOCS = $(wildcard README.md)

DATA = $(wildcard *--*.sql)

PG_CONFIG = pg_config
PGXS = $(shell $(PG_CONFIG) --pgxs)

PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)


all:

release-zip: all
git archive --format zip --prefix=${EXTENSION}-${EXTVERSION}/ --output ./${EXTENSION}-${EXTVERSION}.zip HEAD
unzip ./${EXTENSION}-$(EXTVERSION).zip
rm ./${EXTENSION}-$(EXTVERSION).zip
rm ./${EXTENSION}-$(EXTVERSION)/.gitignore
sed -i -e "s/__VERSION__/$(EXTVERSION)/g" ./${EXTENSION}-$(EXTVERSION)/META.json
zip -r ./${EXTENSION}-$(EXTVERSION).zip ./${EXTENSION}-$(EXTVERSION)/
rm ./${EXTENSION}-$(EXTVERSION) -rf

0 comments on commit 3b4499f

Please sign in to comment.