# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka setvar pkgname = 'lua-glob-pattern' setvar pkgver = '0.2.1.20120406' setvar _gitrev = 'fc48cf953cfef57e7f2363f02e7b191819b477f6' setvar pkgrel = '1' setvar pkgdesc = ""Converts file glob string to Lua pattern string"" setvar url = ""https://github.com/davidm/lua-glob-pattern"" setvar arch = ""noarch"" setvar license = ""MIT"" setvar checkdepends = """" setvar subpackages = """" setvar source = ""$pkgname-$pkgver.tar.gz::https://github.com/davidm/$pkgname/archive/$_gitrev.tar.gz"" setvar builddir = ""$srcdir/$pkgname-$_gitrev"" # luajit is not available for selected arches case (CARCH) { s390x { setvar _luajit = """"} * { setvar checkdepends = ""$checkdepends luajit"," _luajit = ""jit""} } setvar _luaversions = ""5.1 5.2 5.3"" for _v in $_luaversions { setvar subpackages = ""$subpackages lua$_v-${pkgname#lua-}:_subpackage"" setvar checkdepends = ""$checkdepends lua$_v"" } proc check { cd $builddir local lver; for lver in $_luaversions $_luajit { msg "Testing on lua$lver" lua$lver test.lua } } proc package { mkdir -p $pkgdir } proc _subpackage { local lver="${subpkgname:3:3}" setvar pkgdesc = ""$pkgdesc (for Lua $lver)"" setvar depends = ""lua$lver"" setvar install_if = ""$pkgname=$pkgver-r$pkgrel lua$lver"" local rockdir="$subpkgdir/usr/lib/luarocks/rocks-$lver/$pkgname/$pkgver-1" cd $builddir install -m 644 -D lua/globtopattern.lua \ "$subpkgdir"/usr/share/lua/$lver/globtopattern.lua mkdir -p $rockdir echo 'rock_manifest = {}' > "$rockdir"/rock_manifest } setvar sha512sums = ""8e1b31538d8c035558721d7793b15ea34f8e745bf25e6599fe514dce3f8b16decd13f80f67b9d782e53675a98791792ad0f16c180f6d9fc2686a4f4cc53e633e lua-glob-pattern-0.2.1.20120406.tar.gz""