media-video/yle-dl: bump to 20200419
authorJoonas Niilola <juippis@gentoo.org>
Mon, 20 Apr 2020 16:18:06 +0000 (19:18 +0300)
committerJoonas Niilola <juippis@gentoo.org>
Mon, 20 Apr 2020 16:22:01 +0000 (19:22 +0300)
 - don't compress sample conf file anymore for simple copy-paste,
 - move optional download engines from IUSE to optfeature,
 - update ebuild to use single-target impl instead,
 - use distutils-r1.eclass for test phase

Signed-off-by: Joonas Niilola <juippis@gentoo.org>
media-video/yle-dl/Manifest
media-video/yle-dl/yle-dl-20200419.ebuild [new file with mode: 0644]

index 9ded0fee954512de32bf7aab338eb31b50794512..d60857fa374502b56376408fe1d32afb6f1667c3 100644 (file)
@@ -1 +1,2 @@
 DIST yle-dl-20200222.tar.gz 87059 BLAKE2B 25d645505d67d71b3662589c77c30f905ded81e2d64874cf6036dcaf0738e521e96650543a78c18031a4477fc3bcf121e7497c980d22c84e21bebc2bd7cb154a SHA512 2b4a98c19a12812bc3c00de6173d50c78c981de0186c29021c8d88349ae88759a4987f6488d758ee5397d2b0992cd03029680bb08a4882cb2280a28807d4bf14
+DIST yle-dl-20200419.tar.gz 87267 BLAKE2B 2637620758c1a083502eb9468bbe5e7353855051c3379d448f6a4b9adcf8113293e4a7a8887138df68fcfd16938ab3846034a8f57cb9d366467a22c23b53ebaa SHA512 3d064e080e0c9172e15134eaa179ae96240ed9fc74a7a8a9a9aa18049397e0fea62465f5768db488928f23af1fa1195d78a8a4a6bbafcab4bcda6d05cda70ccf
diff --git a/media-video/yle-dl/yle-dl-20200419.ebuild b/media-video/yle-dl/yle-dl-20200419.ebuild
new file mode 100644 (file)
index 0000000..edff6ec
--- /dev/null
@@ -0,0 +1,75 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6..8} )
+DISTUTILS_USE_SETUPTOOLS=rdepend
+DISTUTILS_SINGLE_IMPL=true
+
+inherit distutils-r1 eutils
+
+DESCRIPTION="Download media files from Yle Areena"
+HOMEPAGE="https://aajanki.github.io/yle-dl/ https://github.com/aajanki/yle-dl"
+SRC_URI="https://github.com/aajanki/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="libav test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+# Requires an active internet connection during tests,
+# FEATURES="-network-sandbox" to test.
+RESTRICT="test"
+
+RDEPEND="${PYTHON_DEPS}
+       !libav? ( media-video/ffmpeg )
+       net-misc/wget
+       $(python_gen_cond_dep '
+               >=dev-python/attrs-18.1.0[${PYTHON_MULTI_USEDEP}]
+               >=dev-python/configargparse-0.13.0[${PYTHON_MULTI_USEDEP}]
+               dev-python/future[${PYTHON_MULTI_USEDEP}]
+               dev-python/lxml[${PYTHON_MULTI_USEDEP}]
+               dev-python/mini-amf[${PYTHON_MULTI_USEDEP}]
+               dev-python/progress[${PYTHON_MULTI_USEDEP}]
+               dev-python/pycryptodome[${PYTHON_MULTI_USEDEP}]
+               dev-python/requests[${PYTHON_MULTI_USEDEP}]
+       ')
+"
+DEPEND="
+       test? (
+               ${RDEPEND}
+               media-video/ffmpeg[gnutls]
+               $(python_gen_cond_dep '
+                       dev-python/pytest[${PYTHON_MULTI_USEDEP}]
+               ')
+       )
+"
+BDEPEND="${PYTHON_DEPS}"
+
+distutils_enable_tests setup.py
+
+DOCS=( COPYING ChangeLog README.fi README.md yledl.conf.sample )
+
+src_prepare() {
+       default
+
+       # Gentoo doesn't ship pycryptodomex with pycryptodome
+       sed -i 's/pycryptodomex/pycryptodome/g' setup.py || die
+}
+
+src_install() {
+       docompress -x "/usr/share/doc/${PF}/yledl.conf.sample"
+       distutils-r1_src_install
+}
+
+pkg_postinst() {
+       elog "Sample configuration file has been installed to "
+       elog " /usr/share/doc/yle-dl-${PV}/yledl.conf.sample"
+       elog ""
+       elog "Optional download engines: "
+       optfeature "php download engine using rtmpdump" "dev-lang/php:*[bcmath,cli,curl,simplexml] media-video/rtmpdump"
+       optfeature "youtube-dl download engine" net-misc/youtube-dl
+}