Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Aug 2024 09:30:27 GMT
From:      Nicola Vitale <nivit@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 0d52169e71c1 - main - deskutils/py-trash-cli: Add new port
Message-ID:  <202408060930.4769URN4054636@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by nivit:

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

commit 0d52169e71c1554cefd4a789d851f6ba8687fbe6
Author:     Nicola Vitale <nivit@FreeBSD.org>
AuthorDate: 2024-08-06 09:28:11 +0000
Commit:     Nicola Vitale <nivit@FreeBSD.org>
CommitDate: 2024-08-06 09:29:35 +0000

    deskutils/py-trash-cli: Add new port
    
    trash-cli trashes files recording the original path, deletion date, and
    permissions. It uses the same trashcan used by KDE, GNOME, and XFCE, but you
    can invoke it from the command line (and scripts).
    
    It provides these commands:
    
    trash-put           trash files and directories.
    trash-empty         empty the trashcan(s).
    trash-list          list trashed files.
    trash-restore       restore a trashed file.
    trash-rm            remove individual files from the trashcan.
    
    https://github.com/andreafrancia/trash-cli
---
 deskutils/Makefile               |  1 +
 deskutils/py-trash-cli/Makefile  | 35 +++++++++++++++++++++++++++++++++++
 deskutils/py-trash-cli/distinfo  |  3 +++
 deskutils/py-trash-cli/pkg-descr | 11 +++++++++++
 deskutils/py-trash-cli/pkg-plist | 10 ++++++++++
 5 files changed, 60 insertions(+)

diff --git a/deskutils/Makefile b/deskutils/Makefile
index ae3c94d653b2..d65da652af71 100644
--- a/deskutils/Makefile
+++ b/deskutils/Makefile
@@ -237,6 +237,7 @@
     SUBDIR += py-taskw
     SUBDIR += py-term-background
     SUBDIR += py-todoman
+    SUBDIR += py-trash-cli
     SUBDIR += py-vdirsyncer
     SUBDIR += py-vobject
     SUBDIR += py-vorta
diff --git a/deskutils/py-trash-cli/Makefile b/deskutils/py-trash-cli/Makefile
new file mode 100644
index 000000000000..cbe914f8f109
--- /dev/null
+++ b/deskutils/py-trash-cli/Makefile
@@ -0,0 +1,35 @@
+PORTNAME=	trash-cli
+DISTVERSION=	0.24.5.26
+CATEGORIES=	deskutils python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+DISTNAME=	trash_cli-${DISTVERSION}
+
+MAINTAINER=	nivit@FreeBSD.org
+COMMENT=	Command line interface to the freedesktop.org trashcan
+WWW=		https://github.com/andreafrancia/trash-cli
+
+LICENSE=	GPLv2
+LICENSE_FILE=	${WRKSRC}/COPYING
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools>=63.1.0:devel/py-setuptools@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}shtab>=1.7.1:devel/py-shtab@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>=0.44.0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}psutil>=6.0.0:sysutils/py-psutil@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}six>=1.16.0:devel/py-six@${PY_FLAVOR}
+
+USES=		python:3.9+
+USE_PYTHON=	autoplist pep517
+TRASH_CMDS=	trash-empty trash-list trash-restore trash-put trash
+
+post-install:
+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/bash-completion/completions
+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions
+. for cmd in ${TRASH_CMDS}
+	@${SETENV} PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR} \
+		${STAGEDIR}${PREFIX}/bin/${cmd} --print-completion bash >  ${STAGEDIR}${PREFIX}/share/bash-completion/completions/${cmd}
+	@${SETENV} PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR} \
+		${STAGEDIR}${PREFIX}/bin/${cmd} --print-completion zsh > ${STAGEDIR}${PREFIX}/share/zsh/site-functions/_${cmd}
+. endfor
+
+.include <bsd.port.mk>
diff --git a/deskutils/py-trash-cli/distinfo b/deskutils/py-trash-cli/distinfo
new file mode 100644
index 000000000000..c3acab241317
--- /dev/null
+++ b/deskutils/py-trash-cli/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1722931541
+SHA256 (trash_cli-0.24.5.26.tar.gz) = c721628e82c4be110b710d72b9d85c9595d8b524f4da241ad851a7479d0bdceb
+SIZE (trash_cli-0.24.5.26.tar.gz) = 59726
diff --git a/deskutils/py-trash-cli/pkg-descr b/deskutils/py-trash-cli/pkg-descr
new file mode 100644
index 000000000000..3cb6db871ffb
--- /dev/null
+++ b/deskutils/py-trash-cli/pkg-descr
@@ -0,0 +1,11 @@
+trash-cli trashes files recording the original path, deletion date, and
+permissions. It uses the same trashcan used by KDE, GNOME, and XFCE, but you
+can invoke it from the command line (and scripts).
+
+It provides these commands:
+
+trash-put           trash files and directories.
+trash-empty         empty the trashcan(s).
+trash-list          list trashed files.
+trash-restore       restore a trashed file.
+trash-rm            remove individual files from the trashcan.
diff --git a/deskutils/py-trash-cli/pkg-plist b/deskutils/py-trash-cli/pkg-plist
new file mode 100644
index 000000000000..fa13214fbaea
--- /dev/null
+++ b/deskutils/py-trash-cli/pkg-plist
@@ -0,0 +1,10 @@
+share/bash-completion/completions/trash
+share/bash-completion/completions/trash-empty
+share/bash-completion/completions/trash-list
+share/bash-completion/completions/trash-put
+share/bash-completion/completions/trash-restore
+share/zsh/site-functions/_trash
+share/zsh/site-functions/_trash-empty
+share/zsh/site-functions/_trash-list
+share/zsh/site-functions/_trash-put
+share/zsh/site-functions/_trash-restore



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202408060930.4769URN4054636>