summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 78e899751efb1c7462ebe21f265342fa4455618e (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
# Maintainer: Dwayne Bent <dbb@dbb.io>
# Contributor: Timothée Ravier <tim@siosm.fr>
# Contributor: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>

pkgname=(lua-event lua51-event lua52-event)
_pkgbase=luaevent
pkgver=0.4.6
pkgrel=1
pkgdesc="libevent binding for Lua"
arch=('i686' 'x86_64' 'aarch64' 'armv6h' 'armv7h')
url="https://github.com/harningt/luaevent"
license=('MIT')
makedepends=('libevent' 'lua51' 'lua52' 'lua')
source=($_pkgbase-$pkgver.tar.gz::https://github.com/harningt/$_pkgbase/archive/v$pkgver.tar.gz)
sha256sums=('dd12babb252115895618c1243557534decde289bf0c255ffebf0dcd14a18705d')

# There is no build directory because the Makefile doesn’t allow for separating
# both steps, see https://github.com/harningt/luaevent/issues/11

package_lua-event() {
  depends=('libevent' 'lua-socket')

  cd $_pkgbase-$pkgver
  make LUA_INC_DIR=/usr/include \
       INSTALL_DIR_BIN='/usr/lib/lua/5.3' \
       INSTALL_DIR_LUA='/usr/share/lua/5.3' \
       DESTDIR="$pkgdir" \
       install
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

package_lua51-event() {
  depends=('libevent' 'lua51-socket')

  cd $_pkgbase-$pkgver
  make LUA_INC_DIR=/usr/include/lua5.1 \
       INSTALL_DIR_BIN='/usr/lib/lua/5.1' \
       INSTALL_DIR_LUA='/usr/share/lua/5.1' \
       DESTDIR="$pkgdir" \
       install
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

package_lua52-event() {
  depends=('libevent' 'lua52-socket')

  cd $_pkgbase-$pkgver
  make LUA_INC_DIR=/usr/include/lua5.2 \
       INSTALL_DIR_BIN='/usr/lib/lua/5.2' \
       INSTALL_DIR_LUA='/usr/share/lua/5.2' \
       DESTDIR="$pkgdir" \
       install
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}