# Maintainer: Allan McRae <allan@archlinux.org>
# Contributer: Jason Chu <jason@archlinux.org>

pkgname=python
pkgver=2.7.1
pkgrel=1
_pybasever=2.7
pkgdesc="a high-level scripting language"
arch=('i686' 'x86_64')
license=('PSF')
url="http://www.python.org"
depends=('expat' 'bzip2' 'gdbm' 'openssl' 'libffi' 'zlib')
optdepends=('tk: for IDLE')
provides=('python2' 'python-elementtree' 'python-ctypes')
replaces=('python-elementtree' 'python-ctypes')
source=("http://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tar.bz2")
md5sums=('aa27bc25725137ba155910bd8e5ddc4f')

build() {
  cd $srcdir/Python-$pkgver
  
  export OPT="${CFLAGS}"
  ./configure \
    --prefix=/usr \
    --enable-shared \
    --with-threads \
    --with-system-expat \
    --with-system-ffi \
    --enable-ipv6 \
    --enable-unicode || return 1
  
  make || return 1
}

package() {
  cd $srcdir/Python-$pkgver
  make DESTDIR=$pkgdir install || return 1
 
  # license
  install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE || return 1
}

# vim:set ts=2 sw=2 et:
