summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoonas Niilola <juippis@gentoo.org>2019-09-01 10:32:07 +0300
committerJoonas Niilola <juippis@gentoo.org>2019-09-01 10:32:22 +0300
commit55f217134fcddb8fb2180f0a814da5070a529241 (patch)
tree21927de3a58de79c281846e29e04a35201ae9c5f /media-video
parentdev-python/mini-amf: new package (diff)
downloadgentoo-55f217134fcddb8fb2180f0a814da5070a529241.tar.gz
gentoo-55f217134fcddb8fb2180f0a814da5070a529241.tar.bz2
gentoo-55f217134fcddb8fb2180f0a814da5070a529241.zip
media-video/yle-dl: new package
Download media files from Yle Areena. Package-Manager: Portage-2.3.74, Repoman-2.3.17 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'media-video')
-rw-r--r--media-video/yle-dl/Manifest1
-rw-r--r--media-video/yle-dl/metadata.xml12
-rw-r--r--media-video/yle-dl/yle-dl-20190614.ebuild68
3 files changed, 81 insertions, 0 deletions
diff --git a/media-video/yle-dl/Manifest b/media-video/yle-dl/Manifest
new file mode 100644
index 000000000000..495895597be6
--- /dev/null
+++ b/media-video/yle-dl/Manifest
@@ -0,0 +1 @@
+DIST yle-dl-20190614.tar.gz 83579 BLAKE2B 9117ab32d3e037f22cc209d3686e23d14802438f77203f08e102901d825c06e7c332d1f6ca33bce3af3d4042e9c543fec60e261153be8ab738b038cc1cf4069b SHA512 6a4bfdb93229f48580d8acf742e1e253aa3da79f84ecc3886c32757ddc46608795c58cd02cb0aaa2f7d42188456eac50a243b815baa3752ac6a1b12b9632109c
diff --git a/media-video/yle-dl/metadata.xml b/media-video/yle-dl/metadata.xml
new file mode 100644
index 000000000000..025d4dde75df
--- /dev/null
+++ b/media-video/yle-dl/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>juippis@gentoo.org</email>
+ <name>Joonas Niilola</name>
+ </maintainer>
+ <use>
+ <flag name='php'>Use a PHP script as download backend</flag>
+ <flag name='youtube-dl'>Use youtube-dl script as a download backend</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-video/yle-dl/yle-dl-20190614.ebuild b/media-video/yle-dl/yle-dl-20190614.ebuild
new file mode 100644
index 000000000000..ecd14071a70f
--- /dev/null
+++ b/media-video/yle-dl/yle-dl-20190614.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python2_7 python3_{5..6} )
+
+inherit distutils-r1
+
+DESCRIPTION="Download media files from Yle Areena"
+HOMEPAGE="http://aajanki.github.io/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 php test +youtube-dl"
+
+# Requires an active internet connection during tests
+RESTRICT="test"
+
+RDEPEND="
+ !libav? ( media-video/ffmpeg )
+ >=dev-python/attrs-18.1.0[${PYTHON_USEDEP}]
+ <dev-python/attrs-18.3.0[${PYTHON_USEDEP}]
+ >=dev-python/configargparse-0.13.0[${PYTHON_USEDEP}]
+ dev-python/future[${PYTHON_USEDEP}]
+ dev-python/lxml[${PYTHON_USEDEP}]
+ dev-python/mini-amf[${PYTHON_USEDEP}]
+ dev-python/progress[${PYTHON_USEDEP}]
+ dev-python/pycryptodome[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ net-misc/wget
+ php? (
+ dev-lang/php:*[bcmath,cli,curl,simplexml]
+ >=dev-libs/openssl-1.0.2:0=
+ media-video/rtmpdump
+ )
+ youtube-dl? ( net-misc/youtube-dl[${PYTHON_USEDEP}] )
+"
+DEPEND="
+ test? (
+ ${RDEPEND}
+ dev-python/pytest-runner[${PYTHON_USEDEP}]
+ )
+"
+
+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
+}
+
+python_test() {
+ # For tests to run succesfully, you need to disable network stricting
+ # feature first.
+ # FEATURES="-network-sandbox test" emerge -a yle-dl
+ esetup.py test
+}
+
+pkg_postinst() {
+ einfo "Sample configuration file has been installed in "
+ einfo " /usr/share/doc/yle-dl-2.37/yledl.conf.sample.bz2"
+}