PKGBUILDs/extra/lua/PKGBUILD

51 lines
1.8 KiB
Bash
Raw Normal View History

2011-11-19 18:47:48 +00:00
# $Id: PKGBUILD 142952 2011-11-19 04:33:22Z eric $
2011-10-18 03:32:33 +00:00
# Maintainer: Juergen Hoetzel <juergen@archlinux.org>
# Contributor: Damir Perisa <damir.perisa@bluewin.ch>
# ALARM: Kevin Mihelich <kevin@plugapps.com>
# - Replaced x86_64 with armv7h, we need the -fPIC there
plugrel=1
pkgname=lua
pkgver=5.1.4
2011-11-19 18:47:48 +00:00
pkgrel=9
_patchver=5.1.4-4
pkgdesc="A powerful light-weight programming language designed for extending applications"
2011-10-18 03:32:33 +00:00
arch=('i686' 'x86_64')
url="http://www.lua.org/"
depends=('readline')
license=('MIT')
options=('!makeflags' '!emptydirs')
2011-11-19 18:47:48 +00:00
source=(http://www.lua.org/ftp/${pkgname}-${pkgver}.tar.gz
http://www.lua.org/ftp/patch-lua-${_patchver}
lua-arch.patch lua-5.1-cflags.diff)
2011-10-18 03:32:33 +00:00
md5sums=('d0870f2de55d59c1c8419f36e8fac150'
2011-11-19 18:47:48 +00:00
'329d8695e3e6f1267190e220559f7b6c'
2011-10-18 03:32:33 +00:00
'6c5953f63904bf20a0183cdab05b80de'
'249582bf1fd861ccf492d2c35a9fe732')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
2011-11-19 18:47:48 +00:00
patch -p0 -i "${srcdir}/patch-lua-${_patchver}" -d src
2011-10-18 03:32:33 +00:00
patch -p1 -i "${srcdir}/lua-arch.patch"
2011-11-19 18:47:48 +00:00
[ "$CARCH" == "armv7h" ] && patch -p1 -i "${srcdir}/lua-5.1-cflags.diff"
2011-10-18 03:32:33 +00:00
[ "$CARCH" == "armv7h" ] && export CFLAGS="$CFLAGS -fPIC"
make INSTALL_DATA="cp -d" TO_LIB="liblua.a liblua.so liblua.so.5.1" LUA_SO=liblua.so \
INSTALL_TOP="${pkgdir}/usr" INSTALL_MAN="${pkgdir}/usr/share/man/man1" \
linux
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make INSTALL_DATA="cp -d" TO_LIB="liblua.a liblua.so liblua.so.5.1" LUA_SO=liblua.so \
INSTALL_TOP="${pkgdir}/usr" INSTALL_MAN="${pkgdir}/usr/share/man/man1" \
install
2011-11-19 18:47:48 +00:00
install -D -m644 etc/lua.pc "${pkgdir}/usr/lib/pkgconfig/lua.pc"
2011-10-18 03:32:33 +00:00
install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/COPYRIGHT"
# Install the documentation
2011-11-19 18:47:48 +00:00
install -d "${pkgdir}/usr/share/doc/lua"
install -m644 doc/*.{gif,png,css,html} "${pkgdir}/usr/share/doc/lua"
2011-10-18 03:32:33 +00:00
}