Skip to content

Instantly share code, notes, and snippets.

@sukanka
Created January 24, 2022 07:42
Show Gist options
  • Save sukanka/f20c2260408a0c8aaeaa61b1bf73dd3a to your computer and use it in GitHub Desktop.
Save sukanka/f20c2260408a0c8aaeaa61b1bf73dd3a to your computer and use it in GitHub Desktop.
Anaconda PKGBUILD
# Maintainer : Jingbei Li <[email protected]>
# Contributor : Immae <[email protected]>
# Contributor : Martin Wimpress <[email protected]>
pkgname=anaconda
pkgver=2021.11
pkgrel=1
pkgdesc="Completely free enterprise-ready Python distribution for large-scale data processing, predictive analytics, and scientific computing."
arch=('x86_64')
url='https://www.anaconda.com/'
license=("BSD")
source=("https://mirrors.bfsu.edu.cn/anaconda/archive/Anaconda3-2021.11-Linux-x86_64.sh")
options=(!strip libtool staticlibs)
sha256sums=('fedf9e340039557f7b5e8a8a86affa9d299f5e9820144bd7b92ae9f7ee08ac60')
install="$pkgname.install"
package() {
prefix=${pkgdir}/opt/${pkgname}
LD_PRELOAD="/usr/lib/libfakeroot/libfakeroot.so"
msg2 "Installing ${pkgname} to /opt/${pkgname}"
bash ${srcdir}/Anaconda3-${pkgver}-Linux-${CARCH}.sh -b -p $prefix -f
[ "$BREAK_EARLY" = 1 ] && exit 1
cd $prefix
msg2 "Correcting permissions"
chmod a+r -R pkgs
msg2 "Stripping \$pkgdir"
find * -type f -print0 | xargs -0 sed -i "s|${pkgdir}||g"
msg2 "Removing external apps"
_pydir=$(ls ${prefix}/lib/ | grep -E ^python)
echo 'apps = {}' >> "${prefix}/lib/${_pydir}/site-packages/anaconda_navigator/api/external_apps/__init__.py"
msg2 "Installing license"
install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment