# $Id$
# Maintainer: Ray Rashif <schiv@archlinux.org>
# Contributor: damir <damir@archlinux.org>
# Contributor: Lukas Sabota <punkrockguy318@comcast.net>
# Contributor: Brice Carpentier <brice@dlfp.org>

# reminder: scons moving towards py3 as of Mar 2014 and 2.3.1

pkgname=scons
pkgver=2.3.1
pkgrel=1
pkgdesc="Extensible Python-based build utility"
arch=('any')
url="http://scons.org"
license=('MIT')
depends=('python2')
source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz")
md5sums=('60a3cfb98b661df9f4406c61b5686bd7')

package() {
  cd "$srcdir/$pkgname-$pkgver"

  python2 setup.py install --standard-lib \
                           --prefix=/usr \
                           --install-data=/usr/share \
                           --optimize=1 \
                           --root="$pkgdir"

  # fix for python 2.7
  sed -i 's:^#!.*bin/env python:#!/usr/bin/env python2:' \
    "$pkgdir"/usr/bin/*

  install -Dm644 LICENSE.txt \
    "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

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