written to use Python 2, both versions are supported in parallel for now (with a -3 suffix on the command-line tools and some other files to avoid a conflict). Clean up dependencies which have not been used for some time while there; PyCrypto and py-ecdsa changed to py-cryptography in 2017 and use of libdnet was removed in 2.4.4. ok bluhm@ (maintainer).
56 lines
1.4 KiB
Makefile
56 lines
1.4 KiB
Makefile
# $OpenBSD: Makefile,v 1.40 2020/12/10 11:49:23 sthen Exp $
|
|
|
|
COMMENT = powerful interactive packet manipulation in python
|
|
|
|
MODPY_EGG_VERSION = 2.4.4
|
|
REVISION = 0
|
|
|
|
DISTNAME = scapy-${MODPY_EGG_VERSION}
|
|
|
|
CATEGORIES = net
|
|
|
|
HOMEPAGE = https://scapy.net/
|
|
|
|
MAINTAINER = Alexander Bluhm <bluhm@openbsd.org>
|
|
|
|
# GPLv2
|
|
PERMIT_PACKAGE = Yes
|
|
|
|
MASTER_SITES0 = https://spacehopper.org/mirrors/
|
|
DISTFILES = ${EXTRACT_ONLY} ethertypes-20120703:0
|
|
EXTRACT_ONLY = ${DISTNAME}${EXTRACT_SUFX}
|
|
|
|
MODULES = lang/python
|
|
|
|
FLAVORS = python3
|
|
FLAVOR ?=
|
|
.if ${FLAVOR:Mpython3}
|
|
PKGNAME = py3-${DISTNAME}
|
|
.endif
|
|
|
|
MODPY_PI = Yes
|
|
MODPY_SETUPTOOLS = Yes
|
|
UPDATE_PLIST_ARGS = -i MODPY_PY_PREFIX
|
|
|
|
.include <bsd.port.arch.mk>
|
|
.if ${PROPERTIES:Mcxx11}
|
|
# py-cryptography is only for architectures with newer compilers.
|
|
# it is not needed for all features; include the dependency
|
|
# where available but skip it on base-gcc architectures.
|
|
RUN_DEPENDS = security/py-cryptography${MODPY_FLAVOR}
|
|
.endif
|
|
|
|
pre-configure:
|
|
sed -i "s,/etc/ethertypes,${SYSCONFDIR}/ethertypes,g" \
|
|
${WRKSRC}/scapy/data.py
|
|
|
|
post-install:
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/scapy
|
|
${INSTALL_DATA} ${DISTDIR}/ethertypes-20120703 \
|
|
${PREFIX}/share/examples/scapy/ethertypes${MODPY_BIN_SUFFIX}
|
|
mv ${PREFIX}/bin/UTscapy{,${MODPY_BIN_SUFFIX}}
|
|
mv ${PREFIX}/man/man1/scapy{,${MODPY_BIN_SUFFIX}}.1
|
|
mv ${PREFIX}/bin/scapy{,${MODPY_BIN_SUFFIX}}
|
|
|
|
.include <bsd.port.mk>
|