# Contributor: Mika Havela # Maintainer: Mika Havela _luaver=5.2 pkgname=lua$_luaver-socket _name=luasocket pkgver=3.0_rc1 pkgrel=0 _ver=${pkgver/_/-} pkgdesc="Luasocket is the most comprehensive networking support library for the Lua language." url="http://luaforge.net/projects/luasocket/" arch="all" license="MIT" depends="" makedepends="lua5.2-dev" install= source="luasocket-$_ver.tar.gz::https://github.com/diegonehab/luasocket/archive/v$_ver.tar.gz lua-cflags.patch include-luasocket.patch" _builddir="$srcdir/$_name-$_ver" prepare() { cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done # set lua version sed -i -e "/^LUAV?=/s/=.*/=$_luaver/" src/makefile } build() { cd "$_builddir" make -C src all-unix || return 1 } package() { cd "$_builddir" make prefix=/usr DESTDIR="$pkgdir" install-unix } md5sums="08bd2f265b244eb4bf5c2c36bf89b759 luasocket-3.0-rc1.tar.gz f869d0f81e347291405fb53dff9a408a lua-cflags.patch 4bcbbc8d3383db94223155fc7a6d454e include-luasocket.patch" sha256sums="8b67d9b5b545e1b694753dab7bd6cdbc24c290f2b21ba1e14c77b32817ea1249 luasocket-3.0-rc1.tar.gz bbcead4850fcdf6711c70b48db4db17e06fedcae45c4c53fd814ff6f0d9fe4ce lua-cflags.patch 42b1a439805efaf33110e01a53798b3e8d044101470808fe9478ca3be0ae5165 include-luasocket.patch" sha512sums="f6efce259aaacaa11472911471f8a13b118fe009b8953a82c6aa18b9ec829cd1293180904e56935cb130d36d267e3f27c91db2d78e03f7488f3e100571ed0540 luasocket-3.0-rc1.tar.gz 58b5d3c239c8be1561060f75bf849bcfa9022626995a5234ec741dc2ae86755d9fed88c12b5644c914c604ea31b017a6679ac33a9a76392242faf139bfd59de1 lua-cflags.patch 34db925f9e9a1a629d01dc26072f4edec77087f7bf89dda8140326447662efbc53ce5e36087fa9127d708d498c129613f7ed82862dd3176df16796418868548d include-luasocket.patch"