archrelease: copy trunk to community-any
[ArchLinux/community.git] / lua-bit32 / repos / community-x86_64 / PKGBUILD
blobe7a06dfeb1b4994486aedfff86eccb356f368541
1 # Maintainer: Caleb Maclennan <caleb@alerque.com>
2 # Contributor: Stephen Smith <stephen304@gmail.com>
4 pkgbase=lua-bit32
5 _project=lua-compat-5.3
6 _rockname=${pkgbase#lua-}
7 pkgname=("$pkgbase" "lua51-$_rockname" "lua52-$_rockname" "lua53-$_rockname")
8 _compatrel=0.10
9 pkgver=5.3.5.1_$_compatrel
10 _rockrel=1
11 pkgrel=5
12 pkgdesc='Lua 5.2 bit manipulation library'
13 arch=(x86_64)
14 url="https://github.com/keplerproject/$_project"
15 license=(MIT)
16 makedepends=(lua
17              lua51
18              lua52
19              lua53
20              luarocks)
21 options=(debug)
22 _archive="$_project-$_compatrel"
23 _rockspec="$_rockname-${pkgver%_*}-$_rockrel.rockspec"
24 _rock="$_rockname-${pkgver%_*}-$_rockrel.linux-$CARCH.rock"
25 source=("$url/archive/v$_compatrel/$_archive.tar.gz"
26         "${url/github/raw.githubusercontent}/1e31f3ddc517b4e521c73f7d6eaecd5e1787daa6/rockspecs/$_rockspec")
27 sha256sums=('d1ed32f091856f6fffab06232da79c48b437afd4cd89e5c1fc85d7905b011430'
28             'a1c88310b5d5776c9f4c1ff4a934be497b03237c21d5aaf88422d1582b04af86')
30 build() {
31         cd "$_archive"
32         for LUAVER in 5.{1,2,3,4}; do
33                 luarocks --lua-version "$LUAVER" \
34                         make --pack-binary-rock --deps-mode none -- "../$_rockspec"
35                 install -Dm0644 -t "lua-$LUAVER/" "$_rock"
36         done
39 _package() {
40         cd "$_archive"
41         depends=("${pkgname%-*}")
42         luarocks --lua-version=$1 --tree="$pkgdir/usr/" \
43                 install --deps-mode=none --no-manifest -- "lua-$1/$_rock"
44         install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
47 package_lua-bit32() {
48         _package 5.4
51 package_lua51-bit32() {
52         _package 5.1
55 package_lua52-bit32() {
56         _package 5.2
59 package_lua53-bit32() {
60         _package 5.3