libraries/lua-lpeg: install lpeg for all luas

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Ruben Schuller 2022-03-25 14:56:43 +01:00 committed by Willy Sudiarto Raharjo
parent b729384d47
commit e358da29c6
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
1 changed files with 9 additions and 3 deletions

View File

@ -77,9 +77,15 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
make
install -m 0755 -D lpeg.so $PKG/$(pkg-config --variable INSTALL_CMOD lua)/lpeg.so
install -m 0644 -D re.lua $PKG/$(pkg-config --variable INSTALL_LMOD lua)/re.lua
for v in "" "5.2" "5.3"; do
_pkgconfigv=$(echo $v | tr --delete .)
if pkg-config --exists lua$_pkgconfigv; then
make LUADIR=/usr/include/lua${v}/
install -m 0755 -D lpeg.so $PKG/$(pkg-config --variable INSTALL_CMOD lua$_pkgconfigv)/lpeg.so
install -m 0644 -D re.lua $PKG/$(pkg-config --variable INSTALL_LMOD lua$_pkgconfigv)/re.lua
make clean
fi
done
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true