diff --git a/multimedia/Makefile b/multimedia/Makefile index 6de0e8f3f725..b1f938536550 100644 --- a/multimedia/Makefile +++ b/multimedia/Makefile @@ -443,6 +443,7 @@ SUBDIR += xporthdmv SUBDIR += xvid SUBDIR += yamdi + SUBDIR += ytfzf SUBDIR += zart SUBDIR += zoneminder diff --git a/multimedia/ytfzf/Makefile b/multimedia/ytfzf/Makefile new file mode 100644 index 000000000000..6c37ae190377 --- /dev/null +++ b/multimedia/ytfzf/Makefile @@ -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 diff --git a/multimedia/ytfzf/distinfo b/multimedia/ytfzf/distinfo new file mode 100644 index 000000000000..e957d4c30d2b --- /dev/null +++ b/multimedia/ytfzf/distinfo @@ -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 diff --git a/multimedia/ytfzf/files/patch-ytfzf b/multimedia/ytfzf/files/patch-ytfzf new file mode 100644 index 000000000000..8ad829d4d472 --- /dev/null +++ b/multimedia/ytfzf/files/patch-ytfzf @@ -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" diff --git a/multimedia/ytfzf/pkg-descr b/multimedia/ytfzf/pkg-descr new file mode 100644 index 000000000000..e3ab0d1ba1a3 --- /dev/null +++ b/multimedia/ytfzf/pkg-descr @@ -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