61 lines
1.7 KiB
Bash
61 lines
1.7 KiB
Bash
# Template file for 'lua52'
|
|
pkgname=lua52
|
|
version=5.2.4
|
|
revision=3
|
|
wrksrc=lua-${version}
|
|
build_pie=yes
|
|
makedepends="ncurses-devel readline-devel"
|
|
short_desc="Powerful, fast, lightweight, embeddable scripting language"
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
|
homepage="http://www.lua.org"
|
|
license="MIT"
|
|
distfiles="http://www.lua.org/ftp/lua-$version.tar.gz"
|
|
checksum=b9e2e4aad6789b3b63a056d442f7b39f0ecfca3ae0f1fc0ae4e9614401b69f4b
|
|
|
|
do_build() {
|
|
sed -i src/Makefile -r \
|
|
-e '/^LUA_(SO|A|T)=/ s;lua;lua5.2;' \
|
|
-e '/^LUAC_T=/ s;luac;luac5.2;'
|
|
make MYCFLAGS="$CFLAGS -fPIC" MYLDFLAGS="$LDFLAGS" \
|
|
CC="$CC" RANLIB="$RANLIB" \
|
|
INSTALL_DATA="cp -d" LUA_SO=liblua5.2.so ${makejobs} linux
|
|
}
|
|
|
|
do_install() {
|
|
make INSTALL_DATA="cp -d" INSTALL_TOP="${DESTDIR}/usr" \
|
|
TO_BIN="lua5.2 luac5.2" \
|
|
TO_LIB="liblua5.2.a liblua5.2.so liblua5.2.so.${version%.*} liblua5.2.so.${version}" \
|
|
INSTALL_INC="${DESTDIR}/usr/include/lua5.2" \
|
|
INSTALL_MAN="${DESTDIR}/usr/share/man/man1" install
|
|
|
|
sed ${FILESDIR}/lua.pc \
|
|
-e "s;%VER%;${version%.*};g;s;%REL%;${version};g" \
|
|
-e "s;llua;llua5.2;" \
|
|
-e "s;/include;/include/lua5.2;" \
|
|
> lua5.2.pc
|
|
vinstall lua5.2.pc 644 usr/lib/pkgconfig
|
|
|
|
# Install the documentation
|
|
rm -f doc/*.1
|
|
vmkdir usr/share/doc/lua52
|
|
cp -R doc/* ${DESTDIR}/usr/share/doc/lua52
|
|
|
|
vlicense doc/readme.html
|
|
|
|
# Rename man pages
|
|
mv ${DESTDIR}/usr/share/man/man1/lua{,5.2}.1
|
|
mv ${DESTDIR}/usr/share/man/man1/luac{,5.2}.1
|
|
}
|
|
|
|
lua52-devel_package() {
|
|
depends="${makedepends} lua52>=${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove "usr/lib/*.a"
|
|
vmove "usr/lib/*.so"
|
|
vmove usr/lib/pkgconfig
|
|
vmove usr/share/doc
|
|
}
|
|
}
|