sthen 3cbe1c2f30 Reverse the polarity of MODPY_VERSION; default is now 3.x,
if a port needs 2.x then set MODPY_VERSION=${MODPY_DEFAULT_VERSION_2}.

This commit doesn't change any versions currently used; it may be that
some ports have MODPY_DEFAULT_VERSION_2 but don't require it, those
should be cleaned up in the course of updating ports where possible.

Python module ports providing py3-* packages should still use
FLAVOR=python3 so that we don't have a mixture of dependencies some
using ${MODPY_FLAVOR} and others not.
2021-02-23 19:39:08 +00:00

61 lines
1.9 KiB
Makefile

# $OpenBSD: Makefile,v 1.17 2021/02/23 19:39:31 sthen Exp $
COMMENT= BGP route injector (supporting flow routes, etc)
MODPY_EGG_VERSION= 4.2.7
GH_ACCOUNT= exa-networks
GH_PROJECT= exabgp
GH_TAGNAME= ${MODPY_EGG_VERSION}
REVISION= 0
CATEGORIES= net
# BSD
PERMIT_PACKAGE= Yes
MODULES= lang/python
MODPY_SETUPTOOLS= Yes
TEST_DEPENDS= devel/py-coverage${MODPY_FLAVOR} \
devel/py-nose${MODPY_FLAVOR} \
devel/py-six${MODPY_FLAVOR} \
sysutils/py-psutil${MODPY_FLAVOR}
# Generate current version's exabgp.env in post-extract so we can patch
# it rather than using a static copy in FILESDIR. The rc script uses
# exabgp.daemon.env which has daemonize/logfile/etc setup, this is
# separate to default exabgp.env to avoid getting in the way of ad-hoc
# "foreground" configurations.
post-extract:
sh ${WRKSRC}/sbin/exabgp --fi > ${WRKSRC}/exabgp.env
cp ${WRKSRC}/exabgp.env ${WRKSRC}/exabgp.daemon.env
pre-configure:
cd ${WRKSRC}; ${SUBST_CMD} \
dev/bin/python-profile \
dev/bin/pythonstats \
etc/exabgp/example-healthcheck.conf \
lib/exabgp/application/bgp.py \
lib/exabgp/application/cli.py \
lib/exabgp/application/healthcheck.py \
lib/exabgp/configuration/usage.py \
lib/exabgp/vendoring/profiler.py
cd ${WRKSRC}; \
find ${WRKSRC} -type f -perm -111 -exec ${MODPY_BIN_ADJ} {} +
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/exabgp/etc/
${INSTALL_DATA} ${FILESDIR}/exabgp.conf ${PREFIX}/share/examples/exabgp/
${INSTALL_DATA} ${WRKSRC}/exabgp*env ${PREFIX}/share/examples/exabgp/
${INSTALL_DATA} ${WRKSRC}/etc/exabgp/*.conf ${PREFIX}/share/examples/exabgp/etc/
find ${WRKINST}${MODPY_SITEPKG} \( -name '*.orig' -or -name '*.beforesubst' \) -delete
.for i in 1 5
${INSTALL_MAN} ${WRKSRC}/doc/man/*.$i ${PREFIX}/man/man$i/
.endfor
do-test:
cd ${WRKSRC}; exabgp_log_enable=false nosetests${MODPY_BIN_SUFFIX} --with-coverage ./qa/tests/*_test.py
cd ${WRKSRC}; ./qa/bin/functional run
.include <bsd.port.mk>