# Maintainer: exponential # Contributor: Trizen (AUR) pkgname=pipe-viewer pkgver=0.5.3 pkgrel=0 pkgdesc="A lightweight YouTube client for Linux (CLI/GTK) (fork of straw-viewer)" arch=('all') url="https://github.com/trizen/${pkgname}" license=('Artistic2.0') conflicts=('pipe-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' 'libtext-unidecode-perl: for option fat32safe' 'libparallel-forkmanager-perl: for option get_subscriptions_in_parallel' 'mpv: play videos with MPV (recommended)' '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/pipe-viewer/archive/refs/tags/$pkgver.tar.gz") b2sums=('73a5ec1aafdda6a1efb3f7391ed2d659a8f9a983435dc99c533dcbc47b7d63f2e8e923da6623d49f77dbc59c92ab1c5c854bb2cb7d3f33fdd6eaea53bef0825b') 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-PipeViewer/gtk-pipe-viewer.desktop \ "$pkgdir"/usr/share/applications/gtk-pipe-viewer.desktop ln -s "/usr/share/perl5/auto/share/dist/WWW-PipeViewer/icons/gtk-pipe-viewer.png" \ "$pkgdir/usr/share/pixmaps/gtk-pipe-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" }