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
This commit is contained in:
Nicola Vitale 2024-08-06 11:28:11 +02:00
parent 8d20508792
commit 0d52169e71
No known key found for this signature in database
GPG key ID: A51E190C4C0808D0
5 changed files with 60 additions and 0 deletions

View file

@ -237,6 +237,7 @@
SUBDIR += py-taskw SUBDIR += py-taskw
SUBDIR += py-term-background SUBDIR += py-term-background
SUBDIR += py-todoman SUBDIR += py-todoman
SUBDIR += py-trash-cli
SUBDIR += py-vdirsyncer SUBDIR += py-vdirsyncer
SUBDIR += py-vobject SUBDIR += py-vobject
SUBDIR += py-vorta SUBDIR += py-vorta

View file

@ -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>

View file

@ -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

View file

@ -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.

View file

@ -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