# Contributor: Natanael Copa # Maintainer: Natanael Copa pkgname=lua-discount pkgver=1.2.10.1 pkgrel=3 pkgdesc="Lua binding to discount, a Markdown implementation in C" url="http://asbradbury.org/projects/lua-discount" arch="all" license="BSD" depends="lua5.1-discount lua5.2-discount" makedepends="lua5.1-dev lua5.2-dev" install= subpackages="lua5.1-discount:_lua51 lua5.2-discount:_lua52" source="http://luaforge.net/frs/download.php/3758/lua-discount-1.2.10.1.tar.gz" build() { cd "$srcdir" for i in 5.1 5.2; do cp -r $pkgname-$pkgver $i (cd $i make INCS="$(pkg-config --cflags lua$i)" ) || return 1 done } package() { cd "$srcdir" for i in 5.1 5.2; do install -D -m644 $i/discount.so \ "$pkgdir"/usr/lib/lua/$i/discount.so || return 1 done } _split() { pkgdesc="Lua $1 binding to discount, a Markdown implementation in C" mkdir -p "$subpkgdir"/usr/lib/lua/ mv "$pkgdir"/usr/lib/lua/$1 "$subpkgdir"/usr/lib/lua/ || return 1 } _lua51() { _split 5.1; } _lua52() { _split 5.2; } md5sums="7dc7055816dc755aacb48bfd5eb2eb5b lua-discount-1.2.10.1.tar.gz"