summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f1669caaeefa9cfa3ba3856dae2cb05767bb4713 (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
pkgname=python2-transi2p
pkgver=1.2.3
pkgrel=1
pkgdesc="Transparent proxy for i2p."
arch=('any')
url="https://pypi.python.org/pypi/transi2p"
license=('')
depends=('python2-twisted' 'python2-txi2p')
options=('!emptydirs')
source=("https://pypi.python.org/packages/source/t/transi2p/transi2p-${pkgver}.tar.gz")
sha256sums=('670eeee9fccf740b25b32174e89f3d84c7411fb7b6d8ee3454ac7f84eea57a80')
prepare() {
  cd "$srcdir/transi2p-$pkgver"

  # argparse is part of python 2.7+, so we can remove it from install_requires
  sed -i "/'argparse',/d" setup.py
  
  find . -type f \( -name '*.py' -or -executable \) -exec \
    sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
           -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
           \{\} + 
}

package() {
  cd "$srcdir/transi2p-$pkgver"
  python2 setup.py install --root="$pkgdir/" --optimize=1

  #install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}