Package Details: vtex2-bin 0.1.2-1

Git Clone URL: https://aur.archlinux.org/vtex2-bin.git (read-only, click to copy)
Package Base: vtex2-bin
Description: A VTF conversion and creation tool
Upstream URL: https://github.com/StrataSource/vtex2
Licenses: MIT
Conflicts: vtex2
Provides: vtex2
Submitter: doclic
Maintainer: doclic
Last Packager: doclic
Votes: 1
Popularity: 0.122503
First Submitted: 2023-04-03 11:40 (UTC)
Last Updated: 2024-01-11 23:38 (UTC)

Latest Comments

doclic commented on 2024-01-11 23:41 (UTC)

Thanks for the patches, they're merged now. I wrote these packages before I really knew how PKGBUILDs were written which is why they're so messy.

HurricanePootis commented on 2024-01-11 21:34 (UTC)

I don't even know where to being with this PKGBUILD. Using curl and trying to scrape the pkgver in the PKGVER of a -bin package is such a lazy and messy way to do things, not to mention wholly inappropriate. I have cleaned up this mess of a package with the following patch.

diff --git a/PKGBUILD b/PKGBUILD
index 1a0fab4..0cf8bd0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,48 +3,21 @@
 pkgname=vtex2-bin
 pkgver=0.1.2
 pkgrel=1
-epoch=
 pkgdesc="A VTF conversion and creation tool"
 arch=(i686 x86_64 aarch64)
 url="https://github.com/StrataSource/vtex2"
 license=('MIT')
-groups=()
-depends=()
-makedepends=()
-checkdepends=()
-optdepends=(qt6-base wget curl)
+depends=('libglvnd' 'glibc' 'gcc-libs' 'qt6-base')
 provides=(vtex2)
 conflicts=(vtex2)
-replaces=()
-backup=()
-options=()
-install=
-changelog=
-source=("https://github.com/StrataSource/vtex2/releases/download/v${pkgver}/vtex2.linux-amd64.zip")
-noextract=()
-md5sums=('SKIP')
-validpgpkeys=()
-
-pkgver() {
-   # Try curl or wget, if none are installed, use default
-   if command -v curl >/dev/null 2>&1; then
-     curl --silent "https://api.github.com/repos/StrataSource/vtex2/releases/latest" | # Get latest release from GitHub api
-        grep '"tag_name":' | # Get tag line
-        sed -E 's/.*"v([^"]+)".*/\1/' # Pluck JSON value
-    elif command -v wget >/dev/null 2>&1; then
-      wget -qO- "https://api.github.com/repos/StrataSource/vtex2/releases/latest" | # Get latest release from GitHub api
-        grep '"tag_name":' | # Get tag line
-        sed -E 's/.*"v([^"]+)".*/\1/' # Pluck JSON value
-   else
-     printf $pkgver
-    fi
-}
+source=("https://github.com/StrataSource/vtex2/releases/download/v${pkgver}/vtex2.linux-amd64.zip"
+       "vtex2-repo::git+https://github.com/StrataSource/vtex2.git")
+md5sums=('42d22ca2c3239bbdfe57e7557e1f8e27'
+         'SKIP')

 package() {
-  cd $srcdir
-  mkdir -p "${pkgdir}/usr/bin"
-  unzip vtex2.linux-amd64.zip -d "${pkgdir}/usr/bin/"
-  chmod 755 "${pkgdir}/usr/bin/vtex2"
-  chmod 755 "${pkgdir}/usr/bin/vtfview"
+   install -Dm755 "$srcdir/vtex2" "$pkgdir/usr/bin/vtex2"
+   install -Dm755 "$srcdir/vtfview" "$pkgdir/usr/bin/vtfview"
+   install -Dm644 "$srcdir/vtex2-repo/LICENSE" "$pkgdir/usr/share/licenses/vtex2-bin/LICENSE"
 }