summaryrefslogtreecommitdiff
path: root/net-misc/ytfzf
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/ytfzf')
-rw-r--r--net-misc/ytfzf/Manifest2
-rw-r--r--net-misc/ytfzf/ytfzf-2.3.ebuild60
2 files changed, 62 insertions, 0 deletions
diff --git a/net-misc/ytfzf/Manifest b/net-misc/ytfzf/Manifest
index cd264a1f01b9..b83d1dc7c7cb 100644
--- a/net-misc/ytfzf/Manifest
+++ b/net-misc/ytfzf/Manifest
@@ -1,3 +1,5 @@
DIST ytfzf-2.2.tar.gz 3242266 BLAKE2B 7bc6317ea2ee67ca1d93acc5262d5ebc7f6c9828531f1b97d1fd8e4cfb9e9328cf9955da993d59dcfe05a1a983106cf98f3c93ab4b2c007458154f860e333b55 SHA512 9f47da0e56d096d248b14387c3e34f11cc101fa958945e17bdee83d81c2da57faf384fe87d46132e4cc78a5f4f6057462e28c1a64ea647a98120c37ed4e7f50d
+DIST ytfzf-2.3.tar.gz 3249215 BLAKE2B 963442379ea324aa6f7b4077df417815ec1e1822d1598029efd397e2a29996ae92aa2f18e67ec6f7fea16a5804d3a7875cec625be1f5f49eb35c85dc84f3a894 SHA512 a282f578459ec53e725d1089a5b5efb78dcc66684ce572d0318f6bfd6e222b706418c77eeeca34d4015ed2bae1cb54de10edaab36522d6012c2ac421796ef34b
EBUILD ytfzf-2.2.ebuild 1564 BLAKE2B dd76cdd455ad3afa7470a824bff1eb04c7808dd1ec8a75cb91077eea0c6116490300998881e74a3f66c8c5c3a32b8606bfe5f98b4266df54fc66c72e7a26d7f9 SHA512 c538fe597e9d9c1261333ee1c6c840ea4816abcdfc634a5c153281a106a3ac633142979891e9b48adba4b94e1e1b286025f072390dc712ee9fdc69d06eeeabce
+EBUILD ytfzf-2.3.ebuild 1497 BLAKE2B 168bd27352e08dcd0315da0067132a4ff73b852a4f464786a2e21fe10631d6a74769ecb267f346e96c73c7b0ff81580f4d1f010cec88ef068a86e64761e31121 SHA512 fdeac28e638efb39676f03f7087d533490e1d5104c53891be7c86ffbaab3fea779b075c6c0f649b620e05c71ac71c268d41cce5bd6379fa16ff0fe1f5ce4da47
MISC metadata.xml 498 BLAKE2B 465ce6a83a75395c9021b7208a156bc91f55fe2522279a781509bc490e832611e89718317c88d4e2986f16f6ea1f8bc457d2f5978efa011e62c56cef756cf0ed SHA512 49f6d3c039246622d687f63b703390eef0d4fef51f485a091ccdb767da1b2cd8a380275cabe6117465add0e15acf6f6533033a5b17c751091abe462a43044884
diff --git a/net-misc/ytfzf/ytfzf-2.3.ebuild b/net-misc/ytfzf/ytfzf-2.3.ebuild
new file mode 100644
index 000000000000..aabfab731b1b
--- /dev/null
+++ b/net-misc/ytfzf/ytfzf-2.3.ebuild
@@ -0,0 +1,60 @@
+# Copyright 2021-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit optfeature
+
+DESCRIPTION="Posix script to find and watch youtube videos from the terminal"
+HOMEPAGE="https://github.com/pystardust/ytfzf/"
+SRC_URI="https://github.com/pystardust/ytfzf/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="minimal"
+
+# fzf/mpv/yt-dlp "can" be optfeatures depending on configuration, but depend
+# on them so it works as expected out-of-the-box while allowing to disable.
+RDEPEND="
+ app-misc/jq
+ net-misc/curl[ssl]
+ virtual/awk
+ !minimal? (
+ app-shells/fzf
+ media-video/mpv[lua]
+ net-misc/yt-dlp
+ )"
+
+src_prepare() {
+ default
+
+ sed -i "/^: ...YTFZF_SYSTEM_ADDON_DIR/s|/usr/local|${EPREFIX}/usr|" ytfzf || die
+}
+
+src_compile() { :; }
+
+src_install() {
+ local emakeargs=(
+ DESTDIR="${D}"
+ PREFIX="${EPREFIX}"/usr
+ DOCDIR="${EPREFIX}"/usr/share/doc/${PF}
+ )
+
+ emake "${emakeargs[@]}" addons doc install
+ einstalldocs
+
+ rm -r "${ED}"/usr/share/licenses || die
+}
+
+pkg_postinst() {
+ optfeature "external menu support" x11-misc/dmenu
+ optfeature "in-terminal thumbnails on X11" media-gfx/ueberzug
+ optfeature "desktop notifications" x11-libs/libnotify
+
+ if [[ ! ${REPLACING_VERSIONS} ]]; then
+ elog "Note that ${PN} supports many methods to display menus/thumbnails."
+ elog "This ebuild primarily covers defaults and major features, additional"
+ elog "dependencies may be needed for others."
+ fi
+}