diff --git a/net-mgmt/Makefile b/net-mgmt/Makefile index 0c7b72eec009..fc700db6cf10 100644 --- a/net-mgmt/Makefile +++ b/net-mgmt/Makefile @@ -334,6 +334,7 @@ SUBDIR += py-pypowerwall SUBDIR += py-pysmi SUBDIR += py-pysnmp + SUBDIR += py-pysnmplib SUBDIR += py-pysnmp-mibs SUBDIR += py-pyzabbix SUBDIR += py-snmp_passpersist diff --git a/net-mgmt/py-pysnmplib/Makefile b/net-mgmt/py-pysnmplib/Makefile new file mode 100644 index 000000000000..137822a3edf2 --- /dev/null +++ b/net-mgmt/py-pysnmplib/Makefile @@ -0,0 +1,69 @@ +PORTNAME= pysnmplib +DISTVERSION= 5.0.21 +CATEGORIES= net-mgmt python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= mhjacks@swbell.net +COMMENT= SNMP framework for Python +WWW= https://github.com/pysnmp/pysnmp + +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE.rst + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}poetry-core>0:devel/py-poetry-core@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}sphinx>0:textproc/py-sphinx@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyasn1>0:devel/py-pyasn1@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pycryptodomex>0:security/py-pycryptodomex@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pysmi>0:net-mgmt/py-pysmi@${PY_FLAVOR} + +USES= gmake python +USE_PYTHON= autoplist concurrent pep517 + +CONFLICTS_INSTALL= py-pysnmp-lextudio + +DOCSDIR= ${PREFIX}/share/doc/${PYTHON_PKGNAMEPREFIX}${PORTNAME} +EXAMPLESDIR= ${PREFIX}/share/examples/${PYTHON_PKGNAMEPREFIX}${PORTNAME} + +NO_ARCH= yes + +PLIST_FILES= man/man1/pysnmp.1.gz +PORTDOCS= README.md html/* +PORTEXAMPLES= * + +OPTIONS_DEFINE= DOCS EXAMPLES +OPTIONS_SUB= yes + +DOCS_DESC= Install Python SNMP library documentation + +post-extract: + @${RM} ${WRKSRC}/examples/README.md + +do-build-DOCS-on: + (cd ${WRKSRC}/docs && \ + ${SETENV} ${MAKE_ENV} ${GMAKE} html SPHINXBUILD=sphinx-build-${PYTHON_VER}) + @${RM} ${WRKSRC}/docs/build/html/.buildinfo + +post-build: + (cd ${WRKSRC}/docs && \ + ${SETENV} ${MAKE_ENV} ${GMAKE} man SPHINXBUILD=sphinx-build-${PYTHON_VER}) + +do-install-DOCS-on: + ${MKDIR} ${STAGEDIR}${DOCSDIR} + (cd ${WRKSRC}/docs/build && \ + ${COPYTREE_SHARE} html ${STAGEDIR}${DOCSDIR}) + + ${INSTALL_DATA} ${WRKSRC}/README.md \ + ${STAGEDIR}${DOCSDIR} + +do-install-EXAMPLES-on: + ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + (cd ${WRKSRC}/examples && \ + ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}) + +post-install: + ${INSTALL_MAN} ${WRKSRC}/docs/build/man/pysnmp.1 \ + ${STAGEDIR}${MANPREFIX}/man/man1 + +.include diff --git a/net-mgmt/py-pysnmplib/distinfo b/net-mgmt/py-pysnmplib/distinfo new file mode 100644 index 000000000000..dd4fc0708cd8 --- /dev/null +++ b/net-mgmt/py-pysnmplib/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1690726747 +SHA256 (pysnmplib-5.0.21.tar.gz) = 4fd3cfd47ab33c7b633996e28cd1486c04effcf9fc11621fb186eacc48a6134d +SIZE (pysnmplib-5.0.21.tar.gz) = 399153 diff --git a/net-mgmt/py-pysnmplib/pkg-descr b/net-mgmt/py-pysnmplib/pkg-descr new file mode 100644 index 000000000000..df1ad0f3f331 --- /dev/null +++ b/net-mgmt/py-pysnmplib/pkg-descr @@ -0,0 +1,12 @@ +A pure-Python, fully functional SNMP management engine, and library. +Features: +* Complete SNMP entity implementation +* USM Extended Security Options support (3DES, 192/256-bit AES encryption) +* Extensible network transports framework (UDP/IPv4, UDP/IPv6) +* Asynchronous socket-based IO API support +* Asyncio integration +* PySMI integration for dynamic MIB compilation +* Built-in instrumentation exposing protocol engine operations +* Python eggs and py2exe friendly +* 100% Python, works with Python 2.4 though 3.7 +* MT-safe (if SnmpEngine is thread-local)