svn commit: r487459 - in head/databases: . postgresql-prefix postgresql-prefix/files
David Naylor
dbn at FreeBSD.org
Fri Dec 14 19:39:41 UTC 2018
Author: dbn
Date: Fri Dec 14 19:39:38 2018
New Revision: 487459
URL: https://svnweb.freebsd.org/changeset/ports/487459
Log:
databases/portsgresql-prefix: Prefix Range module for PostgreSQL
Added:
head/databases/postgresql-prefix/
head/databases/postgresql-prefix/Makefile (contents, props changed)
head/databases/postgresql-prefix/distinfo (contents, props changed)
head/databases/postgresql-prefix/files/
head/databases/postgresql-prefix/files/patch-Makefile (contents, props changed)
head/databases/postgresql-prefix/pkg-descr (contents, props changed)
head/databases/postgresql-prefix/pkg-plist (contents, props changed)
Modified:
head/databases/Makefile
Modified: head/databases/Makefile
==============================================================================
--- head/databases/Makefile Fri Dec 14 18:57:45 2018 (r487458)
+++ head/databases/Makefile Fri Dec 14 19:39:38 2018 (r487459)
@@ -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
Added: head/databases/postgresql-prefix/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/databases/postgresql-prefix/Makefile Fri Dec 14 19:39:38 2018 (r487459)
@@ -0,0 +1,28 @@
+# $FreeBSD$
+
+PORTNAME= prefix
+PORTVERSION= 1.2.8
+DISTVERSIONPREFIX= v
+CATEGORIES= databases
+PKGNAMEPREFIX= postgresql${PGSQL_VER:S/.//}-
+
+MAINTAINER= lbartoletti at 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>
Added: head/databases/postgresql-prefix/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/databases/postgresql-prefix/distinfo Fri Dec 14 19:39:38 2018 (r487459)
@@ -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
Added: head/databases/postgresql-prefix/files/patch-Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/databases/postgresql-prefix/files/patch-Makefile Fri Dec 14 19:39:38 2018 (r487459)
@@ -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
Added: head/databases/postgresql-prefix/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/databases/postgresql-prefix/pkg-descr Fri Dec 14 19:39:38 2018 (r487459)
@@ -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
Added: head/databases/postgresql-prefix/pkg-plist
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/databases/postgresql-prefix/pkg-plist Fri Dec 14 19:39:38 2018 (r487459)
@@ -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
More information about the svn-ports-all
mailing list