summaryrefslogtreecommitdiff
path: root/devel/lua-sysctl/Makefile
blob: d7b9f9ba1d84760f1423963d310ec564b1067d6b (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

PORTNAME=	sysctl
PORTVERSION=	2.0
DISTVERSIONPREFIX=	v
PORTREVISION=	2
CATEGORIES=	devel
PKGNAMEPREFIX=	${LUA_PKGNAMEPREFIX}

MAINTAINER=	uzsolt@uzsolt.hu
COMMENT=	Small sysctl(3) interface for lua

LICENSE=	BSD2CLAUSE

USES=		lua:52+,module pkgconfig

USE_GITHUB=	yes
GH_ACCOUNT=	kAworu
GH_PROJECT=	lua-${PORTNAME}

OPTIONS_DEFINE=	DOCS EXAMPLES
DOCSDIR=	${LUA_DOCSDIR}
EXAMPLESDIR=	${LUA_EXAMPLESDIR}

post-patch:
	@${REINPLACE_CMD} -e "s/5.2/${LUA_VER}/g" ${WRKSRC}/Makefile

do-install:
	@${MKDIR} ${STAGEDIR}${LUA_MODLIBDIR}
	${INSTALL_LIB} ${WRKSRC}/build/sysctl.so ${STAGEDIR}${LUA_MODLIBDIR}/sysctl.so

post-install-DOCS-on:
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}

post-install-EXAMPLES-on:
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
	${INSTALL_DATA} ${WRKSRC}/misc/*.lua ${STAGEDIR}${EXAMPLESDIR}

.include <bsd.port.mk>