# Maintainer: Natanael Copa setvar _luaversions = ""5.1 5.2 5.3"" setvar _pkgname = 'lustache' setvar pkgname = "lua-$_pkgname" setvar pkgver = '1.3.1' setvar _pkgver = "$pkgver-0" setvar pkgrel = '1' setvar pkgdesc = ""Logic-less {{mustache}} templates with Lua"" setvar url = ""http://olivinelabs.com/lustache/"" setvar arch = ""noarch"" setvar license = ""MIT"" setvar depends = """" setvar makedepends = """" setvar subpackages = ""$pkgname-common"" for _v in $_luaversions { setvar makedepends = ""$makedepends lua$_v-dev"" setvar subpackages = ""$subpackages lua$_v-${pkgname#lua-}:_package"" } setvar source = ""$pkgname-$pkgver.tar.gz::https://github.com/Olivine-Labs/$_pkgname/archive/v$_pkgver.tar.gz"" setvar builddir = ""$srcdir/$_pkgname-$_pkgver"" proc package { mkdir -p $pkgdir } proc common { cd $builddir mkdir -p "$subpkgdir"/usr/share/lua/common/$_pkgname install -m644 src/lustache/*.lua \ "$subpkgdir"/usr/share/lua/common/$_pkgname/ || return 1 install -m644 src/lustache.lua \ "$subpkgdir"/usr/share/lua/common/ } proc _package { local lver="${subpkgname:3:3}" setvar pkgdesc = ""$pkgdesc $lver"" setvar depends = ""$pkgname-common lua$lver"" setvar install_if = ""$pkgname=$pkgver-r$pkgrel lua$lver"" local rockdir="$subpkgdir/usr/lib/luarocks/rocks-$lver/$_pkgname/$_pkgver" mkdir -p "$subpkgdir"/usr/share/lua/$lver local path; for path in lustache lustache.lua { ln -s ../common/$path "$subpkgdir"/usr/share/lua/$lver/$path \ || return 1 } mkdir -p $rockdir echo 'rock_manifest = {}' > "$rockdir"/rock_manifest } setvar md5sums = ""e4416abe1a822c1b2d4b3a9e702d5795 lua-lustache-1.3.1.tar.gz"" setvar sha256sums = ""540bd5e1f6d32aa44d5be946d1772910fb73b62fa909ca5a026c115ece4170f0 lua-lustache-1.3.1.tar.gz"" setvar sha512sums = ""f1ba0bdd38e60957df1995f32a73a16d1b430072af4e14cce530345c74d542021223c0ef41b0f997f88d762bb194fff7119701cd289e16e3e38dfe3f10d0d9d8 lua-lustache-1.3.1.tar.gz""