blob: 966eae21047fec33739862034d9cdb5263f76314 (
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Michael Schubert <mschu.dev at gmail>
pkgbase=python-pysocks
pkgname=(python-pysocks python2-pysocks)
pkgver=1.6.8
pkgrel=1
pkgdesc="SOCKS4, SOCKS5 or HTTP proxy (Anorov fork PySocks replaces socksipy)"
arch=('any')
license=('BSD')
url="https://github.com/Anorov/PySocks"
makedepends=('python-setuptools' 'python2-setuptools')
checkdepends=('lib32-glibc' 'python2-twisted' 'python2-tornado')
source=("$pkgbase-$pkgver.tar.gz::https://github.com/Anorov/PySocks/archive/$pkgver.tar.gz")
sha512sums=('d6d28a77e1162dee2574c5ca69a01b94ebb3c0c5e9f875569ace2689ea31a4eebed1463472731635b242698a3a3215cadd79744c068610995d81f95ef94dd228')
prepare() {
cp -a PySocks-$pkgver{,-py2}
}
build() {
cd "$srcdir"/PySocks-$pkgver
python setup.py build
cd "$srcdir"/PySocks-$pkgver-py2
python2 setup.py build
}
# Tests disabled as it requires external services to run
check_disabled() {
cd "$srcdir"/PySocks-$pkgver-py2/test
python2 socks4server.py &
_SOCKS4SERVER=$!
python2 httpproxy.py &
_HTTPPROXY=$1
./mocks start
sleep 1
python2 sockstest.py
cd "$srcdir"/PySocks-$pkgver/test
python sockstest.py
./mocks shutdown
kill $_SOCKS4SERVER $_HTTPPROXY
}
package_python-pysocks() {
depends=('python')
cd PySocks-$pkgver
python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
}
package_python2-pysocks() {
depends=('python2')
cd PySocks-$pkgver-py2
python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
}
|