summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoranthraxx2018-04-06 00:28:44 +0200
committeranthraxx2018-04-06 00:28:53 +0200
commitade0e761968ee38eec02d72c1873112a561dfff8 (patch)
tree90fcd186cc0a5bbc33632cf0d899ffacbb71808b
parent9cc099033e814937b1e6cda90a035ba8a37f2e64 (diff)
downloadaur-ade0e761968ee38eec02d72c1873112a561dfff8.tar.gz
upgpkg: scapy-git 2.4.0.dev43-1 (split library for py3)
- upstream release - using split packages for library part - using python3 for default interactive tools
-rw-r--r--.SRCINFO42
-rw-r--r--PKGBUILD91
2 files changed, 100 insertions, 33 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1e45b77d060..b28136838dd 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = scapy-git
- pkgdesc = A powerful interactive packet manipulation program written in Python
- pkgver = 2.3.3.dev519
+ pkgdesc = Powerful interactive packet manipulation program written in Python
+ pkgver = 2.4.0.dev43
pkgrel = 1
url = http://www.secdev.org/projects/scapy/
arch = any
@@ -8,9 +8,39 @@ pkgbase = scapy-git
checkdepends = python2-cryptography
checkdepends = python2-pyx
checkdepends = python2-matplotlib
+ checkdepends = python-cryptography
+ checkdepends = python-pyx
+ checkdepends = python-matplotlib
checkdepends = graphviz
checkdepends = sox
makedepends = git
+ makedepends = tcpdump
+ makedepends = python2
+ makedepends = python
+ source = scapy-git::git+https://github.com/secdev/scapy
+ sha256sums = SKIP
+
+pkgname = scapy-git
+ pkgdesc = Powerful interactive packet manipulation program written in Python (tools)
+ depends = python
+ depends = python-scapy
+ provides = scapy
+ conflicts = scapy
+
+pkgname = python-scapy-git
+ pkgdesc = Powerful interactive packet manipulation program written in Python (library)
+ depends = tcpdump
+ depends = python
+ optdepends = python-cryptography: WEP, IPsec and SSL/TLS support
+ optdepends = python-pyx: psdump() and pdfdump() functions
+ optdepends = python-matplotlib: plotting support
+ optdepends = graphviz: conversations() method support
+ optdepends = sox: for VOIP support
+ provides = python-scapy
+ conflicts = python-scapy
+
+pkgname = python2-scapy-git
+ pkgdesc = Powerful interactive packet manipulation program written in Python (library)
depends = tcpdump
depends = python2
optdepends = python2-cryptography: WEP, IPsec and SSL/TLS support
@@ -18,10 +48,6 @@ pkgbase = scapy-git
optdepends = python2-matplotlib: plotting support
optdepends = graphviz: conversations() method support
optdepends = sox: for VOIP support
- provides = scapy
- conflicts = scapy
- source = scapy-git::git+https://github.com/secdev/scapy
- sha256sums = SKIP
-
-pkgname = scapy-git
+ provides = python2-scapy
+ conflicts = python2-scapy
diff --git a/PKGBUILD b/PKGBUILD
index 2396a3fb70e..df64e6e1eca 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,53 +3,94 @@
# Contributor: Ebubekir KARUL <ebubekirkarul@yandex.com>
# Contributor: s1gma,shirokuro
-pkgname=scapy-git
-pkgver=2.3.3.dev519
+pkgbase=scapy-git
+pkgname=('scapy-git' 'python-scapy-git' 'python2-scapy-git')
+pkgver=2.4.0.dev43
pkgrel=1
-pkgdesc="A powerful interactive packet manipulation program written in Python"
-url="http://www.secdev.org/projects/scapy/"
-depends=('tcpdump' 'python2')
-optdepends=('python2-cryptography: WEP, IPsec and SSL/TLS support'
- 'python2-pyx: psdump() and pdfdump() functions'
- 'python2-matplotlib: plotting support'
- 'graphviz: conversations() method support'
- 'sox: for VOIP support')
-makedepends=('git')
-checkdepends=('python2-cryptography' 'python2-pyx' 'python2-matplotlib' 'graphviz' 'sox')
+pkgdesc='Powerful interactive packet manipulation program written in Python'
+url='http://www.secdev.org/projects/scapy/'
+makedepends=('git' 'tcpdump' 'python2' 'python')
+checkdepends=('python2-cryptography' 'python2-pyx' 'python2-matplotlib'
+ 'python-cryptography' 'python-pyx' 'python-matplotlib'
+ 'graphviz' 'sox')
arch=('any')
license=('GPL2')
-provides=('scapy')
-conflicts=('scapy')
-source=(${pkgname}::git+https://github.com/secdev/scapy)
+source=(${pkgbase}::git+https://github.com/secdev/scapy)
sha256sums=('SKIP')
pkgver() {
- cd ${pkgname}
+ cd ${pkgbase}
PYTHONPATH=. python2 -c "print __import__('scapy').VERSION"
}
prepare() {
- cd ${pkgname}
+ cp -a ${pkgbase}{,-py2}
+ cd ${pkgbase}-py2
sed -e 's|env python|env python2|g' -i doc/scapy/*.rst scapy/contrib/*.py setup.py \
- run_scapy scapy/pipetool.py scapy/tools/check_asdis.py scapy/layers/inet6.py
- sed -e 's/exec python/exec python2/g' -i run_scapy setup.py test/run_tests
+ run_scapy scapy/pipetool.py scapy/tools/check_asdis.py scapy/layers/*.py bin/*
}
build() {
- cd ${pkgname}
- python2 setup.py build
+ (cd ${pkgbase}-py2
+ python2 setup.py build
+ )
+ (cd ${pkgbase}
+ python setup.py build
+ )
}
check() {
- cd ${pkgname}/test
# Run only main tests, without network access
- ./run_tests -K netaccess -F
+ (cd ${pkgbase}-py2/test
+ ./run_tests_py2 -K netaccess -F
+ )
+ (cd ${pkgbase}/test
+ ./run_tests_py3 -K netaccess -F
+ )
}
-package() {
- cd ${pkgname}
+package_scapy-git() {
+ depends=('python' 'python-scapy')
+ pkgdesc+=' (tools)'
+ provides=('scapy')
+ conflicts=('scapy')
+ cd ${pkgbase}
+ python setup.py install -O1 --skip-build --root="${pkgdir}" --prefix=/usr
+ install -d "${pkgdir}/usr/share/doc"
+ ln -sf /usr/share/doc/python-scapy "${pkgdir}/usr/share/doc/${pkgname}"
+ rm -r "${pkgdir}/usr/lib"
+}
+
+package_python-scapy-git() {
+ pkgdesc+=' (library)'
+ depends=('tcpdump' 'python')
+ optdepends=('python-cryptography: WEP, IPsec and SSL/TLS support'
+ 'python-pyx: psdump() and pdfdump() functions'
+ 'python-matplotlib: plotting support'
+ 'graphviz: conversations() method support'
+ 'sox: for VOIP support')
+ provides=('python-scapy')
+ conflicts=('python-scapy')
+ cd ${pkgbase}
+ python setup.py install -O1 --skip-build --root="${pkgdir}" --prefix=/usr
+ install -Dm 644 doc/scapy/*.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
+ rm -r "${pkgdir}"{/usr/bin,/usr/share/man}
+}
+
+package_python2-scapy-git() {
+ pkgdesc+=' (library)'
+ depends=('tcpdump' 'python2')
+ optdepends=('python2-cryptography: WEP, IPsec and SSL/TLS support'
+ 'python2-pyx: psdump() and pdfdump() functions'
+ 'python2-matplotlib: plotting support'
+ 'graphviz: conversations() method support'
+ 'sox: for VOIP support')
+ provides=('python2-scapy')
+ conflicts=('python2-scapy')
+ cd ${pkgbase}-py2
python2 setup.py install -O1 --skip-build --root="${pkgdir}" --prefix=/usr
install -Dm 644 doc/scapy/*.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
+ rm -r "${pkgdir}"{/usr/bin,/usr/share/man}
}
# vim: ts=2 sw=2 et: