diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-03-20 00:40:44 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-03-20 00:40:44 +0000 |
commit | 4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch) | |
tree | 356496503d52354aa6d9f2d36126302fed5f3a73 /net-misc/ytfzf/ytfzf-2.2.ebuild | |
parent | fcc5224904648a8e6eb528d7603154160a20022f (diff) |
gentoo resync : 20.03.2022
Diffstat (limited to 'net-misc/ytfzf/ytfzf-2.2.ebuild')
-rw-r--r-- | net-misc/ytfzf/ytfzf-2.2.ebuild | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/net-misc/ytfzf/ytfzf-2.2.ebuild b/net-misc/ytfzf/ytfzf-2.2.ebuild new file mode 100644 index 000000000000..1a6d408ced73 --- /dev/null +++ b/net-misc/ytfzf/ytfzf-2.2.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} ]] && ver_test ${REPLACING_VERSIONS} -lt 2.0; then + elog "Note that >=${PN}-2.0 is a major rewrite and is not compatible with" + elog "configuration and some command arguments of older versions, see the" + elog "newly added ${PN}(1) and ${PN}(5) man pages for more information." + fi +} |