diff options
author | Alex Henrie | 2022-08-29 10:31:44 -0600 |
---|---|---|
committer | Alex Henrie | 2022-08-29 10:31:44 -0600 |
commit | 5d44b7d09ff85d9c7165cbfadb8195d92d24bb45 (patch) | |
tree | b16044c87f5780c211ad2ce5ab276c498552623a | |
parent | 6c899485e43a70d4a7683a392ad928bc410a6251 (diff) | |
download | aur-5d44b7d09ff85d9c7165cbfadb8195d92d24bb45.tar.gz |
Don't share the PLNXINSTALLLER variable between prepare() and package()
This fixes the error "PetaLinux installer is missing!" when installing
with an AUR helper such as yay.
-rw-r--r-- | PKGBUILD | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -9,17 +9,17 @@ license=('custom') depends=('bzip2' 'ccache' 'chrpath' 'cpio' 'diffstat' 'diffutils' 'dos2unix' 'git' 'glib2' 'gnupg' 'ncurses' 'ncurses5-compat-libs' 'net-tools' 'openssl' 'pax' 'perl' 'python-gitpython' 'python-jinja' 'python-pexpect' 'python-pip' 'python-pylint' 'screen' 'sdl' 'socat' 'unzip' 'wget' 'xterm' 'zlib') options=('!strip') install="$pkgname.install" -source=("local://petalinux-v$pkgver-final-installer.run") +_plnxinstaller="petalinux-v$pkgver-final-installer.run" +source=("local://$_plnxinstaller") sha256sums=('03be0351728ea7a5c3077ba86f30e4b4d47e717134fbd72cf2ec97cc6d766fe6') prepare() { - PLNXINSTALLLER="petalinux-v$pkgver-final-installer.run" + PLNXINSTALLLER="$_plnxinstaller" INITSETUP=$(awk '/^##__INITSETUP__/ { print NR + 1; exit 0; }' "${PLNXINSTALLLER}") SKIP=$(awk '/^##__PLNXSDK_FOLLOWS__/ { print NR + 1; exit 0; }' "${PLNXINSTALLLER}") sed -n -e "$INITSETUP,$(($SKIP-2)) p" "${PLNXINSTALLLER}" > "initsetup.tar.xz" truncate -s -1 initsetup.tar.xz bsdtar -xf initsetup.tar.xz - export PLNXINSTALLLER } package() { @@ -27,7 +27,7 @@ package() { PLATFORMS='aarch64 arm microblaze_full microblaze_lite' \ PLNXCHECKSUM='c4cbb8878f450915cd0d876c041293b0' \ PLNXINSTALLDIR="$pkgdir/opt/$pkgname" \ - PLNXINSTALLLER="$PLNXINSTALLLER" \ + PLNXINSTALLLER="$_plnxinstaller" \ ./petalinux-install grep -rlFI "$pkgdir" "$pkgdir" | xargs sed -i "s!$pkgdir!!g" install -Dm644 Petalinux_EULA.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE" |