upgpkg: sbcl 2.2.5-1
[arch-packages.git] / lua / trunk / PKGBUILD
blob1a3d7c8d08de5fb53456ae26412337937d6d04f8
1 # Maintainer: Sébastien Luttringer <seblu@archlinux.org>
2 # Contributor: Juergen Hoetzel <juergen@archlinux.org>
3 # Contributor: Damir Perisa <damir.perisa@bluewin.ch>
5 pkgname=lua
6 pkgver=5.4.4
7 _majorver=${pkgver%.*}
8 pkgrel=1
9 pkgdesc='Powerful lightweight programming language designed for extending applications'
10 arch=('x86_64')
11 url='https://www.lua.org/'
12 depends=('readline')
13 license=('MIT')
14 options=('!emptydirs')
15 source=(https://www.lua.org/ftp/lua-$pkgver.tar.gz
16         liblua.so.patch
17         lua.pc
18         LICENSE)
19 sha1sums=('03c27684b9d5d9783fb79a7c836ba1cdc5f309cd'
20           'cdfa66057f43aaf4b5914496aa6a4556f3a6e7a0'
21           '1aee8d1a219639d0efc534e483ffa1ee236fb393'
22           '05f5f3b7bef0258bd617c505b8992de639af4551')
24 prepare() {
25   cd lua-$pkgver
26   patch -p1 -i ../liblua.so.patch
28   sed "s/%VER%/$_majorver/g;s/%REL%/$pkgver/g" ../lua.pc > lua.pc
31 build() {
32   cd lua-$pkgver
34   make MYCFLAGS="$CFLAGS -fPIC" MYLDFLAGS="$LDFLAGS" linux-readline
37 package() {
38   cd lua-$pkgver
40   make \
41     TO_LIB="liblua.a liblua.so liblua.so.$_majorver liblua.so.$pkgver" \
42     INSTALL_DATA='cp -d' \
43     INSTALL_TOP="$pkgdir"/usr \
44     INSTALL_MAN="$pkgdir"/usr/share/man/man1 \
45     install
46   ln -sf /usr/bin/lua "$pkgdir"/usr/bin/lua$_majorver
47   ln -sf /usr/bin/luac "$pkgdir"/usr/bin/luac$_majorver
48   ln -sf /usr/lib/liblua.so.$pkgver "$pkgdir"/usr/lib/liblua$_majorver.so
50   install -Dm644 lua.pc "$pkgdir"/usr/lib/pkgconfig/lua54.pc
51   ln -sf lua54.pc "$pkgdir"/usr/lib/pkgconfig/lua.pc
52   ln -sf lua54.pc "$pkgdir"/usr/lib/pkgconfig/lua5.4.pc
53   ln -sf lua54.pc "$pkgdir"/usr/lib/pkgconfig/lua-5.4.pc
55   install -d "$pkgdir"/usr/share/doc/$pkgname
56   install -m644 doc/*.{gif,png,css,html} "$pkgdir"/usr/share/doc/$pkgname
57   install -Dm644 ../LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE