diff options
author | David Naylor <dbn@FreeBSD.org> | 2018-12-15 03:39:38 +0800 |
---|---|---|
committer | David Naylor <dbn@FreeBSD.org> | 2018-12-15 03:39:38 +0800 |
commit | e073560dba5feb5a1148f1f094f9dde1abd5c4e3 (patch) | |
tree | 4007af04062b6d0c5a9682e8861d3625182b7edd /databases | |
parent | 44612da7b9df1b71c9a85f823214c732a545f96b (diff) | |
download | freebsd-ports-gnome-e073560dba5feb5a1148f1f094f9dde1abd5c4e3.tar.gz freebsd-ports-gnome-e073560dba5feb5a1148f1f094f9dde1abd5c4e3.tar.zst freebsd-ports-gnome-e073560dba5feb5a1148f1f094f9dde1abd5c4e3.zip |
databases/portsgresql-prefix: Prefix Range module for PostgreSQL
Diffstat (limited to 'databases')
-rw-r--r-- | databases/Makefile | 1 | ||||
-rw-r--r-- | databases/postgresql-prefix/Makefile | 28 | ||||
-rw-r--r-- | databases/postgresql-prefix/distinfo | 3 | ||||
-rw-r--r-- | databases/postgresql-prefix/files/patch-Makefile | 10 | ||||
-rw-r--r-- | databases/postgresql-prefix/pkg-descr | 13 | ||||
-rw-r--r-- | databases/postgresql-prefix/pkg-plist | 7 |
6 files changed, 62 insertions, 0 deletions
diff --git a/databases/Makefile b/databases/Makefile index 64c48b05f5f2..4aea66e71d59 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -710,6 +710,7 @@ SUBDIR += postgresql-plproxy SUBDIR += postgresql-plruby SUBDIR += postgresql-plv8js + SUBDIR += postgresql-prefix SUBDIR += postgresql-relay SUBDIR += postgresql-repmgr SUBDIR += postgresql-tds_fdw diff --git a/databases/postgresql-prefix/Makefile b/databases/postgresql-prefix/Makefile new file mode 100644 index 000000000000..c45c84f58a86 --- /dev/null +++ b/databases/postgresql-prefix/Makefile @@ -0,0 +1,28 @@ +# $FreeBSD$ + +PORTNAME= prefix +PORTVERSION= 1.2.8 +DISTVERSIONPREFIX= v +CATEGORIES= databases +PKGNAMEPREFIX= postgresql${PGSQL_VER:S/.//}- + +MAINTAINER= lbartoletti@tuxfamily.org +COMMENT= Prefix Range module for PostgreSQL + +LICENSE= PostgreSQL + +USES= gmake pgsql:9.1+ +WANT_PGSQL= server +USE_GITHUB= yes +GH_ACCOUNT= dimitri + +OPTIONS_DEFINE= DOCS + +post-install: + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/postgresql/prefix.so + +post-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + (cd ${WRKSRC} ; ${INSTALL_DATA} README.md TESTS.md ${STAGEDIR}${DOCSDIR}) + +.include <bsd.port.mk> diff --git a/databases/postgresql-prefix/distinfo b/databases/postgresql-prefix/distinfo new file mode 100644 index 000000000000..ce71aaeec175 --- /dev/null +++ b/databases/postgresql-prefix/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1537990947 +SHA256 (dimitri-prefix-v1.2.8_GH0.tar.gz) = db568a543cddfd5542e6e34c9ed804d842151667897b13657ca9954bf2fe115c +SIZE (dimitri-prefix-v1.2.8_GH0.tar.gz) = 74974 diff --git a/databases/postgresql-prefix/files/patch-Makefile b/databases/postgresql-prefix/files/patch-Makefile new file mode 100644 index 000000000000..027ae3484fae --- /dev/null +++ b/databases/postgresql-prefix/files/patch-Makefile @@ -0,0 +1,10 @@ +--- Makefile.orig 2018-09-26 20:01:05 UTC ++++ Makefile +@@ -2,7 +2,6 @@ PKGNAME = prefix + EXTENSION = prefix + MODULES = prefix + DATA = prefix--1.2.0.sql prefix--unpackaged--1.2.0.sql prefix--1.1--1.2.0.sql +-DOCS = $(wildcard *.md) + # "explain (costs off)" needs 9.0+ (and 9.0 needs expected/explain_1.out) + EXPLAINSQL = $(shell $(PG_CONFIG) --version | grep -qE " 8\." || echo explain) + REGRESS = create_extension prefix falcon $(EXPLAINSQL) queries diff --git a/databases/postgresql-prefix/pkg-descr b/databases/postgresql-prefix/pkg-descr new file mode 100644 index 000000000000..e3ed0a5b038c --- /dev/null +++ b/databases/postgresql-prefix/pkg-descr @@ -0,0 +1,13 @@ +Prefix matching is both very common and important in telephony applications, +where call routing and costs depend on matching caller/callee phone number +to an operator prefix. + +Let's say the prefixes table is called prefixes, a typical query will try to +match a phone number to the longest prefix in the table: + +SELECT * + FROM prefixes + WHERE prefix @> '0123456789' +ORDER BY length(prefix) DESC LIMIT 1; + +WWW: https://github.com/dimitri/prefix diff --git a/databases/postgresql-prefix/pkg-plist b/databases/postgresql-prefix/pkg-plist new file mode 100644 index 000000000000..1a37f0c0b4f4 --- /dev/null +++ b/databases/postgresql-prefix/pkg-plist @@ -0,0 +1,7 @@ +lib/postgresql/prefix.so +%%PORTDOCS%%%%DOCSDIR%%/README.md +%%PORTDOCS%%%%DOCSDIR%%/TESTS.md +share/postgresql/extension/prefix--1.1--1.2.0.sql +share/postgresql/extension/prefix--1.2.0.sql +share/postgresql/extension/prefix--unpackaged--1.2.0.sql +share/postgresql/extension/prefix.control |