mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
50 lines
1.8 KiB
Bash
50 lines
1.8 KiB
Bash
# $Id: PKGBUILD 138070 2011-09-16 01:15:44Z eric $
|
|
# 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
|
|
pkgrel=8
|
|
pkgdesc="A powerful light-weight programming language designed for extending applications."
|
|
arch=('i686' 'x86_64')
|
|
url="http://www.lua.org/"
|
|
depends=('readline')
|
|
license=('MIT')
|
|
options=('!makeflags' '!emptydirs')
|
|
source=("http://www.lua.org/ftp/${pkgname}-${pkgver}.tar.gz"
|
|
'http://www.lua.org/ftp/patch-lua-5.1.4-3'
|
|
'lua-arch.patch'
|
|
'lua-5.1-cflags.diff')
|
|
md5sums=('d0870f2de55d59c1c8419f36e8fac150'
|
|
'998ef7886183f61d3a5ca891a9ce6a79'
|
|
'6c5953f63904bf20a0183cdab05b80de'
|
|
'249582bf1fd861ccf492d2c35a9fe732')
|
|
|
|
build() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
patch -p1 -i "${srcdir}/lua-arch.patch"
|
|
patch -i "${srcdir}/patch-lua-5.1.4-3" -d src
|
|
[ "$CARCH" == "armv7h" ] && patch -Np1 -i ../lua-5.1-cflags.diff
|
|
[ "$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
|
|
install -D -m 644 etc/lua.pc "${pkgdir}/usr/lib/pkgconfig/lua.pc"
|
|
install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/COPYRIGHT"
|
|
|
|
# Install the documentation
|
|
mkdir -p "${pkgdir}/usr/share/doc/lua"
|
|
cp -R doc/* "${pkgdir}/usr/share/doc/lua"
|
|
}
|