summaryrefslogtreecommitdiff
path: root/pcr/gtk-youtube-viewer/PKGBUILD
blob: d7797e52adb785a5a71d9bd3d1229262c085cbba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Maintainer:  <heckyel@parabola.nu>

_pkgname=youtube-viewer
pkgname=gtk-youtube-viewer
pkgver=3.2.9
pkgrel=1.parabola1
pkgdesc="A Gtk2 application for searching and streaming videos from YouTube."
arch=('any')
url="https://github.com/trizen/youtube-viewer"
license=('Artistic2.0')
makedepends=('perl-module-build')
provides=('youtube-viewer')
conflicts=('youtube-viewer')
depends=('perl>=5.16.0' 'perl-data-dump' 'perl-json' 'perl-lwp-protocol-https' 'perl-libwww' 'gtk2-perl' 'perl-file-sharedir')
optdepends=(
    'youtube-dl: for playing videos with encrypted signatures'
    'gnome-icon-theme: for icons in menus'
    'mplayer: for playing videos with MPlayer'
    'mpv: for playing videos with MPV (recommended)'
    'perl-json-xs: faster JSON to HASH conversion'
    'perl-lwp-useragent-cached: cache support'
    'perl-term-readline-gnu: for better STDIN support'
    'perl-unicode-linebreak: for printing results in a fixed-width format (-W)'
    'smplayer: for playing videos with SMPlayer'
    'vlc: for playing videos with VLC'
    'wget: for downloading videos with wget'
)
source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/trizen/$_pkgname/archive/$pkgver.tar.gz")
sha512sums=('1431e9bf90c9a7cfe77f88b27582eebe7a9cf5d1ef213ac33cd3f9b6746c4d5476a1bc435d81b0eda82d2db85811fe0e0722ed0b63e38bb8cd2270eef40988ab')

build() {
  cd "$_pkgname-$pkgver"
  perl Build.PL --destdir "$pkgdir" --installdirs vendor --gtk
}

check(){
  cd "$_pkgname-$pkgver"
  ./Build test
}

package() {
  cd "$_pkgname-$pkgver"
  ./Build install --install_path script=/usr/bin
  rm -r "$pkgdir"/usr/lib

  install -Dm 644 "share/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
  install -Dm 644 "share/icons/$pkgname.png" "$pkgdir/usr/share/pixmaps/$pkgname.png"
}