aboutsummaryrefslogtreecommitdiff
path: root/libraries/lua-lpeg
diff options
context:
space:
mode:
authorRuben Schuller <code@rbn.im>2022-03-25 14:56:43 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-03-26 01:20:20 +0700
commite358da29c68af57d4e337b4164d2ae2167f97e3b (patch)
tree496affef36108f180c1cd9c16ecf72486fccd155 /libraries/lua-lpeg
parentb729384d471cd807d2119cfa9464d5c35a46075f (diff)
libraries/lua-lpeg: install lpeg for all luas
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/lua-lpeg')
-rw-r--r--libraries/lua-lpeg/lua-lpeg.SlackBuild12
1 files changed, 9 insertions, 3 deletions
diff --git a/libraries/lua-lpeg/lua-lpeg.SlackBuild b/libraries/lua-lpeg/lua-lpeg.SlackBuild
index f6bb9030e0407..14d9a9d1e1608 100644
--- a/libraries/lua-lpeg/lua-lpeg.SlackBuild
+++ b/libraries/lua-lpeg/lua-lpeg.SlackBuild
@@ -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