diff options
Diffstat (limited to 'net-misc/yaydl')
-rw-r--r-- | net-misc/yaydl/ChangeLog | 10 | ||||
-rw-r--r-- | net-misc/yaydl/files/yaydl-1.2-gentoo.patch | 47 | ||||
-rw-r--r-- | net-misc/yaydl/metadata.xml | 13 | ||||
-rw-r--r-- | net-misc/yaydl/yaydl-1.2.ebuild | 48 |
4 files changed, 118 insertions, 0 deletions
diff --git a/net-misc/yaydl/ChangeLog b/net-misc/yaydl/ChangeLog new file mode 100644 index 000000000000..58784a2114b0 --- /dev/null +++ b/net-misc/yaydl/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for net-misc/yaydl +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/yaydl/ChangeLog,v 1.1 2009/05/10 08:47:00 volkmar Exp $ + +*yaydl-1.2 (10 May 2009) + + 10 May 2009; Mounir Lamouri <volkmar@gentoo.org> + +files/yaydl-1.2-gentoo.patch, +metadata.xml, +yaydl-1.2.ebuild: + Initial commit. + diff --git a/net-misc/yaydl/files/yaydl-1.2-gentoo.patch b/net-misc/yaydl/files/yaydl-1.2-gentoo.patch new file mode 100644 index 000000000000..8fcf6761463c --- /dev/null +++ b/net-misc/yaydl/files/yaydl-1.2-gentoo.patch @@ -0,0 +1,47 @@ +--- yaydl.pl.old 2009-05-10 10:18:59.000000000 +0200 ++++ yaydl.pl 2009-05-10 10:30:02.000000000 +0200 +@@ -521,15 +521,15 @@ + my $mencoder = which "mencoder"; + my @commands; + my $return; ++ if(! $ffmpeg){ ++ push (@commands, "ffmpeg -i \"$source\" \"$encode\""); ++ print "ffmpeg: found\n"; ++ } + if (! $mencoder){ + push(@commands, "mencoder \"$source\" -oac mp3lame -lameopts abr:br=92" . + " -ovc xvid -xvidencopts bitrate=150 -o \"$encode\""); + print "mencoder: found\n"; + } +- if(! $ffmpeg){ +- push (@commands, "ffmpeg -i \"$source\" \"$encode\""); +- print "ffmpeg: found\n"; +- } + if($ffmpeg && $mencoder){ + $options{'encode'} = 0; + $urls{$base}{'error'} = +@@ -561,21 +561,12 @@ + my $return = 0; + my $encode = removeextension($source) . ".mp3"; + $urls{$base}{'sound'} = $encode; +- if (which("mplayer") == 1){ ++ if (which("ffmpeg") == 1){ + $options{'sound'} = 0; +- $urls{$base}{'error'} = "mplayer not found - encoding disabled"; ++ $urls{$base}{'error'} = "ffmpeg not found - extracting soundtrack disabled"; + return -1; + } +- if(defined $urls{$base}{'ismp4'}){ +- if (which("ffmpeg") == 1){ +- $urls{$base}{'error'} = "ffmpeg is required to encode mp4-videos!\n"; +- return -1 +- } +- $return = system("ffmpeg -i \"$source\" -vn -acodec libmp3lame -ab 192k \"$encode\""); +- } +- else { +- $return = system("mplayer -dumpaudio -dumpfile \"$encode\" \"$source\""); +- } ++ $return = system("ffmpeg -i \"$source\" -vn -acodec libmp3lame -ab 192k \"$encode\""); + if ($return != 0){ + $options{'sound'} = 0; + $options{'tag'} = 0; diff --git a/net-misc/yaydl/metadata.xml b/net-misc/yaydl/metadata.xml new file mode 100644 index 000000000000..35f6156d1cf0 --- /dev/null +++ b/net-misc/yaydl/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>no-herd</herd> + <maintainer> + <email>volkmar@gentoo.org</email> + <name>Mounir Lamouri</name> + </maintainer> + <use> + <flag name="soundextract">Extract the soundtracks of the downloaded videos</flag> + </use> +</pkgmetadata> + diff --git a/net-misc/yaydl/yaydl-1.2.ebuild b/net-misc/yaydl/yaydl-1.2.ebuild new file mode 100644 index 000000000000..e79cbc1230e0 --- /dev/null +++ b/net-misc/yaydl/yaydl-1.2.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/yaydl/yaydl-1.2.ebuild,v 1.1 2009/05/10 08:47:00 volkmar Exp $ + +EAPI="2" + +inherit eutils + +DESCRIPTION="Yet Another Youtube DownLoader which is downloading more than youtube" +HOMEPAGE="http://pdes-net.org/x-haui/yaydl.html" +SRC_URI="http://pdes-net.org/x-haui/scripts/perl/yaydl_youtubedownloader/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~ppc ~x86" +IUSE="encode soundextract" + +DEPEND="" +RDEPEND="dev-lang/perl + dev-perl/LWP-UserAgent-Determined + dev-perl/MP3-Info + dev-perl/Term-ProgressBar + dev-perl/URI + encode? ( || ( media-video/ffmpeg[encode] + media-video/mplayer[encode,mp3,xvid] ) ) + soundextract? ( || ( media-video/ffmpeg[encode,mp3] ) )" + +S=${WORKDIR}/${PN} + +# TODO: +# need from upstream to fix mencoder soundextract and choose a default encoder + +src_prepare() { + # let ffmpeg doing soundextract and remove mencoder soundextract + # making ffmpeg first choice for encoding + epatch "${FILESDIR}"/${P}-gentoo.patch +} + +src_install() { + exeinto /usr/bin + newexe ${PN}.pl ${PN} || die "newexe failed" + dodoc changelog README || die "dodoc failed" +} + +pkg_postinst() { + elog "${PN} is supporting a lot of video websites." + elog "Look at ${HOMEPAGE} for more information." +} |