Import textproc/lua-cosmo.

Cosmo is a "safe templates" engine. It allows you to fill nested templates,
providing many of the advantages of Turing-complete template engines,
without the downside of allowing arbitrary code in the templates.

OK jca@
This commit is contained in:
fcambus 2016-10-21 17:49:25 +00:00
parent c1d1d875ee
commit 43b5352f0c
4 changed files with 57 additions and 0 deletions

View File

@ -0,0 +1,43 @@
# $OpenBSD: Makefile,v 1.1.1.1 2016/10/21 17:49:25 fcambus Exp $
COMMENT = safe templates engine for Lua
V = 16.06.04
PKGNAME = lua-cosmo-${V}
GH_ACCOUNT = mascarenhas
GH_PROJECT = cosmo
GH_TAGNAME = v${V}
CATEGORIES = textproc
MAINTAINER = Frederic Cambus <fcambus@openbsd.org>
# MIT
PERMIT_PACKAGE_CDROM = Yes
MODULES = lang/lua
MODLUA_RUN_DEPENDS = devel/lpeg
TEST_DEPENDS = ${BUILD_PKGPATH}
FLAVORS = lua52 lua53
FLAVOR ?=
MAKE_ENV = LUA_DIR=${MODLUA_DATADIR}
USE_GMAKE = Yes
NO_BUILD = Yes
PKG_ARCH = *
post-install:
${INSTALL_DATA_DIR} ${MODLUA_DOCDIR}
${INSTALL_DATA} ${WRKSRC}/doc/{index.html,cosmo.png} ${MODLUA_DOCDIR}
do-test:
cd ${WRKDIST}/tests && ${MODLUA_BIN} test_cosmo.lua
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (cosmo-16.06.04.tar.gz) = htF66lCAqQZx2WXP/rmxBMGeDh6lXAhofAkkxFErUrE=
SIZE (cosmo-16.06.04.tar.gz) = 25798

View File

@ -0,0 +1,4 @@
Cosmo is a "safe templates" engine. It allows you to fill nested templates,
providing many of the advantages of Turing-complete template engines,
without the downside of allowing arbitrary code in the templates.

View File

@ -0,0 +1,8 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2016/10/21 17:49:25 fcambus Exp $
share/doc/${FULLPKGNAME}/
share/doc/${FULLPKGNAME}/cosmo.png
share/doc/${FULLPKGNAME}/index.html
share/lua/${MODLUA_VERSION}/cosmo/
share/lua/${MODLUA_VERSION}/cosmo.lua
share/lua/${MODLUA_VERSION}/cosmo/fill.lua
share/lua/${MODLUA_VERSION}/cosmo/grammar.lua