### this file is sourced not run
PKGVER=3.0.2018.03
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=luasocket-master-20180328.tar.gz
MD5SUM=9724c61cb137bf2f96881d273111a533
SRC_URL=http://distro.ibiblio.org/fatdog/source/800/$TARBALL
BUNDLE=

SLACKREQ='lua'
SLACKDESC="lua-socket: lua-socket $PKGVER (Socket library for Lua)  
lua-socket:  
lua-socket: LuaSocket is a Lua extension library that is composed by two 
lua-socket: parts: a C core that provides support for the TCP and UDP 
lua-socket: transport layers, and a set of Lua modules that add support for 
lua-socket: functionality commonly needed by applications that deal with the 
lua-socket: Internet, such as: SMTP, HTTP, FTP, MIME, URL and filters.  
lua-socket: 
lua-socket: https://github.com/diegonehab/luasocket
lua-socket: http://w3.impa.br/~diego/software/luasocket/home.html
lua-socket: 
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### pkg_build
pkg_build() {
	LUAVER=5.3
	LUALIB=/usr/$LIBDIR/lua/$LUAVER

	CONF="PLAT=linux LUAV=$LUAVER prefix=/usr CDIR=$LIBDIR/lua/$LUAVER"
	
	cd /tmp/lua* &&
	make $CONF && make $CONF install && make $CONF install-unix &&
	mkdir -p /usr/share/doc/luasocket &&
	cp -a doc etc samples test gem /usr/share/doc/luasocket &&

	pkg_build_slackdesc	
}

