summaryrefslogtreecommitdiff
path: root/community/luaposix/PKGBUILD
blob: 124408cb5ff4b0b0e5ce3cef19a104e2c7c5cbc2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# $Id: PKGBUILD 81118 2012-12-12 00:49:30Z eric $
# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org>
# Contributor: SpepS <dreamspepser at yahoo dot it>
# Contributor: Laszlo Papp <djszapi at archlinux us>
# Contributor: Donald Ephraim Curtis <dcurtis@gmail.com>

pkgbase=luaposix
pkgname=('lua-posix' 'lua51-posix')
pkgver=5.1.23
pkgrel=1
pkgdesc='A POSIX library for Lua programming language'
arch=('i686' 'x86_64')
url='http://luaforge.net/projects/luaposix/'
license=('GPL' 'LGPL')
makedepends=('lua' 'lua51' 'lua51-bitop')
conflicts=('luaposix')
replaces=('luaposix')
options=('!libtool')
source=("https://github.com/downloads/$pkgbase/$pkgbase/$pkgbase-$pkgver.tar.gz")
md5sums=('ebe7d335741ca736e003a6844a0fbf92')

build() {
  cd $pkgbase-$pkgver
  mkdir build_51 build_52
  msg2 'Build with lua 5.2'
  cd build_52
  ../configure \
      --prefix=/usr \
      --libdir=/usr/lib/lua/5.2 \
      --datadir=/usr/share/lua/5.2 \
      --docdir=/usr/share/doc/lua-posix
  make
  msg2 'Build with lua 5.1'
  cd ../build_51
  ../configure CFLAGS=-I/usr/include/lua5.1 \
      --prefix=/usr \
      --libdir=/usr/lib/lua/5.1 \
      --datadir=/usr/share/lua/5.1 \
      --docdir=/usr/share/doc/lua51-posix
  make
}

package_lua-posix() {
  depends=('lua')

  cd $pkgbase-$pkgver/build_52
  make DESTDIR="$pkgdir/" install
}

package_lua51-posix() {
  depends=('lua51' 'lua51-bitop')

  cd $pkgbase-$pkgver/build_51
  make DESTDIR="$pkgdir/" install
}

# vim:set ts=2 sw=2 et: