From 37f97df649c0ae14f042a2f6bca77b637b2ce92b Mon Sep 17 00:00:00 2001 From: Piraty Date: Mon, 1 Jul 2024 21:25:05 +0200 Subject: [PATCH] binwalk: install bash completions, enable tests --- srcpkgs/binwalk/template | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/srcpkgs/binwalk/template b/srcpkgs/binwalk/template index 1f86150c8d3..da1004ff936 100644 --- a/srcpkgs/binwalk/template +++ b/srcpkgs/binwalk/template @@ -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 " 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 }