summaryrefslogtreecommitdiff
path: root/libraries/luasocket/luasocket.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/luasocket/luasocket.SlackBuild')
-rw-r--r--libraries/luasocket/luasocket.SlackBuild47
1 files changed, 22 insertions, 25 deletions
diff --git a/libraries/luasocket/luasocket.SlackBuild b/libraries/luasocket/luasocket.SlackBuild
index 9095db6e73..230c379f7c 100644
--- a/libraries/luasocket/luasocket.SlackBuild
+++ b/libraries/luasocket/luasocket.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for luasocket
-# Copyright 2013, Andrew Tkalia <anddt@yandex.ru>, Ukraine, Kyiv
+# Copyright 2013-2014, Andrew Tkalia <anddt@yandex.ua>, Ukraine, Kyiv
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +23,8 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=luasocket
-VERSION=${VERSION:-2.0.2}
+HASH=${HASH:-6d5e40c324c84d9c1453ae88e0ad5bdd0a631448}
+VERSION=20130909_$(echo $HASH |cut -c -7)
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -41,16 +42,16 @@ PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ SLKCFLAGS=" -O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ SLKCFLAGS=" -O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
+ SLKCFLAGS=" -O2"
LIBDIRSUFFIX="64"
else
- SLKCFLAGS="-O2"
+ SLKCFLAGS=" -O2"
LIBDIRSUFFIX=""
fi
@@ -59,37 +60,33 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-mkdir $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
+rm -rf $PRGNAM-$HASH
+tar xvf $CWD/$HASH.tar.gz
+cd $PRGNAM-$HASH
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 {} \;
+ \( -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 {} \;
-_CFLAGS="`cat config |grep ^CFLAGS |sed "s,CFLAGS\=,,g"`"" ${SLKCFLAGS}"
-make \
- INSTALL_TOP_SHARE="/usr/share/lua/5.1" \
- INSTALL_TOP_LIB="/usr/lib${LIBDIRSUFFIX}/lua/5.1" \
- CFLAGS=" $_CFLAGS"
+make PLAT=linux LUAV=5.1 prefix=/usr MYCFLAGS="$SLKCFLAGS"
# Installing:
-make install \
- INSTALL_TOP_SHARE="$PKG/usr/share/lua/5.1" \
- INSTALL_TOP_LIB="$PKG/usr/lib${LIBDIRSUFFIX}/lua/5.1" \
+make install CDIR_linux="lib${LIBDIRSUFFIX}/lua/5.1" DESTDIR=$PKG prefix=/usr
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
-cp -a \
- doc/*.* README LICENSE NEW samples etc test \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a doc/*.* FIX LICENSE NEW README $PKG/usr/doc/$PRGNAM-$VERSION
+ for i in samples etc test ; do
+ tar zcvf $PKG/usr/doc/$PRGNAM-$VERSION/$i.tar.gz $i
+ done
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+rm $PKG/usr/doc/$PRGNAM-$VERSION/*.ppt
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc