libraries/lua-lpeg: Script clean up.

Signed-off-by: Benjamin Trigona-Harany <bosth@alumni.sfu.ca>
This commit is contained in:
Benjamin Trigona-Harany 2018-03-17 21:46:53 -07:00 committed by Willy Sudiarto Raharjo
parent 8381fae178
commit b8a07a9b0a

View file

@ -2,7 +2,7 @@
# SlackBuild script for lua-lpeg
# Copyright 2014 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# Copyright 2014-2018 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@ -57,20 +57,18 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.?z* || tar xvf $CWD/v$VERSION.tar.?z*
tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
make
# Manual install
install -m 0755 -D lpeg.so $PKG/usr/lib$LIBDIRSUFFIX/lua/5.1/lpeg.so
install -m 0644 -D re.lua $PKG/usr/share/lua/5.1/re.lua
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
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