lua-lpeg: add subpkg for Lua 5.1.
This commit is contained in:
parent
2efc131de5
commit
d628674e7b
2 changed files with 26 additions and 6 deletions
|
@ -1,9 +1,9 @@
|
|||
# Template file for 'lua-lpeg'
|
||||
pkgname=lua-lpeg
|
||||
version=1.0.0
|
||||
revision=3
|
||||
hostmakedepends="lua lua52"
|
||||
makedepends="lua-devel lua52-devel"
|
||||
revision=4
|
||||
hostmakedepends="lua lua51 lua52"
|
||||
makedepends="lua-devel lua51-devel lua52-devel"
|
||||
depends="lua>=5.3"
|
||||
_desc="Pattern-matching library for Lua based on Parsing Expression Grammars"
|
||||
short_desc="${_desc} (5.3.x)"
|
||||
|
@ -15,12 +15,17 @@ wrksrc="${pkgname#lua-}-${version}"
|
|||
checksum=10190ae758a22a16415429a9eb70344cf29cbda738a6962a9f94a732340abf8e
|
||||
|
||||
post_extract() {
|
||||
mkdir -p lua52
|
||||
mv * lua52 || true
|
||||
cp -a lua52 lua53
|
||||
mkdir -p lua51
|
||||
mv * lua51 || true
|
||||
cp -a lua51 lua52
|
||||
cp -a lua51 lua53
|
||||
}
|
||||
|
||||
do_build() {
|
||||
cd ${wrksrc}/lua51
|
||||
make CC=$CC DLLFLAGS="-I${XBPS_CROSS_BASE}/usr/include/lua5.1 -fPIC" \
|
||||
LUADIR="${XBPS_CROSS_BASE}/usr/include/lua5.1" ${makejobs}
|
||||
|
||||
cd ${wrksrc}/lua52
|
||||
make CC=$CC DLLFLAGS="-I${XBPS_CROSS_BASE}/usr/include/lua5.2 -fPIC" \
|
||||
LUADIR="${XBPS_CROSS_BASE}/usr/include/lua5.2" ${makejobs}
|
||||
|
@ -31,6 +36,10 @@ do_build() {
|
|||
}
|
||||
|
||||
do_install() {
|
||||
cd ${wrksrc}/lua51
|
||||
vinstall lpeg.so 755 usr/lib/lua/5.1/
|
||||
vinstall re.lua 644 usr/share/lua/5.1/
|
||||
|
||||
cd ${wrksrc}/lua52
|
||||
vinstall lpeg.so 755 usr/lib/lua/5.2/
|
||||
vinstall re.lua 644 usr/share/lua/5.2/
|
||||
|
@ -41,6 +50,16 @@ do_install() {
|
|||
vlicense lpeg.html
|
||||
}
|
||||
|
||||
lua51-lpeg_package() {
|
||||
depends="lua51"
|
||||
short_desc="${_desc} (5.1.x)"
|
||||
pkg_install() {
|
||||
vmove usr/lib/lua/5.1
|
||||
vmove usr/share/lua/5.1
|
||||
vlicense ${wrksrc}/lua52/lpeg.html
|
||||
}
|
||||
}
|
||||
|
||||
lua52-lpeg_package() {
|
||||
depends="lua52"
|
||||
short_desc="${_desc} (5.2.x)"
|
||||
|
|
1
srcpkgs/lua51-lpeg
Symbolic link
1
srcpkgs/lua51-lpeg
Symbolic link
|
@ -0,0 +1 @@
|
|||
lua-lpeg
|
Loading…
Reference in a new issue