summaryrefslogtreecommitdiff
path: root/community/luasocket/PKGBUILD
blob: d659a608604e4d545c4ab9065af273c024cb7e11 (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
# $Id: PKGBUILD 81274 2012-12-15 15:00:36Z seblu $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Anders Bergh <anders1@gmail.com>

pkgbase=luasocket
pkgname=(lua51-socket)
pkgver=2.0.2
pkgrel=5
pkgdesc='Networking support library for the Lua language'
arch=('i686' 'x86_64')
url='http://www.cs.princeton.edu/~diego/professional/luasocket/'
license=('MIT')
replaces=('luasocket')
conflicts=('luasocket')
makedepends=('lua' 'lua51')
source=("http://luaforge.net/frs/download.php/2664/luasocket-$pkgver.tar.gz"
        'luasocket-unixsocket.patch')
md5sums=('41445b138deb7bcfe97bff957503da8e'
         '8d116bb70bd7a2fa15cbe949d4cfc35e')

build() {
#  cp -a luasocket-$pkgver luasocket-$pkgver-52
#  msg2 'Building with lua 5.2'
#  pushd luasocket-$pkgver-52
#  patch -Np1 -i "$srcdir/luasocket-unixsocket.patch"
#  make
#  popd
  msg2 'Building with lua 5.1'
  cd luasocket-$pkgver
  patch -Np1 -i "$srcdir/luasocket-unixsocket.patch"
  make LUAINC=-I/usr/include/lua5.1
}

#package_lua-socket() {
#  depends=('lua')
#  cd luasocket-$pkgver-52
#  make DESTDIR="$pkgdir/" \
#    INSTALL_TOP_SHARE='$(DESTDIR)/usr/share/lua/5.2' \
#    INSTALL_TOP_LIB='$(DESTDIR)/usr/lib/lua/5.2' install
#  install -D -m0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
#}

package_lua51-socket() {
  depends=('lua51')
  cd luasocket-$pkgver
  make DESTDIR="$pkgdir/" \
    INSTALL_TOP_SHARE='$(DESTDIR)/usr/share/lua/5.1' \
    INSTALL_TOP_LIB='$(DESTDIR)/usr/lib/lua/5.1' install
  install -D -m0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}