1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-22 08:58:47 +00:00

multimedia/ytfzf: Add a new port

This commit is contained in:
Mateusz Piotrowski 2021-04-17 17:14:22 +02:00
parent 17de01af95
commit 8625cb0619
5 changed files with 65 additions and 0 deletions

View File

@ -443,6 +443,7 @@
SUBDIR += xporthdmv
SUBDIR += xvid
SUBDIR += yamdi
SUBDIR += ytfzf
SUBDIR += zart
SUBDIR += zoneminder

46
multimedia/ytfzf/Makefile Normal file
View File

@ -0,0 +1,46 @@
PORTNAME= ytfzf
DISTVERSIONPREFIX= v
DISTVERSION= 1.1.4
CATEGORIES= multimedia
MAINTAINER= 0mp@FreeBSD.org
COMMENT= Find and watch YouTube videos from the terminal
LICENSE= GPLv3+
LICENSE_FILE= ${WRKSRC}/LICENSE
RUN_DEPENDS= curl:ftp/curl \
fzf>=0:textproc/fzf \
jq:textproc/jq \
mpv:multimedia/mpv \
notify-send:devel/libnotify \
shuf:sysutils/shuf \
ueberzug:graphics/py-ueberzug@${PY_FLAVOR} \
youtube-dl:www/youtube_dl
USES= python
USE_GITHUB= yes
GH_ACCOUNT= pystardust
PYTHON_NO_DEPENDS= yes
NO_ARCH= yes
NO_BUILD= yes
PLIST_FILES= bin/${PORTNAME}
PORTDOCS= USAGE.md conf.sh
PORTEXAMPLES= conf.sh
OPTIONS_DEFINE= DOCS EXAMPLES
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/docs/USAGE.md ${STAGEDIR}${DOCSDIR}
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/docs/conf.sh ${STAGEDIR}${EXAMPLESDIR}
${RLN} ${STAGEDIR}${EXAMPLESDIR}/conf.sh ${STAGEDIR}${DOCSDIR}/conf.sh
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1618658726
SHA256 (pystardust-ytfzf-v1.1.4_GH0.tar.gz) = be56890e198fa6cfdf1e28a095cf286e10e2a8a77efe99d1214aaff8a122c087
SIZE (pystardust-ytfzf-v1.1.4_GH0.tar.gz) = 3221949

View File

@ -0,0 +1,11 @@
--- ytfzf.orig 2021-04-17 13:32:28 UTC
+++ ytfzf
@@ -861,7 +861,7 @@ play_url () {
delete_thumbnails () {
session_count=0
while read -r pid; do
- [ -d /proc/"$pid" ] && session_count=$(( session_count + 1 ))
+ kill -0 "$pid" 2>/dev/null && session_count=$(( session_count + 1 ))
done < "$pid_file"
if [ $session_count -eq 1 ] ; then
[ -d "$thumb_dir" ] && rm -r "$thumb_dir"

View File

@ -0,0 +1,4 @@
Ytfzf is a POSIX script that helps you find Youtube videos (without API)
and opens/downloads them using mpv/youtube-dl.
WWW: https://github.com/pystardust/ytfzf