# Maintainer: exponential # Contributor: Trizen (AUR) pkgname=youtube-viewer pkgver=3.11.3 pkgrel=0 pkgdesc="A lightweight YouTube client for Linux (CLI/GTK)" arch=('all') url="https://github.com/trizen/${pkgname}" license=('Artistic2.0') conflicts=('youtube-viewer-git') makedepends=('libmodule-build-perl') checkdepends=('libjson-perl') depends=('perl' 'libdata-dump-perl' 'libjson-perl' 'liblwp-protocol-https-perl' 'libgtk3-perl' 'libwww-perl' 'libfile-sharedir-perl' 'libunicode-linebreak-perl') optdepends=( 'ffmpeg: conversions and MKV merging' 'gnome-icon-theme: icons in menus' 'libjson-xs-perl: faster JSON parsing' 'liblwp-useragent-cached-perl: local cache support, mpr only' 'libterm-readline-gnu-perl: better STDIN support' 'libparallel-forkmanager-perl: for option get_subscriptions_in_parallel' 'libtext-charwidth-perl: get widths of characters' 'mpv: play videos with MPV (recommended)' 'smplayer: play videos with SMPlayer' 'vlc: play videos with VLC' 'wget: download videos with wget' 'yt-dlp: play videos with encrypted signatures' 'webp-pixbuf-loader: load webp images' ) source=("${pkgname}-${pkgver}.tar.gz::https://github.com/trizen/youtube-viewer/archive/refs/tags/${pkgver}.tar.gz") b2sums=('a304bd0905e694f2bdf67607391dd0ec2be823c5bb0c256395fd05e7ef48654da80d4eb0c96a4102d4d1fdb6f0bf1371a8c5c0ebb10b1516025399a453beb1ad') build() { cd "$pkgname-${pkgver}" perl Build.PL --gtk3 } check(){ cd "$pkgname-${pkgver}" perl Build test } package() { cd "$pkgname-${pkgver}" perl Build install --destdir "$pkgdir" --installdirs vendor --install_path script=/usr/bin # adjustment rm -r "$pkgdir/usr/lib" # desktop file and image install -m644 -d "$pkgdir"/usr/share/{applications,pixmaps} mv "$pkgdir/usr/share/perl5/auto/share/dist/WWW-YoutubeViewer/gtk-youtube-viewer.desktop" \ "$pkgdir"/usr/share/applications/gtk-youtube-viewer.desktop ln -s "/usr/share/perl5/auto/share/dist/WWW-YoutubeViewer/icons/gtk-youtube-viewer.png" \ "$pkgdir/usr/share/pixmaps/gtk-youtube-viewer.png" # Convenience symlink ln -s "/usr/bin/gtk-${pkgname}" "$pkgdir/usr/bin/${pkgname}-gtk" # doc install -Dm644 "LICENSE" "$pkgdir/usr/share/doc/$pkgname/license" install -Dm644 "README.md" "$pkgdir/usr/share/doc/$pkgname/readme" install -Dm644 "Changes" "$pkgdir/usr/share/doc/$pkgname/changelog" gzip "$pkgdir/usr/share/doc/$pkgname/changelog" }