1 # Maintainer: Christian Hesse <mail@eworm.de>
2 # Contributor: Gustavo Alvarez <sl1pkn07@gmail.com>
5 pkgname=(lua-lpeg lua51-lpeg lua52-lpeg lua53-lpeg)
9 url='http://www.inf.puc-rio.br/~roberto/lpeg'
11 makedepends=('lua' 'lua51' 'lua52' 'lua53')
12 source=("http://www.inf.puc-rio.br/~roberto/${pkgbase}/${pkgbase}-${pkgver}.tar.gz"
14 sha256sums=('48d66576051b6c78388faad09b70493093264588fcd0f258ddaab1cdd4a15ffe'
15 '6be7688c9c648e7c7cde693081be938c869a10aa4de09fe0a4c4c1d66b3cf03d')
18 sed 's/^CFLAGS =/CFLAGS +=/' -i "${pkgbase}-${pkgver}"/makefile
19 sed 's/^COPT =/# COPT =/' -i "${pkgbase}-${pkgver}"/makefile
21 cp -r "${pkgbase}-${pkgver}" "${pkgbase}-${pkgver}"-51
22 cp -r "${pkgbase}-${pkgver}" "${pkgbase}-${pkgver}"-52
23 cp -r "${pkgbase}-${pkgver}" "${pkgbase}-${pkgver}"-53
27 cd "${pkgbase}-${pkgver}"
28 make LUADIR=/usr/include
30 cd "${srcdir}/${pkgbase}-${pkgver}-51"
31 make LUADIR=/usr/include/lua5.1
33 cd "${srcdir}/${pkgbase}-${pkgver}-52"
34 make LUADIR=/usr/include/lua5.2
36 cd "${srcdir}/${pkgbase}-${pkgver}-53"
37 make LUADIR=/usr/include/lua5.3
41 echo "Testing with Lua 5.4"
42 cd "${srcdir}/${pkgbase}-${pkgver}"
45 echo "Testing with Lua 5.1"
46 cd "${srcdir}/${pkgbase}-${pkgver}-51"
49 echo "Testing with Lua 5.2"
50 cd "${srcdir}/${pkgbase}-${pkgver}-52"
53 echo "Testing with Lua 5.3"
54 cd "${srcdir}/${pkgbase}-${pkgver}-53"
59 pkgdesc='Pattern-matching library for Lua 5.4'
62 cd "${srcdir}/${pkgbase}-${pkgver}"
63 install -Dm0755 ${pkgbase}.so "${pkgdir}"/usr/lib/lua/5.4/${pkgbase}.so
64 install -Dm0644 re.lua "${pkgdir}"/usr/share/lua/5.4/re.lua
65 install -Dm0644 ../LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
68 package_lua51-lpeg() {
69 pkgdesc='Pattern-matching library for Lua 5.1'
72 cd "${srcdir}/${pkgbase}-${pkgver}-51"
73 install -Dm0755 ${pkgbase}.so "${pkgdir}"/usr/lib/lua/5.1/${pkgbase}.so
74 install -Dm0644 re.lua "${pkgdir}"/usr/share/lua/5.1/re.lua
75 install -Dm0644 ../LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
78 package_lua52-lpeg() {
79 pkgdesc='Pattern-matching library for Lua 5.2'
82 cd "${srcdir}/${pkgbase}-${pkgver}-52"
83 install -Dm0755 ${pkgbase}.so "${pkgdir}"/usr/lib/lua/5.2/${pkgbase}.so
84 install -Dm0644 re.lua "${pkgdir}"/usr/share/lua/5.2/re.lua
85 install -Dm0644 ../LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
88 package_lua53-lpeg() {
89 pkgdesc='Pattern-matching library for Lua 5.3'
92 cd "${srcdir}/${pkgbase}-${pkgver}-53"
93 install -Dm0755 ${pkgbase}.so "${pkgdir}"/usr/lib/lua/5.3/${pkgbase}.so
94 install -Dm0644 re.lua "${pkgdir}"/usr/share/lua/5.3/re.lua
95 install -Dm0644 ../LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE