aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2014-03-28 08:00:42 +0800
committerbdrewery <bdrewery@FreeBSD.org>2014-03-28 08:00:42 +0800
commitde8a70eaae2c65de31a0f88cf8ba144ab3a87871 (patch)
tree20c5a6d423aacfc2b1188992bf0ce4387da33052 /security
parentc86c625d4df2057ba95ae3327fe4bf712e50de27 (diff)
downloadfreebsd-ports-gnome-de8a70eaae2c65de31a0f88cf8ba144ab3a87871.tar.gz
freebsd-ports-gnome-de8a70eaae2c65de31a0f88cf8ba144ab3a87871.tar.zst
freebsd-ports-gnome-de8a70eaae2c65de31a0f88cf8ba144ab3a87871.zip
Add new port security/keybase.
Keybase.io CLI client. Keybase will be a public directory of publicly auditable public keys. All paired, for convenience, with unique usernames. WWW: https://keybase.io
Diffstat (limited to 'security')
-rw-r--r--security/Makefile1
-rw-r--r--security/keybase/Makefile78
-rw-r--r--security/keybase/distinfo4
-rw-r--r--security/keybase/pkg-descr6
4 files changed, 89 insertions, 0 deletions
diff --git a/security/Makefile b/security/Makefile
index b3f5bf778c7e..2a28a03dcf9e 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -238,6 +238,7 @@
SUBDIR += kedpm
SUBDIR += keepassx
SUBDIR += keepassx2
+ SUBDIR += keybase
SUBDIR += keychain
SUBDIR += keynote
SUBDIR += keyprint
diff --git a/security/keybase/Makefile b/security/keybase/Makefile
new file mode 100644
index 000000000000..05650567dd9e
--- /dev/null
+++ b/security/keybase/Makefile
@@ -0,0 +1,78 @@
+# $FreeBSD$
+
+PORTNAME= keybase
+DISTVERSION= v0.2.0
+CATEGORIES= security
+MASTER_SITES= GH \
+ LOCAL/bdrewery/${PORTNAME}/:DEFAULT,deps \
+ http://mirror.shatow.net/freebsd/${PORTNAME}/:DEFAULT,deps
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
+ ${DEP_DIST}:deps
+
+MAINTAINER= bdrewery@freebsd.org
+COMMENT= Keybase.io client
+
+LICENSE= BSD3CLAUSE
+
+BUILD_DEPENDS= npm>=0:${PORTSDIR}/www/npm
+RUN_DEPENDS= node>=0:${PORTSDIR}/www/node \
+ gpg:${PORTSDIR}/security/gnupg
+
+# Must bundle deps.
+# 1. They are not in ports and doing so creates a large complex task with little
+# benefit requiring a lot of maintenance. Hopefully someday we will have
+# an npm wrapper similar to BSDPAN.
+# 2. npm has absolutely no way to fetch dependencies without installing at the
+# same time so this would not build on poudriere due to network restrictions
+# outside of 'fetch' phase. See https://github.com/npm/npm/issues/2817
+# 3. A date is used as dependencies can upgrade even without keybase changing
+# anything due to dependency patterns not binding to specific versions in
+# package.json. I.e., even if the problem of fetching dependencies is
+# solved, we want this package to be reproducible.
+DEP_DIST_DATE= 20140327
+DEP_DIST_DFMT= %Y%m%d
+DEP_DIST_PRE= ${PORTNAME}-deps-${PORTVERSION}-${GH_COMMIT}-
+DEP_DIST_POST= .txz
+DEP_DIST= ${DEP_DIST_PRE}${DEP_DIST_DATE}${DEP_DIST_POST}
+
+USE_GITHUB= yes
+GH_ACCOUNT= keybase
+GH_PROJECT= node-client
+GH_COMMIT= 9509986
+
+KEYBASE_PREFIX= ${PREFIX}/libexec/${PORTNAME}
+
+# Generate dependency distfile. This is only used by maintainer.
+makedeps: patch
+ cd ${WRKSRC} && \
+ ${RM} -rf node_modules && \
+ dep_fname="${DEP_DIST_PRE}`/bin/date '+${DEP_DIST_DFMT}'`${DEP_DIST_POST}" && \
+ tar -cJf $${dep_fname} node_modules/ && \
+ ${MV} -f $${dep_fname} ${_DISTDIR}/ && \
+ cd ${.CURDIR} && \
+ ${MAKE} makesum
+
+post-extract:
+ @${MV} ${WRKDIR}/node_modules ${WRKSRC}/node_modules
+
+add-plist-post: npm-auto-plist
+
+npm-auto-plist:
+ @{ \
+ ${ECHO_CMD} "bin/${PORTNAME}"; \
+ ${FIND} ${STAGEDIR}${KEYBASE_PREFIX} -type f -or -type l; \
+ ${FIND} ${STAGEDIR}${KEYBASE_PREFIX} -type d -d | ${SED} -e 's,^,@dirrm ,'; \
+ } | ${SED} 's,${STAGEDIR}${PREFIX}/,,' >> ${TMPPLIST}
+
+do-install:
+ @${MKDIR} ${WRKDIR}/tmp ${STAGEDIR}${KEYBASE_PREFIX}/lib
+ cd ${STAGEDIR}${KEYBASE_PREFIX}/lib && ${SETENV} HOME=${WRKDIR}/tmp \
+ ${LOCALBASE}/bin/npm install ${WRKSRC}
+ ${LN} -s ${KEYBASE_PREFIX}/lib/node_modules/${PORTNAME}/bin/main.js \
+ ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+
+# Quiet stage-qa
+post-install:
+ @${RM} ${STAGEDIR}${KEYBASE_PREFIX}/lib/node_modules/keybase/node_modules/request/node_modules/node-uuid/benchmark/bench.sh
+
+.include <bsd.port.mk>
diff --git a/security/keybase/distinfo b/security/keybase/distinfo
new file mode 100644
index 000000000000..2a5b24134123
--- /dev/null
+++ b/security/keybase/distinfo
@@ -0,0 +1,4 @@
+SHA256 (keybase-v0.2.0.tar.gz) = 4ca20da5e5f371e63521a838416da73ff54deeae7c71a1441670f9322ddbe723
+SIZE (keybase-v0.2.0.tar.gz) = 594085
+SHA256 (keybase-deps-v0.2.0-9509986-20140327.txz) = 886220149b109ac1face08976837259f7a021f08c02e663d637327b546adbb08
+SIZE (keybase-deps-v0.2.0-9509986-20140327.txz) = 1946868
diff --git a/security/keybase/pkg-descr b/security/keybase/pkg-descr
new file mode 100644
index 000000000000..000effd3d7c6
--- /dev/null
+++ b/security/keybase/pkg-descr
@@ -0,0 +1,6 @@
+Keybase.io CLI client.
+
+Keybase will be a public directory of publicly auditable public
+keys. All paired, for convenience, with unique usernames.
+
+WWW: https://keybase.io/__/command_line/keybase#basics