36 lines
1.0 KiB
Plaintext
36 lines
1.0 KiB
Plaintext
# Description: A programming language designed for extending applications.
|
|
# URL: http://www.lua.org/
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
|
# Packager: Tilman Sauerbeck, tilman at crux dot nu
|
|
# Depends on: readline
|
|
|
|
name=lua
|
|
version=5.3.3
|
|
release=1
|
|
source=(http://www.lua.org/ftp/$name-$version.tar.gz
|
|
liblua.so.patch lua.pc)
|
|
|
|
build() {
|
|
cd $name-$version
|
|
|
|
patch -p 1 -i $SRC/liblua.so.patch
|
|
export CFLAGS="$CFLAGS -fPIC -DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1"
|
|
|
|
make MYCFLAGS="$CFLAGS" MYLDFLAGS="$LDFLAGS" linux
|
|
|
|
make \
|
|
TO_LIB="liblua.a liblua.so.$version" \
|
|
INSTALL_TOP=$PKG/usr \
|
|
INSTALL_MAN=$PKG/usr/share/man/man1 \
|
|
install
|
|
|
|
ln -sf liblua.so.$version $PKG/usr/lib/liblua.so.${version:0:3}
|
|
ln -sf liblua.so.${version:0:3} $PKG/usr/lib/liblua.so
|
|
ln -sf /usr/bin/lua $PKG/usr/bin/lua${version:0:3}
|
|
ln -sf /usr/bin/luac $PKG/usr/bin/luac${version:0:3}
|
|
|
|
#make pc > lua.pc
|
|
sed "s/%VER%/${version:0:3}/g;s/%REL%/$version/g" $SRC/lua.pc > lua.pc
|
|
install -m 0644 -D lua.pc $PKG/usr/lib/pkgconfig/lua.pc
|
|
}
|