aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLockywolf <for_sbo.lua53-filesystem_2023-06-04@lockywolf.net>2023-06-09 21:51:24 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-06-10 14:01:21 +0700
commit5c7a0d2119d82e3cd34251e2854b82435729530d (patch)
treec607b86a589dc08e941c09050b5aa3753b4f52fa
parent800820d094a97f21ebfee82331fcda73ad83c062 (diff)
libraries/lua53-filesystem: Added (lua filesystem library)
Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--libraries/lua53-filesystem/README5
-rw-r--r--libraries/lua53-filesystem/lua53-filesystem.SlackBuild107
-rw-r--r--libraries/lua53-filesystem/lua53-filesystem.info10
-rw-r--r--libraries/lua53-filesystem/slack-desc19
4 files changed, 141 insertions, 0 deletions
diff --git a/libraries/lua53-filesystem/README b/libraries/lua53-filesystem/README
new file mode 100644
index 0000000000000..351268cd98dfb
--- /dev/null
+++ b/libraries/lua53-filesystem/README
@@ -0,0 +1,5 @@
+LuaFileSystem is a Lua library developed to complement the set
+of functions related to filesystems offered by the standard
+Lua distribution.
+LuaFileSystem offers a portable way to access the underlying
+directory structure and file attributes.
diff --git a/libraries/lua53-filesystem/lua53-filesystem.SlackBuild b/libraries/lua53-filesystem/lua53-filesystem.SlackBuild
new file mode 100644
index 0000000000000..c807cbdadfc93
--- /dev/null
+++ b/libraries/lua53-filesystem/lua53-filesystem.SlackBuild
@@ -0,0 +1,107 @@
+#!/bin/bash
+
+# Slackware build script for lua53-filesystem
+
+# Copyright 2023, Lockywolf
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=lua53-filesystem
+SRCNAM=luafilesystem
+VERSION=${VERSION:-1.6.3}
+SRCVER=v_$(echo $VERSION | tr . _)
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+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
+fi
+
+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
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM-$SRCVER
+tar xvf $CWD/$SRCNAM-$SRCVER.tar.?z* || tar xvf $CWD/$SRCVER.tar.?z*
+cd $SRCNAM-$SRCVER
+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 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+sed -i \
+ -e "s|/usr/local|/usr|" \
+ -e "s|/lib|/lib$LIBDIRSUFFIX|" \
+ -e "s|-O2 -Wall -fPIC|$SLKCFLAGS -Wall|" \
+ -e 's/5\.1/5.3/g' \
+ -e 's|LUA_INC= $(PREFIX)/include|LUA_INC= $(PREFIX)/include/lua5.3|g' \
+ config || exit 1
+make
+install -m 0755 -D src/lfs.so $PKG/usr/lib$LIBDIRSUFFIX/lua/5.3/lfs.so
+install -m 0644 -D src/lfs.h $PKG/usr/include/lua5.3/lfs.h
+
+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
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/html
+cp -a README $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a doc/us/* $PKG/usr/doc/$PRGNAM-$VERSION/html/
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/libraries/lua53-filesystem/lua53-filesystem.info b/libraries/lua53-filesystem/lua53-filesystem.info
new file mode 100644
index 0000000000000..7370c7ea0d642
--- /dev/null
+++ b/libraries/lua53-filesystem/lua53-filesystem.info
@@ -0,0 +1,10 @@
+PRGNAM="lua53-filesystem"
+VERSION="1.6.3"
+HOMEPAGE="http://keplerproject.github.com/luafilesystem/"
+DOWNLOAD="https://github.com/keplerproject/luafilesystem/archive/v_1_6_3/luafilesystem-v_1_6_3.tar.gz"
+MD5SUM="d0552c7e5a082f5bb2865af63fb9dc95"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="lua53"
+MAINTAINER="Lockywolf"
+EMAIL="for_sbo.lua53-filesystem_2023-06-04@lockywolf.net"
diff --git a/libraries/lua53-filesystem/slack-desc b/libraries/lua53-filesystem/slack-desc
new file mode 100644
index 0000000000000..2515a1d265cfd
--- /dev/null
+++ b/libraries/lua53-filesystem/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+lua53-filesystem: lua53-filesystem (lua filesystem library)
+lua53-filesystem:
+lua53-filesystem: LuaFileSystem is a Lua library developed to complement the set
+lua53-filesystem: of functions related to filesystems offered by the standard
+lua53-filesystem: Lua distribution.
+lua53-filesystem: LuaFileSystem offers a portable way to access the underlying
+lua53-filesystem: directory structure and file attributes.
+lua53-filesystem:
+lua53-filesystem: This version is for lua5.3 and should co-exist with the one for 5.1
+lua53-filesystem: pkg-config file is not installed. If anybody needs it, contact
+lua53-filesystem: the maintainer.