summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorchrisjbillington2022-01-19 18:48:57 +1100
committerchrisjbillington2022-01-19 18:48:57 +1100
commit5a494ba9f0e910d73e2cd9e369705e30843a759e (patch)
treed895cafd35c65a1d8d8be9fd55be18636ab3acd8 /PKGBUILD
parent059f7576d16a72e223cdd6716a5b6957d9192974 (diff)
downloadaur-python-mkl-fft-bin.tar.gz
Fix prefix replacement
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD15
1 files changed, 11 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 0cce2f3d08c..3247aac5b19 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@ _pkgname=mkl_fft
_pkgver=1.3.1
_build=py310h6feb928_0
pkgver="${_pkgver}.anaconda${_build##*_}"
-pkgrel=2
+pkgrel=3
epoch=1
pkgdesc="Fast Fourier Transform using Intel MKL - prebuilt binaries from Anaconda"
arch=('x86_64')
@@ -13,14 +13,21 @@ license=('custom')
provides=('python-mkl-fft')
conflicts=('python-mkl-fft')
depends=('python-mkl-service' 'python-numpy')
+makedepends=('jq')
source=("https://repo.anaconda.com/pkgs/main/linux-64/${_pkgname}-${_pkgver}-${_build}.tar.bz2")
sha256sums=('013091bc2e0758257b67070aacb6225a1d5207989ead18d0d37c7bd027211159')
+prepare() {
+ # Prefix replacement
+ for row in $(jq -c '.paths[] | select(has("prefix_placeholder"))' "info/paths.json"); do
+ path=$(echo $row | jq -r '._path')
+ prefix=$(echo $row | jq -r '.prefix_placeholder')
+ sed -i "s:${prefix}:/usr:g" "${path}"
+ done
+}
+
package() {
mkdir "${pkgdir}/usr"
cp -drp --no-preserve=ownership "${srcdir}/lib" "${pkgdir}/usr/lib"
install -D -m 644 "${srcdir}/info/licenses/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-
- # Prefix replacement:
- find "${pkgdir}" -type f -exec sed -i -e s:/opt/anaconda1anaconda2anaconda3:/usr:g {} +
}