# $Id: PKGBUILD 173169 2012-12-12 00:31:37Z eric $ # Maintainer: Sébastien Luttringer # Contributor: Juergen Hoetzel # Contributor: Damir Perisa pkgname=lua pkgver=5.2.1 pkgrel=3 pkgdesc='A powerful light-weight programming language designed for extending applications' arch=('i686' 'x86_64' 'mips64el') url='http://www.lua.org/' depends=('readline') license=('MIT') options=('!makeflags' '!emptydirs') source=("http://www.lua.org/ftp/$pkgname-$pkgver.tar.gz" 'liblua.so.patch' 'lua.pc' 'LICENSE') md5sums=('ae08f641b45d737d12d30291a5e5f6e3' 'bdc663c7b82ffc0b5df67611621fb625' 'e7ba6c2b695b0b84a5ea0cbff5fc9067' '0e2bd67b909b9ff673da844ca3480df2') build() { cd $pkgname-$pkgver patch -p1 -i "$srcdir/liblua.so.patch" [[ $CARCH != i686 ]] && export CFLAGS="$CFLAGS -fPIC" make MYCFLAGS="$CFLAGS" MYLDFLAGS="$LDFLAGS" linux sed "s/%VER%/${pkgver%.*}/g;s/%REL%/$pkgver/g" ../lua.pc > lua.pc } package() { cd $pkgname-$pkgver make \ TO_LIB="liblua.a liblua.so liblua.so.5.2 liblua.so.$pkgver" \ INSTALL_DATA="cp -d" \ INSTALL_TOP="$pkgdir/usr" \ INSTALL_MAN="$pkgdir/usr/share/man/man1" \ install install -Dm644 lua.pc "$pkgdir/usr/lib/pkgconfig/lua.pc" # Install the documentation install -d "$pkgdir/usr/share/doc/lua" install -m644 doc/*.{gif,png,css,html} "$pkgdir/usr/share/doc/lua" install -D -m644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } # vim:set ts=4 sw=4 et: