diff options
author | Michael | 2023-09-09 08:16:19 -0400 |
---|---|---|
committer | Michael | 2023-09-09 08:16:19 -0400 |
commit | a3e73fbc864902d045ef5150d96c23c681581c86 (patch) | |
tree | f4201dc64687c5ce60f6e24b26705dc5e4c4d0e9 | |
download | aur-a3e73fbc864902d045ef5150d96c23c681581c86.tar.gz |
Initial commit for supercell-wx-bin
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 48 |
2 files changed, 67 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..51a2fdd988bc --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = supercell-wx-bin + pkgdesc = A NEXRAD Level 2 and Level 3 radar viewing application (Stable Build) + pkgver = 0.2.2 + pkgrel = 1 + url = https://github.com/dpaulat/supercell-wx + arch = x86_64 + license = MIT + makedepends = jq + makedepends = unzip + depends = xcb-util + depends = xcb-util-cursor + depends = mesa + provides = supercell-wx + conflicts = supercell-wx-unstable + conflicts = supercell-wx + source = https://github.com/dpaulat/supercell-wx/releases/download/v0.2.2-release/supercell-wx-linux-x64-v0.2.2.tar.gz + md5sums = SKIP + +pkgname = supercell-wx-bin diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..fb0b2868c719 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Michael Christoff <wxfanatic@gmail.com> + +pkgname=supercell-wx-bin +pkgver=0.2.2 +pkgrel=1 +pkgdesc="A NEXRAD Level 2 and Level 3 radar viewing application (Stable Build)" +arch=('x86_64') +url="https://github.com/dpaulat/supercell-wx" +license=('MIT') +makedepends=('jq' 'unzip') +depends=('xcb-util' 'xcb-util-cursor' 'mesa') +provides=("supercell-wx") +conflicts=('supercell-wx-unstable' 'supercell-wx') +source=("https://github.com/dpaulat/supercell-wx/releases/download/v${pkgver}-release/supercell-wx-linux-x64-v${pkgver}.tar.gz") +md5sums=('SKIP') + +pkgver() { + echo "$(curl -s "https://api.github.com/repos/dpaulat/supercell-wx/releases/latest" | jq -r '.tag_name' | sed 's/v//; s/-release//')" +} + +package() { + # Extract the tar.gz file + tar -xf "supercell-wx-linux-x64-v${pkgver}.tar.gz" -C "${srcdir}" + + # Confirming the internal structure is correct + if [[ ! -d "${srcdir}/supercell-wx/bin" || ! -d "${srcdir}/supercell-wx/lib" || ! -d "${srcdir}/supercell-wx/plugins" ]]; then + echo "Unexpected archive structure." + return 1 + fi + + # Rename the existing binary + mv "${srcdir}/supercell-wx/bin/supercell-wx" "${srcdir}/supercell-wx/bin/supercell-wx-bin" + + # Create a new script that sets LD_LIBRARY_PATH + echo '#!/bin/bash' > "${srcdir}/supercell-wx/bin/supercell-wx" + echo 'LD_LIBRARY_PATH=/opt/supercell-wx/lib:$LD_LIBRARY_PATH /opt/supercell-wx/bin/supercell-wx-bin "$@"' >> "${srcdir}/supercell-wx/bin/supercell-wx" + chmod +x "${srcdir}/supercell-wx/bin/supercell-wx" + + # Ensure the destination directory exists + mkdir -p "${pkgdir}/opt/supercell-wx" + + # Move the entire extracted supercell-wx directory content to /opt/supercell-wx/ + cp -a "${srcdir}/supercell-wx/"* "${pkgdir}/opt/supercell-wx/" + + # Create a symlink in /usr/bin for the new executable script + mkdir -p "${pkgdir}/usr/bin" + ln -s "/opt/supercell-wx/bin/supercell-wx" "${pkgdir}/usr/bin/supercell-wx" +} |