# Description: Mini version of Anaconda Python distribution # URL: https://conda.io/en/latest/miniconda # Maintainer: Petar Petrov, slackalaxy at gmail dot com # Depends on: name=miniconda3 version=24.1.2.0 release=1 source=(https://repo.anaconda.com/miniconda/Miniconda3-py311_${version%.*}-${version##*.}-Linux-x86_64.sh) build() { prefix=$PKG/usr/lib/$name LD_PRELOAD="/usr/lib/libfakeroot.so" bash $SRC/Miniconda3-py311_${version%.*}-${version##*.}-Linux-x86_64.sh -b -p $prefix -f [ "$BREAK_EARLY" = 1 ] && exit 1 cd $prefix chmod a+r -R pkgs sed -e "s|${PKG}||g" -i $(grep "${PKG}" . -rIl 2>/dev/null) mkdir -p $PKG/etc/revdep.d cd $PKG/usr/lib/$name # cleanup junk JUNK=( AUTHORS ChangeLog COPYING INSTALL INSTALLER README NEWS TODO THANKS) for i in ${JUNK[@]}; do find $PKG/ -name "*${i}*" -delete done # https://stackoverflow.com/questions/539583/how-do-i-recursively-list-all-directories-at-a-location-breadth-first find . -type d | perl -lne 'print tr:/::, " $_"' | sort -n | cut -d' ' -f2 > $PKG/etc/revdep.d/$name sed -i "s:\.:/usr/lib/$name:g" $PKG/etc/revdep.d/$name }