archrelease: copy trunk to community-any
[ArchLinux/community.git] / luasocket / trunk / PKGBUILD
bloba694240c0a732597a0120bf4e61064f2f9638956
1 # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
2 # Maintainer: Caleb Maclennan <caleb@alerque.com>
3 # Contributor: Anders Bergh <anders1@gmail.com>
5 pkgbase=luasocket
6 pkgname=(lua-socket lua51-socket lua52-socket lua53-socket)
7 pkgver=3.1.0
8 pkgrel=1
9 _rockrel=1
10 epoch=1
11 pkgdesc='Networking support library for the Lua language'
12 arch=(x86_64)
13 url="https://github.com/lunarmodules/$pkgbase"
14 license=(MIT)
15 makedepends=(lua
16              lua51
17              lua52
18              lua53
19              luarocks)
20 _archive="$pkgbase-$pkgver"
21 _rock="$_archive-$_rockrel.linux-$CARCH.rock"
22 source=("$url/archive/v$pkgver/$_archive.tar.gz")
23 sha256sums=('bf033aeb9e62bcaa8d007df68c119c966418e8c9ef7e4f2d7e96bddeca9cca6e')
25 build() {
26         cd "$_archive"
27         for LUAVER in 5.1 5.2 5.3 5.4; do
28                 luarocks --lua-version "$LUAVER" \
29                         make --pack-binary-rock --deps-mode none -- "rockspecs/$_archive-$_rockrel.rockspec"
30                 install -Dm0644 -t "lua$LUAVER/" "$_rock"
31         done
34 _package() {
35         cd "$_archive"
36         depends=("${pkgname%-*}")
37         luarocks --lua-version "$1" --tree "$pkgdir/usr/" \
38                 install --deps-mode none --no-manifest -- "lua$1/$_rock"
39         install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
42 package_lua-socket() {
43         _package 5.4
46 package_lua53-socket() {
47         _package 5.3
50 package_lua52-socket() {
51         _package 5.2
54 package_lua51-socket() {
55         replaces=(luasocket)
56         conflicts=(luasocket)
57         _package 5.1