void-packages/srcpkgs/lua/template
Juan RP 1c5f4690e6 xbps-src: always require current srcpkgs version in build dependencies.
That means that version comparators are not supported anymore in
hostmakedepends and makedepends.

This will ensure that a pkg is always built with the same build dependencies
everywhere, if the srcpkgs tree is uptodate.
2015-03-27 10:59:58 +01:00

44 lines
1.2 KiB
Bash

# Template file for 'lua'
pkgname=lua
version=5.2.4
revision=1
build_pie=yes
makedepends="ncurses-devel readline-devel"
short_desc="Powerful, fast, lightweight, embeddable scripting language"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://www.lua.org"
license="MIT"
distfiles="http://www.lua.org/ftp/$pkgname-$version.tar.gz"
checksum=b9e2e4aad6789b3b63a056d442f7b39f0ecfca3ae0f1fc0ae4e9614401b69f4b
do_build() {
sed "s/%VER%/${version%.*}/g;s/%REL%/${version}/g" ${FILESDIR}/lua.pc > lua.pc
make MYCFLAGS="$CFLAGS -fPIC" MYLDFLAGS="$LDFLAGS" \
CC="$CC" RANLIB="$RANLIB" \
INSTALL_DATA="cp -d" LUA_SO=liblua.so ${makejobs} linux
}
do_install() {
make INSTALL_DATA="cp -d" INSTALL_TOP="${DESTDIR}/usr" \
TO_LIB="liblua.a liblua.so liblua.so.${version%.*} liblua.so.${version}" \
INSTALL_MAN="${DESTDIR}/usr/share/man/man1" install
vinstall lua.pc 644 usr/lib/pkgconfig
# Install the documentation
vmkdir usr/share/doc/lua
cp -R doc/* ${DESTDIR}/usr/share/doc/lua
}
lua-devel_package() {
depends="${makedepends} lua>=${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
}
}