mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-04-20 13:51:00 +02:00
binwalk: add tests support, update PYTHON_COMPAT and fix dependency.bad
This commit is contained in:
parent
bd166f806a
commit
a9c949a852
1 changed files with 27 additions and 15 deletions
|
|
@ -2,24 +2,27 @@
|
|||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
PYTHON_COMPAT=( python2_7 python3_{6,7} )
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{5,6} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
if [[ ${PV} == "9999" ]] ; then
|
||||
EGIT_REPO_URI="https://github.com/ReFirmLabs/binwalk.git"
|
||||
inherit git-r3
|
||||
else
|
||||
SRC_URI="https://github.com/ReFirmLabs/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="A tool for identifying files embedded inside firmware images"
|
||||
HOMEPAGE="https://github.com/ReFirmLabs/binwalk"
|
||||
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
EGIT_REPO_URI="https://github.com/ReFirmLabs/binwalk"
|
||||
inherit git-r3
|
||||
else
|
||||
SRC_URI="https://github.com/ReFirmLabs/binwalk/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
fi
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
IUSE="graph squashfs ubifs yaffs"
|
||||
IUSE="graph squashfs test ubifs yaffs"
|
||||
|
||||
DOCS=( API.md INSTALL.md README.md )
|
||||
|
||||
RDEPEND="${PYTHON_DEPS}
|
||||
$(python_gen_cond_dep 'dev-python/backports-lzma[${PYTHON_USEDEP}]' python2_7)
|
||||
|
|
@ -34,14 +37,23 @@ RDEPEND="${PYTHON_DEPS}
|
|||
ubifs? ( sys-fs/ubi_reader )
|
||||
yaffs? ( sys-fs/yaffshiv )"
|
||||
|
||||
DEPEND="test? ( dev-python/nose[coverage,${PYTHON_USEDEP}] )"
|
||||
|
||||
pkg_setup() {
|
||||
python_setup
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
local DOCS=( API.md INSTALL.md README.md )
|
||||
distutils-r1_python_install_all
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ -z ${REPLACING_VERSIONS} ]]; then
|
||||
elog "binwalk has many optional dependencies to automatically"
|
||||
elog "extract/decompress data, see INSTALL.md for more details."
|
||||
fi
|
||||
einfo "\nbinwalk has many optional dependencies to automatically"
|
||||
einfo "extract/decompress data, see INSTALL.md for more details.\n"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
find testing/tests/input-vectors -type f | while read x; do
|
||||
${PYTHON} testing/test_generator.py $x || die
|
||||
done
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue