makedeb


pipe-viewer-git 0.5.0.r1.f7da844-1


A lightweight YouTube client for Linux (CLI/GTK) (fork of straw-viewer)

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for pipe-viewer-git.

# Maintainer: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
# Contributor: Trizen (AUR) <echo dHJpemVuQHByb3Rvbm1haWwuY29tCg== | base64 -d>

_pkgname=pipe-viewer
pkgname=pipe-viewer-git
pkgver=0.5.0.r1.f7da844
pkgrel=1
pkgdesc="A lightweight YouTube client for Linux (CLI/GTK) (fork of straw-viewer)"
arch=('all')
url="https://github.com/trizen/${_pkgname}"
license=('Artistic2.0')
makedepends=('git' 'libmodule-build-perl')
checkdepends=('libjson-perl')
provides=('gtk-pipe-viewer-git')
conflicts=('pipe-viewer' 'gtk-pipe-viewer')
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'
    '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=("git+https://github.com/trizen/${_pkgname}.git")
sha512sums=('SKIP')

pkgver() {
     cd "$srcdir/${_pkgname}"
     #git describe --long --tags --always | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
     printf "%s.r%s.%s" "$(grep VERSION lib/WWW/PipeViewer.pm | cut -d \' -f 2)" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd "$_pkgname"
    perl Build.PL --gtk3
}

check(){
    cd "$_pkgname"
    perl Build test
}

package() {
    cd "$_pkgname"
    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"
}