diff --git a/net-mgmt/Makefile b/net-mgmt/Makefile index c201c2d1e55b..8f78ce1e790c 100644 --- a/net-mgmt/Makefile +++ b/net-mgmt/Makefile @@ -299,6 +299,7 @@ SUBDIR += prometheus2 SUBDIR += pushgateway SUBDIR += py-adal + SUBDIR += py-aggregate6 SUBDIR += py-ciscoconfparse SUBDIR += py-dnsdiag SUBDIR += py-ipcalc diff --git a/net-mgmt/py-aggregate6/Makefile b/net-mgmt/py-aggregate6/Makefile new file mode 100644 index 000000000000..643f68b0879d --- /dev/null +++ b/net-mgmt/py-aggregate6/Makefile @@ -0,0 +1,36 @@ +# Created by: Muhammad Moinur Rahman +# $FreeBSD$ + +PORTNAME= aggregate6 +PORTVERSION= 1.0.12 +CATEGORIES= net-mgmt python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= bofh@FreeBSD.org +COMMENT= Compress an unsorted list of IPv4 and IPv6 prefixes + +LICENSE= BSD2CLAUSE + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}radix>=0.10.0:net/py-radix@${PY_FLAVOR} +TEST_DEPENDS= \ + ${PYTHON_PKGNAMEPREFIX}coverage>0:devel/py-coverage@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}nose>0:devel/py-nose@${PY_FLAVOR} + +USES= python +USE_PYTHON= autoplist concurrent distutils + +NO_ARCH= yes + +.include + +.if ${PYTHON_REL} < 3000 +BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}future>0:devel/py-future@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}ipaddress>0:net/py-ipaddress@${PY_FLAVOR} +.endif + +do-test: + @(cd ${WRKSRC} && ${SETENV} ${PYTHON_CMD} ${PYSETUP} nosetests --with-coverage) + +.include diff --git a/net-mgmt/py-aggregate6/distinfo b/net-mgmt/py-aggregate6/distinfo new file mode 100644 index 000000000000..c26cde3a55a1 --- /dev/null +++ b/net-mgmt/py-aggregate6/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1587684276 +SHA256 (aggregate6-1.0.12.tar.gz) = be0d78b8e84f96db2fc67d17955d16f60cbd76adfebd9a62fe1dc7cad9b273d9 +SIZE (aggregate6-1.0.12.tar.gz) = 6026 diff --git a/net-mgmt/py-aggregate6/files/patch-setup.py b/net-mgmt/py-aggregate6/files/patch-setup.py new file mode 100644 index 000000000000..42a57573eabd --- /dev/null +++ b/net-mgmt/py-aggregate6/files/patch-setup.py @@ -0,0 +1,12 @@ +--- setup.py.orig 2017-12-01 09:46:38 UTC ++++ setup.py +@@ -70,8 +70,7 @@ setup( + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6' + ], +- setup_requires=["nose", "coverage", "mock"], +- install_requires=["py-radix==0.10.0"] + ( ++ install_requires=["py-radix>=0.10.0"] + ( + ["future", "ipaddress"] if sys.version_info.major == 2 else [] + ), + packages=find_packages(exclude=['tests', 'tests.*']), diff --git a/net-mgmt/py-aggregate6/pkg-descr b/net-mgmt/py-aggregate6/pkg-descr new file mode 100644 index 000000000000..c3abe8884ba6 --- /dev/null +++ b/net-mgmt/py-aggregate6/pkg-descr @@ -0,0 +1,9 @@ +Takes a list of IPv6 prefixes in conventional format on stdin, and performs two +optimisations to attempt to reduce the length of the prefix list. The first +optimisation is to remove any supplied prefixes which are superfluous because +they are already included in another supplied prefix. The second optimisation +identifies adjacent prefixes that can be combined under a single, shorter-length +prefix. The above optimalisation steps are often useful in context of +compressing firewall rules or BGP prefix-list filters. + +WWW: https://github.com/job/aggregate6