diff options
author | Henry-Joseph Audéoud | 2017-09-20 11:47:47 +0200 |
---|---|---|
committer | Henry-Joseph Audéoud | 2017-09-20 11:48:16 +0200 |
commit | ecbe0ed2bf1b03c96f8c76d8d9cdcf159f1edf09 (patch) | |
tree | a577cf393be5c13a406f26680229af1fc5e67708 | |
download | aur-ecbe0ed2bf1b03c96f8c76d8d9cdcf159f1edf09.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 33 | ||||
-rw-r--r-- | ebtables.py_python2to3.patch | 16 |
3 files changed, 65 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..5234517fdab8 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = python-ebtables + pkgdesc = A simple Python binding for Ebtables + pkgver = 0.2.0 + pkgrel = 1 + url = https://github.com/ldx/python-ebtables + arch = any + license = GPL2 + makedepends = python-setuptools + depends = python + depends = python-cffi>=0.5.0 + depends = ebtables + source = https://github.com/ldx/python-ebtables/archive/v0.2.0.tar.gz + md5sums = be4c50c78c4c932761cf0586fe755f20 + +pkgname = python-ebtables + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e1f358740ec1 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,33 @@ +# Maintainer: Henry-Joseph Audéoud <h.audeoud at gmail dot com> + +_pkgname='python-ebtables' +pkgname="${_pkgname}" +pkgver=0.2.0 +pkgrel=1 +pkgdesc='A simple Python binding for Ebtables' +arch=('any') +url='https://github.com/ldx/python-ebtables' +license=('GPL2') +depends=('python' 'python-cffi>=0.5.0' 'ebtables') +makedepends=('python-setuptools') +source=("https://github.com/ldx/${_pkgname}/archive/v${pkgver}.tar.gz") +md5sums=('be4c50c78c4c932761cf0586fe755f20') + +prepare() { + patch "${srcdir}/${_pkgname}-${pkgver}"/ebtables.py ../ebtables.py_python2to3.patch +} + +build() { + cd "${srcdir}/${_pkgname}-${pkgver}" + python setup.py build +} + +check() { + cd "${srcdir}/${_pkgname}-${pkgver}" + python setup.py check +} + +package() { + cd "${srcdir}/${_pkgname}-${pkgver}" + python setup.py install --root "${pkgdir}" --optimize=1 +} diff --git a/ebtables.py_python2to3.patch b/ebtables.py_python2to3.patch new file mode 100644 index 000000000000..c7c36ae8fa02 --- /dev/null +++ b/ebtables.py_python2to3.patch @@ -0,0 +1,16 @@ +9c9 +< EBTABLES_LIBRARY_PATH = os.getenv('EBTABLES_LIBRARY_PATH') or '/lib/ebtables' +--- +> EBTABLES_LIBRARY_PATH = os.getenv('EBTABLES_LIBRARY_PATH') or '/usr/lib' +27c27 +< return [_get_libname(f) for f in files if f.endswith('.so')] +--- +> return [_get_libname(f) for f in files if f.startswith("libebt") and f.endswith('.so')] +88c88 +< _hash = hashlib.sha1('\0'.join([_cdef, _verify])).hexdigest() +--- +> _hash = hashlib.sha1('\0'.join([_cdef, _verify]).encode('ascii')).hexdigest() +102c102 +< _ebtc.ebt_errormsg[0] = '\0' +--- +> _ebtc.ebt_errormsg[0] = '\0'.encode('ascii') |