archrelease: copy trunk to community-any
[arch-community.git] / luaexpat / trunk / PKGBUILD
blob08c13d8089968607198922912f645a8f7351c28b
1 # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
2 # Maintainer: Daurnimator <daurnimator@archlinux.org>
3 # Maintainer: Caleb Maclennan <caleb@alerque.com>
4 # Contributor: Lucas Hermann Negri <kkndrox@gmail.com>
6 pkgbase=luaexpat
7 pkgname=(lua-expat lua51-expat lua52-expat lua53-expat)
8 pkgver=1.5.1
9 pkgrel=1
10 _rockrel=1
11 pkgdesc='SAX XML parser based on the Expat library'
12 arch=('x86_64')
13 url="https://github.com/lunarmodules/$pkgbase"
14 license=('MIT')
15 depends=(expat)
16 makedepends=(lua
17              lua51
18              lua52
19              lua53
20              luarocks)
21 _archive="$pkgbase-$pkgver"
22 _rock="$_archive-$_rockrel.linux-$CARCH.rock"
23 _rockspec="$_archive-$_rockrel.rockspec"
24 source=("$url/archive/$pkgver/$_archive.tar.gz")
25 sha512sums=('45834b02d863a65c6de2ad3c5c671935ae512dd906233a647269438aeeb37c7bbd6e7166aefd8da72480b33e1aa79a86ed070ed8800a8e0f303ccc74918f3bb8')
27 build() {
28         cd "$_archive"
29         for LUAVER in 5.{1,2,3,4}; do
30                 luarocks --lua-version "$LUAVER" \
31                         CFLAGS="$CFLAGS -DLUA_C89_NUMBERS" \
32                         make --pack-binary-rock --deps-mode none -- "rockspecs/$_rockspec"
33                 install -Dm0644 -t "lua-$LUAVER/" "$_rock"
34         done
37 _package() {
38         cd "$_archive"
39         depends+=("${pkgname%-*}")
40         luarocks --lua-version "$1" --tree "$pkgdir/usr/" \
41                 install --deps-mode none --no-manifest -- "lua-$1/$_rock"
42         install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
45 package_lua-expat() {
46         _package 5.4
49 package_lua53-expat() {
50         _package 5.3
53 package_lua52-expat() {
54         _package 5.2
57 package_lua51-expat() {
58         replaces=(luaexpat)
59         conflicts=(luaexpat)
60         _package 5.1