diff options
author | Michael Hanson <hansonorders@verizon.net> | 2010-11-13 03:10:36 (GMT) |
---|---|---|
committer | Michael Hanson <hansonorders@verizon.net> | 2010-11-13 03:10:36 (GMT) |
commit | b30624acee08dc4a99e2abc579ae03d380354a14 (patch) | |
tree | 2af979cd58bfe18a1f084fc4c5766880eaf3ea5b /abs/core/python2/PKGBUILD | |
parent | ee66a417b448c74df51683e005f9e99ed11b5f9c (diff) | |
download | linhes_pkgbuild-b30624acee08dc4a99e2abc579ae03d380354a14.zip linhes_pkgbuild-b30624acee08dc4a99e2abc579ae03d380354a14.tar.gz linhes_pkgbuild-b30624acee08dc4a99e2abc579ae03d380354a14.tar.bz2 |
python2: initial import. python now = python3
Diffstat (limited to 'abs/core/python2/PKGBUILD')
-rw-r--r-- | abs/core/python2/PKGBUILD | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/abs/core/python2/PKGBUILD b/abs/core/python2/PKGBUILD new file mode 100644 index 0000000..6e548de --- /dev/null +++ b/abs/core/python2/PKGBUILD @@ -0,0 +1,68 @@ +# $Id: PKGBUILD 96373 2010-10-20 03:29:47Z allan $ +# Maintainer: Allan McRae <allan@archlinux.org> +# Contributer: Jason Chu <jason@archlinux.org> + +pkgname=python2 +pkgver=2.7 +pkgrel=3 +_pybasever=2.7 +pkgdesc="A high-level scripting language" +arch=('i686' 'x86_64') +license=('PSF') +url="http://www.python.org" +depends=('db' 'bzip2' 'gdbm' 'openssl' 'zlib' 'expat' 'sqlite3') +makedepends=('tk') +optdepends=('tk: for IDLE') +conflicts=('python<3') +options=('!makeflags') +source=(http://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tar.bz2 + python-2.7-db51.diff) +md5sums=('0e8c9ec32abf5b732bea7d91b38c3339' + 'd9b8161568ce17a305c1b71e61ccd4b5') + +build() { + cd ${srcdir}/Python-${pkgver} + + patch -Np1 -i $srcdir/python-2.7-db51.diff + + export OPT="${CFLAGS}" + ./configure --prefix=/usr --enable-shared --with-threads \ + --enable-unicode=ucs4 --with-system-expat + + make || return 1 +} + +package() { + cd ${srcdir}/Python-${pkgver} + make DESTDIR=${pkgdir} altinstall || return 1 + + ln -sf python${_pybasever} $pkgdir/usr/bin/python2 + ln -sf python${_pybasever}-config $pkgdir/usr/bin/python2-config + + ln -sf ../../libpython${_pybasever}.so \ + ${pkgdir}/usr/lib/python${_pybasever}/config/libpython${_pybasever}.so + + mv $pkgdir/usr/bin/smtpd.py $pkgdir/usr/lib/python${_pybasever}/ + + # some useful "stuff" + install -dm755 ${pkgdir}/usr/lib/python${_pybasever}/Tools/{i18n,scripts} + install -m755 Tools/i18n/{msgfmt,pygettext}.py \ + ${pkgdir}/usr/lib/python${_pybasever}/Tools/i18n/ + install -m755 Tools/scripts/{README,*py} \ + ${pkgdir}/usr/lib/python${_pybasever}/Tools/scripts/ + + # fix conflicts with python + mv $pkgdir/usr/bin/idle{,2} + mv $pkgdir/usr/bin/pydoc{,2} + + # clean up #!s + find $pkgdir/usr/lib/python2.7/ -name '*.py' | \ + xargs sed -i "s|#[ ]*![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" + + # clean-up reference to build directory + sed -i "s#$srcdir/Python-${pkgver}:##" \ + $pkgdir/usr/lib/python${_pybasever}/config/Makefile + + # license + install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE +} |