#Packager: Richard Lapointe #Former Packager(s): Name #Anything commented out is optional and can be deleted. pkgname=lua pkgver=5.1.5 pkgrel=3rl #arch=noarch source=(http://www.lua.org/ftp/$pkgname-$pkgver.tar.gz) sourcetemplate=http://people.salixos.org/laprjns/$pkgname/$pkgver/ docs=("readme" "install" "copying" "changelog" "authors" "news" "todo") url=http://www.lua.org/ #dotnew=()lua #CFLAGS= #CXXFLAGS= #options=('noextract') #doinst() { # #} slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "lua (a powerful, fast, lightweight, embeddable scripting language)" "Lua combines simple procedural syntax with powerful data description" "constructs based on associative arrays and extensible semantics. Lua" "is dynamically typed, runs by interpreting bytecode for a" "register-based virtual machine, and has automatic memory management" "with incremental garbage collection, making it ideal for" "configuration, scripting, and rapid prototyping." ) build() { cd $startdir/src/$pkgname-$pkgver # Fix up a to-be-installed header and the pkgconfig file sed -i "s|/usr/local|/usr|" src/luaconf.h sed -i "s|lib/lua|lib$LIBDIRSUFFIX/lua|" src/luaconf.h sed -i "s|/usr/local|/usr|" etc/lua.pc sed -i "s|prefix}/lib|prefix}/lib${LIBDIRSUFFIX}|g" etc/lua.pc make linux \ CFLAGS="$CFLAGS -DLUA_USE_LINUX" \ INSTALL_TOP=/usr \ INSTALL_LIB=/usr/lib${LIBDIRSUFFIX} \ INSTALL_LMOD=/usr/share/lua/5.1 \ INSTALL_CMOD=/usr/lib${LIBDIRSUFFIX}/lua/5.1 make linux install \ CFLAGS="$CFLAGS -DLUA_USE_LINUX" \ INSTALL_TOP=$startdir/pkg/usr \ INSTALL_LIB=$startdir/pkg/usr/lib${LIBDIRSUFFIX} \ INSTALL_LMOD=$startdir/pkg/usr/share/lua/5.1 \ INSTALL_CMOD=$startdir/pkg/usr/lib${LIBDIRSUFFIX}/lua/5.1 # Now let's build the shared library mkdir -p shared cd shared ar -x $startdir/pkg/usr/lib${LIBDIRSUFFIX}/liblua.a gcc -ldl -lreadline -lhistory -lncurses -lm -shared *.o -o liblua.so.$pkgver cp -a liblua.so.$pkgver $PKG/usr/lib${LIBDIRSUFFIX} ( cd $startdir/pkg/usr/lib${LIBDIRSUFFIX} ln -s liblua.so.$pkgver liblua.so.5.1 ln -s liblua.so.$pkgver liblua.so.5 ln -s liblua.so.$pkgver liblua.so ) cd .. # and install the pkgconfig file mkdir -p $startdir/pkg/usr/lib${LIBDIRSUFFIX}/pkgconfig cat etc/lua.pc > $startdir/pkg/usr/lib${LIBDIRSUFFIX}/pkgconfig/lua.pc mkdir -p $startdir/pkg/usr/doc/$pkgname-$pkgver cp -a COPYRIGHT HISTORY INSTALL README doc/*.html doc/*.css doc/*.gif \ $startdir/pkg/usr/doc/$pkgname-$pkgver mkdir -p $startdir/pkg/usr/doc/$pkgname-${pkgver}/{extras,html} cp -a COPYRIGHT HISTORY INSTALL README $startdir/pkg/usr/doc/$pkgname-$pkgver cp -a doc/*.html doc/logo.gif doc/lua.css $startdir/pkg/usr/doc/$pkgname-$pkgver/html cp -a etc test $startdir/pkg/usr/doc/$pkgname-$pkgver/extras }