diff options
Diffstat (limited to 'pcr/youtube-viewer/PKGBUILD')
-rw-r--r-- | pcr/youtube-viewer/PKGBUILD | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/pcr/youtube-viewer/PKGBUILD b/pcr/youtube-viewer/PKGBUILD new file mode 100644 index 000000000..ea4f619a5 --- /dev/null +++ b/pcr/youtube-viewer/PKGBUILD @@ -0,0 +1,65 @@ +#$Id: PKGBUILD 223893 2017-04-20 06:52:58Z arojas $ +# Maintainer (Arch): Alexander F Rødseth <xyproto@archlinux.org> +# Contributor (Arch): Daniel Wallace < danielwallace at gtmanfred dot com> +# Contributor (Arch): Trizen <echo dHJpemVueEBnbWFpbC5jb20K | base64 -d> +# Maintainer (Hyperbola): André Silva <emulatorman@hyperbola.info> +# Contributor (Hyperbola): Márcio Silva <coadde@hyperbola.info> +# Maintainer: Jesús E. <heckyel@parabola.nu> + +pkgbase=youtube-viewer +pkgname=(youtube-viewer gtk-youtube-viewer) +epoch=1 +pkgver=3.3.1 +pkgrel=1.parabola1 +arch=('any') +url='https://github.com/trizen/youtube-viewer' +license=('GPL3') +source=("https://github.com/trizen/$pkgname/archive/$pkgver.tar.gz" + "libre.patch") +sha512sums=('16ac8f899c4c37d7380856951db175df5c0d4d849f939c15e64c9f89303af6826748098c34dd64982dc20ee505c120f853bd83700a0cc63383220e23dbbe17c6' + '0298cc97e97755afd02e425872165ecd0465796c857378ffd2829c0ea8e65c88863963fd31b5f8bb880dc9a6a5eb13e80696057c3c6d34ff0e0f02dbf411719d') +depends=('perl>=5.16.0' 'perl-data-dump' 'perl-json' 'perl-lwp-protocol-https' 'perl-libwww') +makedepends=('perl-module-build') +optdepends=( + 'perl-json-xs: faster JSON to HASH conversion' + 'perl-text-charwidth: to print the results in a fixed-width format (-W)' + 'perl-term-readline-gnu: for better STDIN support' + 'avideo: for playing videos with AVideo' + 'wget: for downloading videos with wget' + 'vlc: for playing videos with VLC' + 'mpv: for playing videos with MPV (recommended)' +) + +prepare() { + cd "$pkgbase-$pkgver" + patch -p1 -i ../libre.patch +} + +build() { + cd "$pkgbase-$pkgver" + perl Build.PL --installdirs vendor --gtk +} + +check(){ + cd $pkgbase-$pkgver + ./Build test +} + +package_youtube-viewer() { + pkgdesc='Utility for viewing YouTube videos (CLI), with AVideo support' + optdepends+=('gtk-youtube-viewer: to use youtube-viewer with GTK+ GUI') + cd $pkgbase-$pkgver + ./Build install --destdir "$pkgdir" + rm -r "$pkgdir"/usr/lib + rm "$pkgdir"/usr/bin/vendor_perl/gtk-youtube-viewer +} + +package_gtk-youtube-viewer() { + pkgdesc='Utility for viewing YouTube videos (GTK+ GUI), with AVideo support' + depends+=('youtube-viewer' 'gtk2-perl' 'perl-file-sharedir') + cd $pkgbase-$pkgver + install -d "$pkgdir/usr/"{bin/vendor_perl,share/{applications,pixmaps}} + install -Dm 755 "bin/$pkgname" "$pkgdir/usr/bin/vendor_perl/$pkgname" + install -Dm 644 "share/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop" + install -Dm 644 "share/icons/$pkgname.png" "$pkgdir/usr/share/pixmaps/$pkgname.png" +} |