Package Details: vtex2-bin 0.3.1-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.000567
First Submitted: 2023-04-03 11:40 (UTC)
Last Updated: 2024-12-10 13:15 (UTC)

Latest Comments

doclic commented on 2024-12-10 13:19 (UTC)

Thanks for the patch, it's been merged. Also my original PKGBUILD was garbage, I think your comment was warranted.

HurricanePootis commented on 2024-12-10 04:38 (UTC)

@doclic new patch. I first wanna apologize for my previous behavior, it was totally uncalled for me. I should have not been so harsh in my tone whenever talking to you.

Also, I have a new patch :0

diff --git a/PKGBUILD b/PKGBUILD
index 56279db..9d8f9b1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,22 +1,27 @@
 # Maintainer: Doclic <doclic@tutanota.com>

 pkgname=vtex2-bin
-pkgver=0.1.2
+pkgver=0.3.1
 pkgrel=1
 pkgdesc="A VTF conversion and creation tool"
-arch=(i686 x86_64 aarch64)
+arch=(x86_64)
 url="https://github.com/StrataSource/vtex2"
 license=('MIT')
 depends=('libglvnd' 'glibc' 'gcc-libs' 'qt6-base')
+makedepends=('patchelf')
 provides=(vtex2)
 conflicts=(vtex2)
-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')
+source=("$url/releases/download/v${pkgver}/vtex2.linux-amd64.zip"
+   "$url/archive/refs/tags/v${pkgver}.tar.gz")
+md5sums=('5524585b80db1c18e988620427c377d3'
+         '4f65c0611719f2e56c223c9a27a3da2b')

 package() {
    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"
+   install -Dm644 "$srcdir/${pkgname::-4}-${pkgver}/LICENSE" "$pkgdir/usr/share/licenses/vtex2-bin/LICENSE"
+   for file in {vtex2,vtfview};
+   do
+   patchelf --remove-rpath "$pkgdir/usr/bin/${file}"
+   done
 }

This does the following: 1. Updates to 0.3.1 2. Adds patchelf as a makedepends() in order to remove insecure RUNPATH's from the binaries 3. Instead of downloading a git repo, just download the current archive for the version to get the LICENSE 4. Patch the binaries with a simple bash script

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