diff options
Diffstat (limited to 'libraries/lua-std._debug/lua-std._debug.SlackBuild')
-rw-r--r-- | libraries/lua-std._debug/lua-std._debug.SlackBuild | 62 |
1 files changed, 16 insertions, 46 deletions
diff --git a/libraries/lua-std._debug/lua-std._debug.SlackBuild b/libraries/lua-std._debug/lua-std._debug.SlackBuild index 9a93738e1a..2653e27eb5 100644 --- a/libraries/lua-std._debug/lua-std._debug.SlackBuild +++ b/libraries/lua-std._debug/lua-std._debug.SlackBuild @@ -21,26 +21,20 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20241022 bkw: Modified by SlackBuilds.org, BUILD=2: +# - make noarch. +# - support new lua (5.4) and lua51. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=lua-std._debug SRCNAM=_debug VERSION=${VERSION:-1.0.1} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} +ARCH=noarch -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) ARCH=i586 ;; - arm*) ARCH=arm ;; - *) ARCH=$( uname -m ) ;; - esac -fi - -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -50,20 +44,6 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -fi - set -e rm -rf $PKG @@ -73,26 +53,16 @@ rm -rf $PRGNAM-$VERSION 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 \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; - -install -D -m 0644 -t $PKG/usr/share/lua/5.1/std/$SRCNAM lib/std/$SRCNAM/*.lua - -# lua 5.2 support. -if $(lua5.2 -v &> /dev/null); then - install -D -m 0644 -t $PKG/usr/share/lua/5.2/std/$SRCNAM lib/std/$SRCNAM/*.lua -fi - -# lua 5.3 support -if $(lua5.3 -v &> /dev/null); then - install -D -m 0644 -t $PKG/usr/share/lua/5.3/std/$SRCNAM lib/std/$SRCNAM/*.lua -fi - -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 +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + + +for i in lua lua51; do + if pkg-config --exists $i; then + install -D -m 0644 \ + -t $PKG/$( pkg-config $i --variable INSTALL_LMOD )/std/$SRCNAM \ + lib/std/$SRCNAM/*.lua + fi +done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -t $PKG/usr/doc/$PRGNAM-$VERSION doc/* AUTHORS.md LICENSE.md NEWS.md README.md |