# Contributor: Natanael Copa # Maintainer: Natanael Copa setvar _luaversions = ""5.1 5.2 5.3"" setvar pkgname = 'lua-discount' setvar pkgver = '1.2.10.1' setvar pkgrel = '4' setvar pkgdesc = ""Markdown implementation in C for Lua"" setvar url = ""http://asbradbury.org/projects/lua-discount"" setvar arch = ""all"" setvar license = ""BSD"" setvar depends = """" setvar subpackages = """" setvar makedepends = """" for _i in $_luaversions { setvar makedepends = ""$makedepends lua$_i-dev"" setvar subpackages = ""$subpackages lua$_i-discount:split_${_i/./_}"" } setvar install = '' setvar source = ""http://luaforge.net/frs/download.php/3758/lua-discount-1.2.10.1.tar.gz"" proc build { cd $srcdir for i in $_luaversions { cp -r $pkgname-$pkgver $i shell {cd $i make INCS="$(pkg-config --cflags lua$i)" } || return 1 } } proc package { cd $srcdir for i in $_luaversions { install -D -m644 $i/discount.so \ "$pkgdir"/usr/lib/lua/$i/discount.so || return 1 } } proc _split { local _ver=$1 setvar pkgdesc = ""$pkgdesc $_ver"" setvar install_if = ""lua$_ver $pkgname=$pkgver-r$pkgrel"" setvar depends = """" mkdir -p "$subpkgdir"/usr/lib/lua/ mv "$pkgdir"/usr/lib/lua/$_ver "$subpkgdir"/usr/lib/lua/ || return 1 } for _v in $_luaversions { eval "split_${_v/./_}() { _split $_v; }" } setvar sha512sums = ""84c26a19d97ca085c785d1916b05bc0c78a2b5a0965d7feeef9a545c4b69c71627791c5d560bcb529c9ed414ed2ebe99f253879d6eae593a5b6f93291d66d5b1 lua-discount-1.2.10.1.tar.gz""