# Contributor: Natanael Copa # Contributor: Jakub Jirutka # Maintainer: Natanael Copa setvar pkgname = 'lua-yaml' setvar _pkgname = 'yaml' setvar pkgver = '1.1.2' setvar pkgrel = '1' setvar pkgdesc = ""LibYaml binding for Lua"" setvar url = ""http://yaml.luaforge.net"" setvar arch = ""all"" setvar license = ""MIT"" setvar depends = """" setvar makedepends = ""cmake yaml-dev"" setvar subpackages = """" setvar source = ""$pkgname-$pkgver.tar.gz::https://github.com/lubyk/$_pkgname/archive/REL-$pkgver.tar.gz cmake.patch"" setvar builddir = ""$srcdir/$_pkgname-REL-$pkgver"" setvar _luaversions = ""5.1 5.2 5.3"" for _v in $_luaversions { setvar makedepends = ""$makedepends lua$_v-dev"" setvar subpackages = ""$subpackages lua$_v-$_pkgname:_subpackage"" } proc build { local lver; for lver in $_luaversions { msg "Building for Lua $lver..." mkdir -p "$builddir"/build/$lver cd "$builddir"/build/$lver cmake \ -DCMAKE_C_FLAGS="$CFLAGS -Wall -DNDEBUG $(pkg-config --cflags lua$lver)" \ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ -DCMAKE_SKIP_RPATH=TRUE \ -DCMAKE_VERBOSE_MAKEFILE=TRUE \ -DLUA_INSTALL_DIR=/usr/share/lua/$lver \ -DLUA_INSTALL_BINDIR=/usr/lib/lua/$lver \ $builddir || return 1 make || return 1 } } proc package { mkdir -p $pkgdir } proc _subpackage { local lver="${subpkgname:3:3}" local rockdir="$subpkgdir/usr/lib/luarocks/rocks-$lver/$_pkgname/$pkgver-1" setvar pkgdesc = ""$pkgdesc $lver"" setvar depends = ""$depends lua$lver lua$lver-lub"" setvar install_if = ""$pkgname=$pkgver-r$pkgrel lua$lver"" test $lver = 5.1 && setvar replaces = "$pkgname" cd "$builddir"/build/$lver make DESTDIR="$subpkgdir" install mkdir -p $rockdir echo 'rock_manifest = {}' > "$rockdir"/rock_manifest } setvar md5sums = ""6665b0c82da0edae184b8a32be7518b5 lua-yaml-1.1.2.tar.gz 44294987c54623c6a5b013ba7ebb5c58 cmake.patch"" setvar sha256sums = ""b4391d182677ab644403bf1ac028c7421c2605db124f9792193013c582a273ec lua-yaml-1.1.2.tar.gz b898249d2dbeff2152b84ba46c94571c058a3b9339db1683de69cb6161575715 cmake.patch"" setvar sha512sums = ""9d2ff4ddc243922f11c2ebea1d45bb3fa02e96a30752c04e65aec236e76780780511fe605a7a0bdbe9764189764a3951aadff8bb028c402571fd052cd70e35ac lua-yaml-1.1.2.tar.gz db024b2acfa88441a4a72ec9c2a42d0980465cd759815474f02e3912ca458d913317aacdecf911e4048d43bab7878f472ce044f57dac3df66d20752e1255a8a8 cmake.patch""