makedeb


youtube-viewer-git 3.11.0.r71.b3ceba2-1


A lightweight YouTube client for Linux (CLI/GTK)

Click here to go back to the commit logs for youtube-viewer-git.

Commit:


Hash: e20dded2de7b88931f63113d52bdc06e2f8ca1d4

Message: update pkgver

Diff


diff --git a/.SRCINFO b/.SRCINFO
index 6cd795a..a5b32bf 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -3,7 +3,7 @@ pkgname = youtube-viewer-git
 pkgbase = youtube-viewer-git
 pkgdesc = A lightweight YouTube client for Linux (CLI/GTK)
 pkgrel = 1
-pkgver = 3.11.0.r0.gb3ceba2
+pkgver = 3.11.0.r71.b3ceba2
 url = https://github.com/trizen/youtube-viewer
 arch = all
 checkdepends = libjson-perl
diff --git a/PKGBUILD b/PKGBUILD
index 7147b0f..0fc787e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
 
 _pkgname=youtube-viewer
 pkgname=youtube-viewer-git
-pkgver=3.11.0.r0.gb3ceba2
+pkgver=3.11.0.r71.b3ceba2
 pkgrel=1
 pkgdesc="A lightweight YouTube client for Linux (CLI/GTK)"
 arch=('all')
@@ -14,7 +14,6 @@ checkdepends=('libjson-perl')
 provides=('gtk-youtube-viewer-git')
 conflicts=('youtube-viewer' 'gtk-youtube-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'
@@ -30,13 +29,13 @@ optdepends=(
     '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 "$_pkgname"
-  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+    cd "$srcdir/${_pkgname}"
+    #git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+    printf "%s.r%s.%s" "$(grep VERSION lib/WWW/YoutubeViewer.pm | cut -d \' -f 2)" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
 }
 
 build() {
@@ -52,14 +51,17 @@ check(){
 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-YoutubeViewer/gtk-youtube-viewer.desktop" \
         "$pkgdir"/usr/share/applications/gtk-youtube-viewer.desktop
-    install -Dm644 "$pkgdir"/usr/share/perl5/auto/share/dist/WWW-YoutubeViewer/icons/gtk-youtube-viewer.png \
-        "$pkgdir"/usr/share/pixmaps/gtk-youtube-viewer.png
-
+    ln -s "/usr/share/perl5/auto/share/dist/WWW-YoutubeViewer/icons/gtk-youtube-viewer.png" \
+        "$pkgdir/usr/share/pixmaps/gtk-youtube-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"