summaryrefslogtreecommitdiff
path: root/extra/twisted/PKGBUILD
blob: f42dd8ab04f8f3473c03b842153d2b8505b42524 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# $Id: PKGBUILD 145135 2011-12-17 16:20:46Z ibiru $
# Maintainer : Ionut Biru <ibiru@archlinux.org>
# Contributor: Juergen Hoetzel <juergen@archlinux.org>
# Contributor:  Douglas Soares de Andrade <douglas@archlinux.org>

pkgname=twisted
pkgver=11.1.0
pkgrel=1
pkgdesc="Asynchronous networking framework written in Python."
arch=('i686' 'x86_64' 'mips64el')
url="http://twistedmatrix.com/"
license=('MIT')
depends=('python2' 'pycrypto' 'zope-interface')
optdepends=('python2-pyopenssl'
            'python-soappy:for twisted.web.soap')
install=twisted.install
source=(http://twistedmatrix.com/Releases/Twisted/${pkgver%.*}/Twisted-$pkgver.tar.bz2)
md5sums=('972f3497e6e19318c741bf2900ffe31c')

build() {
    cd "$srcdir/Twisted-$pkgver"
    python2 setup.py build
}

package() {
    cd "$srcdir/Twisted-$pkgver"
    python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
    install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

    sed -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|' \
        -i "$pkgdir"/usr/lib/python2.7/site-packages/twisted/trial/test/scripttest.py
    sed -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|' \
        -i "$pkgdir"/usr/lib/python2.7/site-packages/twisted/mail/test/pop3testserver.py
}