diff options
Diffstat (limited to 'libraries/lua-posix/lua-posix.SlackBuild')
-rw-r--r-- | libraries/lua-posix/lua-posix.SlackBuild | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/libraries/lua-posix/lua-posix.SlackBuild b/libraries/lua-posix/lua-posix.SlackBuild index e7bf79dccb..4ce4222738 100644 --- a/libraries/lua-posix/lua-posix.SlackBuild +++ b/libraries/lua-posix/lua-posix.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for lua-posix # Copyright 2020 abooksigun <abooksigun09@gmail.com> @@ -21,11 +21,14 @@ # 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=lua-posix SRCNAM=luaposix VERSION=${VERSION:-35.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# 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} @@ -82,6 +92,10 @@ do fi done +if [ -e $PKG/usr/lib ] && [ ! -z "$LIBDIRSUFFIX" ]; then + mv $PKG/usr/lib $PKG/usr/lib$LIBDIRSUFFIX +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 @@ -94,4 +108,4 @@ 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:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |