summaryrefslogtreecommitdiff
path: root/devel/lua-luacheck/Makefile
blob: 8d9ec1e3fc5e7436016461d7aebe6a09f970e6c2 (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
PORTNAME=	luacheck
PORTVERSION=	0.25.g20200825
CATEGORIES=	devel
PKGNAMEPREFIX=	${LUA_PKGNAMEPREFIX}

MAINTAINER=	kevans@FreeBSD.org
COMMENT=	Linter and static analyzer for lua files

LICENSE=	MIT
LICENSE_FILE=	${WRKSRC}/LICENSE

RUN_DEPENDS=	${LUA_REFMODSHAREDIR}/argparse.lua:devel/lua-argparse@${LUA_FLAVOR} \
		${LUA_REFMODLIBDIR}/lfs.so:devel/luafilesystem@${LUA_FLAVOR}

USES=		lua
NO_ARCH=	yes
NO_BUILD=	yes

USE_GITHUB=	yes
GH_ACCOUNT=	luarocks
GH_TAGNAME=	4e5774169fa

INSTALL_DIR=	${LUA_MODSHAREDIR}/luacheck

do-install:
	${MKDIR} ${STAGEDIR}${INSTALL_DIR}/bin
	${INSTALL_SCRIPT} ${WRKSRC}/bin/luacheck.lua ${STAGEDIR}${INSTALL_DIR}/bin
	(cd ${WRKSRC} && \
	    ${COPYTREE_SHARE} src ${STAGEDIR}${INSTALL_DIR}/)
	${INSTALL_SCRIPT} ${FILESDIR}/luacheck.in \
	    ${STAGEDIR}${PREFIX}/bin/luacheck
	${REINPLACE_CMD} -e "s,%%LUA_CMD%%,${LUA_CMD},g" \
	    -e "s,%%INSTALL_DIR%%,${INSTALL_DIR},g" \
		${STAGEDIR}${PREFIX}/bin/luacheck

.include <bsd.port.mk>