#!/bin/bash # # Maintainer: Deposite Pirate source /usr/src/ports/Build/build.sh NAME=python MAJOR=2.7 VERSION=${MAJOR}.4 BUILD=1 OPTDEPENDS=('gdbm >= 1.10-1' 'bzip2 >= 1.0.6-1' 'openssl >= 1.0.1e-1' 'expat >= 2.1.0-1' 'sqlite >= 3.7.16.1-1') # Description cat > ${PKG}/install/slack-desc < python2.1 echo ".so man1/python${MAJOR}.1" > python.1 ) # Fix conflicts with python 3.x ( cd ${PKG}${SYS_DIR[bin]} mv idle{,2} mv pydoc{,2} mv 2to3{,-${MAJOR}} ln -sf idle2 idle ln -sf pydoc2 pydoc ln -sf 2to3-${MAJOR} 2to3 ) # We don't need smtp.py in /usr/bin mv ${PKG}${SYS_DIR[bin]}/smtpd.py ${PKG}${PYTHONLIBDIR} # python -> python2 sed -i "s|#[ ]*![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ $(find ${PKG}${PYTHONLIBDIR} -name '*.py') # More clean up... sed -i "s|${PKG}/Python-${SRCVERS[0]}:||g" ${PKG}${PYTHONLIBDIR}/config/Makefile }