summaryrefslogtreecommitdiff
path: root/misc/netron/Makefile
blob: 1eba26df8ee19ef98e6cf54e89a3b9d7070d26fd (plain)
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
39
40
41
42
43
PORTNAME=	netron
DISTVERSIONPREFIX=	v
DISTVERSION=	4.1.9
CATEGORIES=	misc python # machine-learning
MASTER_SITES=	LOCAL/yuri/:js
DISTFILES=	netron-${DISTVERSION}-node_modules.tgz:js

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Visualizer for neural network, deep learning, machine learning models

LICENSE=	APACHE20
LICENSE_FILE=	${WRKSRC}/LICENSE

USES=		python:3.6+
USE_GITHUB=	yes
GH_ACCOUNT=	lutzroeder
USE_PYTHON=	distutils noflavors

NO_ARCH=	yes

PLIST_SUB=	PYTHON_CPYTHON=cpython-${PYTHON_VER:S/.//}

post-extract:
	@${RLN} ${WRKDIR}/node_modules ${WRKSRC}/node_modules

#
# To update the netron-${DISTVERSION}-node_modules.tgz archive:
# 1. Comment out the DISTFILES and post-extract lines
# 2. Run 'make makesum regenerate-node_modules-distfile clean'
# 3. Upload the archive
# 4. Uncomment the lines from step #1
# 5. Run 'make makesum'
#

regenerate-node_modules-distfile: patch # requires npm installed by www/npm
	@${MAKE} clean patch && \
	cd ${WRKSRC} && \
	${RM} -r node_modules && \
	npm install -l && \
	${TAR} czf ${DISTDIR}/netron-${DISTVERSION}-node_modules.tgz node_modules && \
	${ECHO} "Please upload the file ${DISTDIR}/netron-${DISTVERSION}-node_modules.tgz"

.include <bsd.port.mk>