2018-04-20 10:40:40 -04:00
|
|
|
# $OpenBSD: Makefile,v 1.2 2018/04/20 14:40:40 fcambus Exp $
|
2018-01-30 04:15:36 -05:00
|
|
|
|
|
|
|
COMMENT = Lua library for MaxMind GeoIP2/GeoLite2 databases
|
|
|
|
|
2018-04-20 10:40:40 -04:00
|
|
|
V = 0.2
|
2018-01-30 04:15:36 -05:00
|
|
|
PKGNAME = lua-mmdb-${V}
|
|
|
|
|
|
|
|
GH_ACCOUNT = daurnimator
|
|
|
|
GH_PROJECT = mmdblua
|
|
|
|
GH_TAGNAME = v${V}
|
|
|
|
|
|
|
|
CATEGORIES = net
|
|
|
|
|
|
|
|
MAINTAINER = Frederic Cambus <fcambus@openbsd.org>
|
|
|
|
|
|
|
|
# MIT
|
|
|
|
PERMIT_PACKAGE_CDROM = Yes
|
|
|
|
|
|
|
|
MODULES = lang/lua
|
|
|
|
|
|
|
|
FLAVORS = lua52 lua53
|
|
|
|
FLAVOR ?=
|
|
|
|
|
|
|
|
.if !${FLAVOR:Mlua53}
|
|
|
|
RUN_DEPENDS = devel/lua-compat53,${MODLUA_FLAVOR}
|
|
|
|
.endif
|
|
|
|
|
2018-04-20 10:40:40 -04:00
|
|
|
TEST_DEPENDS = ${FULLPKGNAME}:${BUILD_PKGPATH} \
|
|
|
|
net/libmaxminddb
|
2018-01-30 04:15:36 -05:00
|
|
|
|
|
|
|
NO_BUILD = Yes
|
|
|
|
|
|
|
|
PKG_ARCH = *
|
|
|
|
|
|
|
|
do-install:
|
|
|
|
${INSTALL_DATA_DIR} ${MODLUA_DATADIR} ${MODLUA_DATADIR}mmdb
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/mmdb/*.lua ${MODLUA_DATADIR}mmdb
|
|
|
|
|
|
|
|
do-test:
|
|
|
|
sed -i -e "s,GeoLite2-City,${LOCALSTATEDIR}/db/GeoIP/GeoLite2-Country," \
|
|
|
|
${WRKSRC}/example.lua
|
|
|
|
cd ${WRKSRC} && ${MODLUA_BIN} example.lua
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|