binwalk: install bash completions, enable tests

This commit is contained in:
Piraty 2024-07-01 21:25:05 +02:00
parent d8d480d091
commit 37f97df649
No known key found for this signature in database
GPG Key ID: 82F2CC796BD07077
1 changed files with 8 additions and 11 deletions

View File

@ -4,7 +4,8 @@ version=2.4.1
revision=1
build_style=python3-module
hostmakedepends="python3-setuptools"
depends="python3"
depends="python3 tar"
checkdepends="${depends} python3-pytest"
short_desc="Easy tool for analyzing/reversing/extracting firmware images"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="MIT"
@ -14,18 +15,14 @@ checksum=26d13afd3610b39a38a3062a34c05d94dacda3f6f6aa6d1d19e42b61fabe1c8f
post_extract() {
vsed -i -e 's;/etc/bash_completion.d/%s;%s.bash;' setup.py
if [ $(id -u) -eq 0 ]; then
# CI container has different privileges than expected in tests.
# Append " **{'run-as' : 'root'}," to "binwalk.scan(input_vector_file,".
vsed -i -e "/binwalk.scan(input_vector_file,/ s/$/ **{'run-as' : 'root'},/" testing/tests/test_*.py
fi
}
do_check() {
: nose is broken
}
post_install() {
vlicense LICENSE
# calls `binwalk --help`
PATH="$DESTDIR/usr/bin/:$PATH" \
PYTHONPATH="${DESTDIR}/${py3_sitelib}" \
python3 setup.py autocomplete
vcompletion binwalk.bash bash
}