aboutsummaryrefslogtreecommitdiff
path: root/comms/py-libscrc/Makefile
blob: f75ecbec6f44b29f3a99d9ee339908856a481bf0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
PORTNAME=	libscrc
DISTVERSIONPREFIX=	v
DISTVERSION=	1.8.1
CATEGORIES=	comms python
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}

MAINTAINER=	zarychtam@plan-b.pwste.edu.pl
COMMENT=	Python library for calculating various types of CRC
WWW=		https://github.com/hex-in/libscrc

LICENSE=	GPLv3
LICENSE_FILE=	${WRKSRC}/LICENSE

USES=		python

USE_GITHUB=	yes
GH_ACCOUNT=	hex-in
USE_PYTHON=	autoplist distutils

TEST_ENV=	${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}

post-install:
	${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +

do-test:
	@cd ${TEST_WRKSRC} && for test in \
	libscrc/test/canx.py \
	libscrc/test/crc8.py \
	libscrc/test/crc16.py \
	libscrc/test/crc24.py \
	libscrc/test/crc32.py \
	libscrc/test/crc64.py \
	libscrc/test/crcx.py \
	libscrc/test/hacker.py \
	libscrc/test/modbus.py; \
	do ${SETENV} ${TEST_ENV} ${PYTHON_CMD} $${test}; done

.include <bsd.port.mk>