diff --git a/Makefile b/Makefile index c08aa4b..f47529e 100644 --- a/Makefile +++ b/Makefile @@ -27,3 +27,11 @@ release-zip: all DATA = $(wildcard *--*.sql) PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS) + +DEBUILD_ROOT = /tmp/$(EXTENSION) + +deb: release-zip + mkdir -p $(DEBUILD_ROOT) && rm -rf $(DEBUILD_ROOT)/* + unzip ./${EXTENSION}-$(EXTVERSION).zip -d $(DEBUILD_ROOT) + cd $(DEBUILD_ROOT)/${EXTENSION}-$(EXTVERSION) && make -f debian/rules orig + cd $(DEBUILD_ROOT)/${EXTENSION}-$(EXTVERSION) && debuild -us -uc -sa diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..886319c --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +hypopg (1.1.1-1) UNRELEASED; urgency=low + + * Initial release. + + -- Julien Rouhaud Sat, 24 Mar 2018 10:27:33 +0100 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..c8ea42a --- /dev/null +++ b/debian/control @@ -0,0 +1,60 @@ +Source: hypopg +Section: database +Priority: optional +Maintainer: Julien Rouhaud +Standards-Version: 4.1.3 +Build-Depends: debhelper (>=9~), postgresql-server-dev-all (>= 141~) +Homepage: https://hypopg.readthedocs.io/ +Vcs-Browser: https://github.com/hypopg/hypopg +Vcs-Git: https://github.com/hypopg/hypopg.git + +Package: postgresql-9.3-hypopg +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, postgresql-9.3 +Description: PostgreSQL extension adding support for hypothetical indexes. + An hypothetical, or virtual, index is an index that doesn't really exists, and + thus doesn't cost CPU, disk or any resource to create. They're useful to know + if specific indexes can increase performance for problematic queries, since + you can know if PostgreSQL will use these indexes or not without having to + spend resources to create them. + +Package: postgresql-9.4-hypopg +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, postgresql-9.4 +Description: PostgreSQL extension adding support for hypothetical indexes. + An hypothetical, or virtual, index is an index that doesn't really exists, and + thus doesn't cost CPU, disk or any resource to create. They're useful to know + if specific indexes can increase performance for problematic queries, since + you can know if PostgreSQL will use these indexes or not without having to + spend resources to create them. + +Package: postgresql-9.5-hypopg +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, postgresql-9.5 +Description: PostgreSQL extension adding support for hypothetical indexes. + An hypothetical, or virtual, index is an index that doesn't really exists, and + thus doesn't cost CPU, disk or any resource to create. They're useful to know + if specific indexes can increase performance for problematic queries, since + you can know if PostgreSQL will use these indexes or not without having to + spend resources to create them. + +Package: postgresql-9.6-hypopg +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, postgresql-9.6 +Description: PostgreSQL extension adding support for hypothetical indexes. + An hypothetical, or virtual, index is an index that doesn't really exists, and + thus doesn't cost CPU, disk or any resource to create. They're useful to know + if specific indexes can increase performance for problematic queries, since + you can know if PostgreSQL will use these indexes or not without having to + spend resources to create them. + +Package: postgresql-10-hypopg +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, postgresql-10 +Description: PostgreSQL extension adding support for hypothetical indexes. + An hypothetical, or virtual, index is an index that doesn't really exists, and + thus doesn't cost CPU, disk or any resource to create. They're useful to know + if specific indexes can increase performance for problematic queries, since + you can know if PostgreSQL will use these indexes or not without having to + spend resources to create them. + diff --git a/debian/control.in b/debian/control.in new file mode 100644 index 0000000..24fb783 --- /dev/null +++ b/debian/control.in @@ -0,0 +1,19 @@ +Source: hypopg +Section: database +Priority: optional +Maintainer: Julien Rouhaud +Standards-Version: 4.1.3 +Build-Depends: debhelper (>=9~), postgresql-server-dev-all (>= 141~) +Homepage: https://hypopg.readthedocs.io/ +Vcs-Browser: https://github.com/hypopg/hypopg +Vcs-Git: https://github.com/hypopg/hypopg.git + +Package: postgresql-PGVERSION-hypopg +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, postgresql-PGVERSION +Description: PostgreSQL extension adding support for hypothetical indexes. + An hypothetical, or virtual, index is an index that doesn't really exists, and + thus doesn't cost CPU, disk or any resource to create. They're useful to know + if specific indexes can increase performance for problematic queries, since + you can know if PostgreSQL will use these indexes or not without having to + spend resources to create them. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..633a1f0 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,17 @@ +Copyright (c) 2015-2018, Julien Rouhaud + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose, without fee, and without a written agreement is +hereby granted, provided that the above copyright notice and this paragraph and +the following two paragraphs appear in all copies. + +IN NO EVENT SHALL Julien Rouhaud BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF Julien Rouhaud +HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Julien Rouhaud SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND +Julien Rouhaud HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, +ENHANCEMENTS, OR MODIFICATIONS. diff --git a/debian/pgversions b/debian/pgversions new file mode 100644 index 0000000..15a0735 --- /dev/null +++ b/debian/pgversions @@ -0,0 +1 @@ +9.2+ diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..0dd756b --- /dev/null +++ b/debian/rules @@ -0,0 +1,28 @@ +#!/usr/bin/make -f + +PKGVER = $(shell dpkg-parsechangelog | awk -F '[:-]' '/^Version:/ { print substr($$2, 2) }') +EXCLUDE = --exclude-vcs --exclude=debian + +include /usr/share/postgresql-common/pgxs_debian_control.mk + +override_dh_auto_build: + # do nothing + +override_dh_auto_test: + # nothing to do here, upstream tests used, see debian/tests/* + +override_dh_auto_install: + # build all supported versions + +pg_buildext loop postgresql-%v-hypopg + +override_dh_installdocs: + dh_installdocs --all CONTRIBUTORS.md README.md + rm -rvf debian/*/usr/share/doc/postgresql-doc-* + +override_dh_installchangelogs: + dh_installchangelogs CHANGELOG.md upstream + +orig: debian/control clean + cd .. && tar czf hypopg_$(PKGVER).orig.tar.gz $(EXCLUDE) hypopg-$(PKGVER) +%: + dh $@ diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..d3827e7 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +1.0 diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..de2bd67 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,3 @@ +Depends: @, postgresql-server-dev-all, postgresql-contrib-9.3, postgresql-contrib-9.4, postgresql-contrib-9.5, postgresql-contrib-9.6, postgresql-contrib-10 +Tests: installcheck +Restrictions: allow-stderr diff --git a/debian/tests/control.in b/debian/tests/control.in new file mode 100644 index 0000000..6133138 --- /dev/null +++ b/debian/tests/control.in @@ -0,0 +1,3 @@ +Depends: @, postgresql-server-dev-all, postgresql-contrib-PGVERSION +Tests: installcheck +Restrictions: allow-stderr diff --git a/debian/tests/installcheck b/debian/tests/installcheck new file mode 100755 index 0000000..d378813 --- /dev/null +++ b/debian/tests/installcheck @@ -0,0 +1,5 @@ +#!/bin/sh + +set -eu + +pg_buildext installcheck diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..c84bb44 --- /dev/null +++ b/debian/watch @@ -0,0 +1,2 @@ +version=3 +https://github.com/hypopg/hypopg/releases .*/archive/(.*).tar.gz