makedeb
A lightweight LBRY/Odysee client for Linux (CLI/GTK) (fork of pipe-viewer)
Viewing /PKGBUILD
.
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.1.0
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=('4def149b71596eef918d11831c66f750416a17b51a897876c9fd17f63eb1612e545e70cde10f1d52baf510051e6b19a72e55ceb43c5a3bf4950405f6f9f0688a')
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-LbryViewer/gtk-lbry-viewer.desktop \
"$pkgdir"/usr/share/applications/gtk-lbry-viewer.desktop
ln -s "/usr/share/perl5/auto/share/dist/WWW-LbryViewer/icons/gtk-lbry-viewer.png" \
"$pkgdir/usr/share/pixmaps/gtk-lbry-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"
}