diff options
author | Sam James <sam@gentoo.org> | 2023-01-11 08:29:35 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-01-11 08:31:33 +0000 |
commit | 74c773ea1fb402863d6a8b5060987837d0da0b8a (patch) | |
tree | 91d895ac53c1469af9b3ef981dc17e49d86936a7 /net-analyzer/scapy/scapy-2.5.0.ebuild | |
parent | sys-libs/timezone-data: drop 2022f, 2022f-r1 (diff) | |
download | gentoo-74c773ea1fb402863d6a8b5060987837d0da0b8a.tar.gz gentoo-74c773ea1fb402863d6a8b5060987837d0da0b8a.tar.bz2 gentoo-74c773ea1fb402863d6a8b5060987837d0da0b8a.zip |
net-analyzer/scapy: add 2.5.0
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-analyzer/scapy/scapy-2.5.0.ebuild')
-rw-r--r-- | net-analyzer/scapy/scapy-2.5.0.ebuild | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/net-analyzer/scapy/scapy-2.5.0.ebuild b/net-analyzer/scapy/scapy-2.5.0.ebuild new file mode 100644 index 000000000000..f1784cc3ed4b --- /dev/null +++ b/net-analyzer/scapy/scapy-2.5.0.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..11} ) +inherit distutils-r1 readme.gentoo-r1 + +DESCRIPTION="A Python interactive packet manipulation program for mastering the network" +HOMEPAGE="https://scapy.net/ https://github.com/secdev/scapy" +SRC_URI="https://github.com/secdev/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" +IUSE="test" +RESTRICT="!test? ( test )" + +BDEPEND=" + test? ( + dev-python/python-zstandard[${PYTHON_USEDEP}] + ) +" + +DOC_CONTENTS=" +Scapy has optional support for the following packages: + + dev-python/cryptography + dev-python/ipython + dev-python/matplotlib + dev-python/pyx + media-gfx/graphviz + net-analyzer/tcpdump + net-analyzer/tcpreplay + net-libs/libpcap + virtual/imagemagick-tools + + See also ""${EPREFIX}/usr/share/doc/${PF}/installation.rst"" +" + +PATCHES=( + "${FILESDIR}"/${PN}-2.5.0-no-install-tests.patch +) + +src_prepare() { + if ! [[ -f ${PN}/VERSION ]]; then + echo ${PV} > ${PN}/VERSION || die + else + die + fi + + # Drop tests which need network + rm \ + test/nmap.uts \ + test/p0f.uts \ + test/p0fv2.uts \ + test/regression.uts \ + test/scapy/layers/inet6.uts || die + # Timed out + rm test/tftp.uts || die + # Needs ipython + rm test/scapy/layers/dhcp.uts || die + # Import failure? + rm test/contrib/isotp_native_socket.uts test/contrib/isotpscan.uts || die + + distutils-r1_src_prepare +} + +python_test() { + # https://github.com/secdev/scapy/blob/master/tox.ini + "${EPYTHON}" -m scapy.tools.UTscapy -c ./test/configs/linux.utsc -N || die +} + +src_install() { + distutils-r1_src_install + + dodoc -r doc/${PN}/* + DISABLE_AUTOFORMATTING=1 readme.gentoo_create_doc +} |