summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJingbei Li2017-10-21 22:59:26 +0800
committerJingbei Li2017-10-21 22:59:26 +0800
commit3644ba95b50ce2ae670efed6e0a66685c350e62e (patch)
tree3971595dd3850570d42a98800cabf16aa7b8d084
parent411d1cb5890096bede4d12c979a161f530533692 (diff)
downloadaur-3644ba95b50ce2ae670efed6e0a66685c350e62e.tar.gz
re-patch .intall.py correctly
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD47
-rwxr-xr-xupgrade_helper.sh57
3 files changed, 26 insertions, 83 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a1cd9e108293..ccd86aa3ad3f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,11 @@
# Generated by mksrcinfo v8
-# Mon Oct 16 10:35:38 UTC 2017
+# Sat Oct 21 14:59:20 UTC 2017
pkgbase = anaconda2
pkgdesc = Completely free enterprise-ready Python distribution for large-scale data processing, predictive analytics, and scientific computing.
pkgver = 5.0.0
- pkgrel = 2
+ pkgrel = 3
url = https://store.continuum.io/cshop/anaconda/
install = anaconda2.install
- arch = x86
arch = x86_64
license = custom
makedepends = patch
diff --git a/PKGBUILD b/PKGBUILD
index cd640daad359..f9d1ee06b564 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,44 +1,45 @@
# Maintainer : Immae <ismael.bouya@normalesup.org>
# Contributor : Martin Wimpress <code@flexion.org>
# Contributor : Jingbei Li <i@jingbei.li>
-
pkgname=anaconda2
pkgver=5.0.0
-pkgrel=2
+pkgrel=3
pkgdesc="Completely free enterprise-ready Python distribution for large-scale data processing, predictive analytics, and scientific computing."
-arch=('x86' 'x86_64')
+arch=('x86_64')
url="https://store.continuum.io/cshop/anaconda/"
license=("custom")
makedepends=('patch')
source=("http://repo.continuum.io/archive/Anaconda2-${pkgver}-Linux-x86_64.sh"
- "$pkgname.install")
+"$pkgname.install")
options=(!strip libtool staticlibs)
sha256sums=('58a7117f89c40275114bf7e824a613a963da2b0fe63f2ec3c1175fea785b468e'
- 'c491735df1753335c6aa5b3b71bd936ccb4ff5622fedbf22d1d6d9da5bd45fbc')
+'c491735df1753335c6aa5b3b71bd936ccb4ff5622fedbf22d1d6d9da5bd45fbc')
install="$pkgname.install"
-_pkgarch=`uname -m`
-if [ "$CARCH" == "x86" ]; then
- _pkgarch="x86"
- sha256sums[0]='7764093f337a43e4962b12d01508c1a385f0f62c1ddc006b69af95ae763fc4c2'
- source[0]="http://repo.continuum.io/archive/Anaconda2-${pkgver}-Linux-x86.sh"
-fi
+prepare() {
+ cd ${srcdir}
+ msg2 "Patching Anaconda2-${pkgver}-Linux-x86_64.sh"
+ sed \
+ -e '/wc -c "\$THIS_PATH" | grep/s/!//' \
+ -e "/export FORCE/s|$|;sed \"/^def update_prefix/a\\\ new_prefix='/opt/$pkgname'\" -i pkgs/.install.py|" \
+ -i Anaconda2-${pkgver}-Linux-x86_64.sh
+}
package() {
- prefix=${pkgdir}/opt/${pkgname}
- LD_PRELOAD="/usr/lib/libfakeroot/libfakeroot.so"
-
- msg2 "Installing anaconda to /opt/${pkgname}"
- bash ${srcdir}/Anaconda2-${pkgver}-Linux-${_pkgarch}.sh -b -p $prefix -f
+ prefix=${pkgdir}/opt/${pkgname}
+ LD_PRELOAD="/usr/lib/libfakeroot/libfakeroot.so"
- cd $prefix
+ msg2 "Installing anaconda to /opt/${pkgname}"
+ bash ${srcdir}/Anaconda2-${pkgver}-Linux-x86_64.sh -b -p $prefix -f
+ [ "$BREAK_EARLY" = 1 ] && exit 1
+ cd $prefix
- msg2 "Correcting permissions"
- chmod a+r -R $prefix/pkgs
+ msg2 "Correcting permissions"
+ chmod a+r -R pkgs
- msg2 "Stripping \$pkgdir"
- sed "s|${pkgdir}||g" -i $(grep "$pkgdir" . -rIl)
+ msg2 "Stripping \$pkgdir from default meta"
+ find conda-meta -name '*.json' -exec sed -e "s/${pkgdir//\//\\\/}//g" -i {} \;
- msg2 "Installing license"
- install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ msg2 "Installing license"
+ install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
diff --git a/upgrade_helper.sh b/upgrade_helper.sh
deleted file mode 100755
index d48d11dce724..000000000000
--- a/upgrade_helper.sh
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/bash
-
-echo "update pkgver in PKGBUILD"
-read
-
-echo "Downloading files (checks will fail)"
-makepkg --verifysource
-CARCH=x86 makepkg --verifysource
-
-source PKGBUILD
-anaconda_x86_64=Anaconda2-${pkgver}-Linux-x86_64.sh
-anaconda_x86=Anaconda2-${pkgver}-Linux-x86.sh
-cp $anaconda_x86_64 ${anaconda_x86_64}.old
-cp $anaconda_x86 ${anaconda_x86}.old
-
-echo "Modify $anaconda_x86 and $anaconda_x86_64"
-read
-
-diff -u ${anaconda_x86_64}.old $anaconda_x86_64 > installer_sh_x86_64.patch
-diff -u ${anaconda_x86}.old $anaconda_x86 > installer_sh_x86.patch
-
-mv -f ${anaconda_x86_64}.old $anaconda_x86_64
-mv -f ${anaconda_x86}.old $anaconda_x86
-
-echo "Clean installer_sh_x86_64.patch and installer_sh_x86.patch (update header and remove tail)"
-read
-
-updpkgsums
-sha256sum $anaconda_x86
-echo "update sha256sum for $anaconda_x86 in PKGBUILD"
-read
-BREAK_EARLY=1 makepkg
-grep CONDA_INSTALL= installer_sh_x86_64.patch
-echo "Edit conda_install patch to have correct conda version in header"
-read
-cd pkg/anaconda2/opt/anaconda2/
-conda_install=`ls -1 pkgs/conda-*/lib/python*/site-packages/conda/install.py`
-cp $conda_install ${conda_install}.old
-echo "Trying patch as is:"
-patch -p1 < ../../../../conda_install.patch
-
-diff -u ${conda_install}.old ${conda_install} > ../../../../conda_install.patch
-
-cd -
-
-echo "Check conda_install.patch and update header"
-
-read
-updpkgsums
-grep CONDA_INSTALL= installer_sh_x86_64.patch
-grep PYTHON= installer_sh_x86_64.patch
-echo "Update _pythonver and _condaver in PKGBUILD"
-read
-
-echo "upgrading srcinfo"
-mksrcinfo
-echo "Done"