summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAlex Henrie2022-08-29 10:31:44 -0600
committerAlex Henrie2022-08-29 10:31:44 -0600
commit5d44b7d09ff85d9c7165cbfadb8195d92d24bb45 (patch)
treeb16044c87f5780c211ad2ce5ab276c498552623a /PKGBUILD
parent6c899485e43a70d4a7683a392ad928bc410a6251 (diff)
downloadaur-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.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD8
1 files changed, 4 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 714a081f6435..3608f9553a3b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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"