makedeb


lbry-viewer 0.0.9-1


A lightweight LBRY/Odysee client for Linux (CLI/GTK) (fork of pipe-viewer)

Viewing /PKGBUILD.

View raw.

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

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

pkgname=lbry-viewer
pkgver=0.0.9
pkgrel=1
pkgdesc="A lightweight LBRY/Odysee client for Linux (CLI/GTK) (fork of pipe-viewer)"
arch=('all')
url="https://github.com/trizen/${pkgname}"
license=('Artistic2.0')
conflicts=('lbry-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' 'webp-pixbuf-loader' 'yt-dlp')

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-charwidth-perl: get widths of characters'
    'mpv: play videos with MPV (recommended)'
    'vlc: play videos with VLC'
)
source=("$pkgname-$pkgver.tar.gz::https://github.com/trizen/lbry-viewer/archive/refs/tags/$pkgver.tar.gz")
b2sums=('b79279224aa910b81732914a601caec00e5b11816593fc2479ceff1c4ca79699aef666d1d5dbdbec5d65e1a05e4e95a1584a13af5fc9457b868662befea4a9f5')

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
    rm -r "$pkgdir/usr/lib"

    install -m644 -d "$pkgdir"/usr/share/{applications,pixmaps}
    mv "$pkgdir"/usr/share/perl5/auto/share/dist/WWW-LbryViewer/gtk-lbry-viewer.desktop \
        "$pkgdir"/usr/share/applications/gtk-lbry-viewer.desktop
    install -Dm644 "$pkgdir"/usr/share/perl5/auto/share/dist/WWW-LbryViewer/icons/gtk-lbry-viewer.png \
        "$pkgdir"/usr/share/pixmaps/gtk-lbry-viewer.png

    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"
}