summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorfatalis2018-02-14 12:07:52 -0600
committerfatalis2018-02-14 12:07:52 -0600
commit2aec0bdded708fe3dccd56ce88bca77cb0be158b (patch)
treee9b44f99fc08679b4f14b28f2f6a20f8228cfc04
parent7da30bf964a223e0450c9a62c7cc8f295375848a (diff)
downloadaur-2aec0bdded708fe3dccd56ce88bca77cb0be158b.tar.gz
Fix incorrectly referencing sources outside of srcdir
-rw-r--r--PKGBUILD37
1 files changed, 22 insertions, 15 deletions
diff --git a/PKGBUILD b/PKGBUILD
index cad5bfa44ba4..5d9f3d40a063 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,27 +9,34 @@ license=('custom')
makedepends=('fakechroot')
options=('!strip')
_installer='idafree70_linux.run'
-source=("https://out7.hex-rays.com/files/${_installer}")
-sha256sums=('e38333d6cf844706ec48d154e64740b9b125c388f7b3a541104ba0a9a61321ab')
+source=("https://out7.hex-rays.com/files/${_installer}"
+ 'ida-free.desktop')
+sha256sums=('e38333d6cf844706ec48d154e64740b9b125c388f7b3a541104ba0a9a61321ab'
+ 'SKIP')
package() {
- install -d "${pkgdir}/opt/${pkgname}"
- install -d "${pkgdir}/usr/bin"
- install -d "${pkgdir}/usr/share/"{icons,applications,licenses/${pkgname}}
+ install -d "${pkgdir}"/opt/${pkgname}
+ install -d "${pkgdir}"/usr/bin
+ install -d "${pkgdir}"/usr/share/{icons,applications,licenses/${pkgname}}
+ install -d "${pkgdir}"/tmp
# chroot is needed to prevent the installer from creating a single file outside of prefix
- mkdir -p ../tmp
- chmod +x ${_installer}
- fakechroot chroot ../ /${_installer} --mode unattended --prefix "/pkg/${pkgname}/opt/${pkgname}"
- install ../ida-free.desktop "${pkgdir}/usr/share/applications"
+ # have to copy the installer due to chroot
+ cp "${srcdir}"/${_installer} "${pkgdir}"/
+ chmod +x "${pkgdir}"/${_installer}
+ fakechroot chroot "${pkgdir}" /${_installer} --mode unattended --prefix /opt/${pkgname}
+ rm "${pkgdir}"/${_installer}
+ rm "${pkgdir}"/tmp/bitrock_installer.log
+ rmdir "${pkgdir}"/tmp
# the installer needlessly makes a lot of files executable
- find "${pkgdir}/opt/${pkgname}" -type f -exec chmod -x {} \;
- chmod +x "${pkgdir}/opt/${pkgname}/ida64"
+ find "${pkgdir}"/opt/${pkgname} -type f -exec chmod -x {} \;
+ chmod +x "${pkgdir}"/opt/${pkgname}/ida64
- rm "${pkgdir}/opt/${pkgname}/"{uninstall*,Uninstall*,assistant}
+ rm "${pkgdir}"/opt/${pkgname}/{uninstall*,Uninstall*,assistant}
- ln -s /opt/${pkgname}/appico64.png "${pkgdir}/usr/share/icons/ida-free.png"
- ln -s /opt/${pkgname}/license.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
- ln -s /opt/${pkgname}/ida64 "${pkgdir}/usr/bin/ida64"
+ install "${srcdir}"/ida-free.desktop "${pkgdir}"/usr/share/applications
+ ln -s /opt/${pkgname}/appico64.png "${pkgdir}"/usr/share/icons/ida-free.png
+ ln -s /opt/${pkgname}/license.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+ ln -s /opt/${pkgname}/ida64 "${pkgdir}"/usr/bin/ida64
}