git: ea3df3353c6f - main - security/transcrypt: Add new port

From: Nicola Vitale <nivit_at_FreeBSD.org>
Date: Sat, 27 May 2023 06:50:09 UTC
The branch main has been updated by nivit:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ea3df3353c6f21fb569693df3ba2c3a5974f64c4

commit ea3df3353c6f21fb569693df3ba2c3a5974f64c4
Author:     Nicola Vitale <nivit@FreeBSD.org>
AuthorDate: 2023-05-27 04:46:37 +0000
Commit:     Nicola Vitale <nivit@FreeBSD.org>
CommitDate: 2023-05-27 04:48:54 +0000

    security/transcrypt: Add new port
    
    A script to configure transparent encryption of sensitive files stored in a Git
    repository. Files that you choose will be automatically encrypted when you
    commit them, and automatically decrypted when you check them out. The process
    will degrade gracefully, so even people without your encryption password can
    safely commit changes to the repository's non-encrypted files.
    
    Transcrypt protects your data when it's pushed to remotes that you may not
    directly control (e.g., GitHub, Dropbox clones, etc.), while still allowing you
    to work normally on your local working copy. You can conveniently store things
    like passwords and private keys within your repository and not have to share
    them with your entire team or complicate your workflow.
    
    https://github.com/elasticdog/transcrypt
---
 security/Makefile             |  1 +
 security/transcrypt/Makefile  | 43 +++++++++++++++++++++++++++++++++++++++++++
 security/transcrypt/distinfo  |  3 +++
 security/transcrypt/pkg-descr | 11 +++++++++++
 4 files changed, 58 insertions(+)

diff --git a/security/Makefile b/security/Makefile
index 3de8d80b0643..44c3c08a807f 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -1305,6 +1305,7 @@
     SUBDIR += tpm2-abrmd
     SUBDIR += tpm2-tools
     SUBDIR += tpm2-tss
+    SUBDIR += transcrypt
     SUBDIR += trezord
     SUBDIR += tripwire
     SUBDIR += trousers
diff --git a/security/transcrypt/Makefile b/security/transcrypt/Makefile
new file mode 100644
index 000000000000..23df736d1066
--- /dev/null
+++ b/security/transcrypt/Makefile
@@ -0,0 +1,43 @@
+PORTNAME=	transcrypt
+DISTVERSIONPREFIX=	v
+DISTVERSION=	2.2.3
+CATEGORIES=	security
+
+MAINTAINER=	nivit@FreeBSD.org
+COMMENT=	Transparently encrypt files within a git repository
+WWW=		https://github.com/elasticdog/transcrypt
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+RUN_DEPENDS=	bash:shells/bash \
+		git:devel/git \
+		gpg2:security/gnupg \
+		xxd:editors/vim
+TEST_DEPENDS=	bats:devel/bats-core
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	elasticdog
+
+NO_BUILD=	yes
+
+PLIST_FILES=	bin/transcrypt \
+		man/man1/transcrypt.1.gz \
+		share/bash-completion/completions/transcrypt \
+		share/zsh/site-functions/_transcrypt
+
+post-patch:
+	${REINPLACE_CMD} -e 's/\(darwin\*\))/\1|${OSTYPE}\*)/1' ${WRKSRC}/${PORTNAME}
+
+do-install:
+	${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
+	${INSTALL_DATA} ${WRKSRC}/contrib/bash/${PORTNAME} ${STAGEDIR}${PREFIX}/share/bash-completion/completions/${PORTNAME}
+	${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions && \
+		${INSTALL_DATA} ${WRKSRC}/contrib/zsh/_${PORTNAME} ${STAGEDIR}${PREFIX}/share/zsh/site-functions/_${PORTNAME}
+	${INSTALL_MAN} ${WRKSRC}/man/${PORTNAME}.1 ${STAGEDIR}${MANPREFIX}/man/man1
+
+# 53 tests, 0 failures
+do-test:
+	${LOCALBASE}/bin/bats ${WRKSRC}/tests
+
+.include <bsd.port.mk>
diff --git a/security/transcrypt/distinfo b/security/transcrypt/distinfo
new file mode 100644
index 000000000000..7f901f9d5eed
--- /dev/null
+++ b/security/transcrypt/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1685121651
+SHA256 (elasticdog-transcrypt-v2.2.3_GH0.tar.gz) = 69cf95b2a4d7e89c1f5c84bc4c32aa35f78d08b8f457a003ab9e8be7361a24e5
+SIZE (elasticdog-transcrypt-v2.2.3_GH0.tar.gz) = 32592
diff --git a/security/transcrypt/pkg-descr b/security/transcrypt/pkg-descr
new file mode 100644
index 000000000000..e92460e1222f
--- /dev/null
+++ b/security/transcrypt/pkg-descr
@@ -0,0 +1,11 @@
+A script to configure transparent encryption of sensitive files stored in a Git
+repository. Files that you choose will be automatically encrypted when you
+commit them, and automatically decrypted when you check them out. The process
+will degrade gracefully, so even people without your encryption password can
+safely commit changes to the repository's non-encrypted files.
+
+Transcrypt protects your data when it's pushed to remotes that you may not
+directly control (e.g., GitHub, Dropbox clones, etc.), while still allowing you
+to work normally on your local working copy. You can conveniently store things
+like passwords and private keys within your repository and not have to share
+them with your entire team or complicate your workflow.