aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/sash/doinst.sh2
-rw-r--r--system/sash/patches/sash-3.7-DESTDIR.patch (renamed from system/sash/sash-3.7-DESTDIR.patch)0
-rw-r--r--system/sash/patches/sash-3.7-cmd_chattr.c.patch (renamed from system/sash/sash-3.7-cmd_chattr.c.patch)0
-rw-r--r--system/sash/patches/sash-plus-patches-3.7 (renamed from system/sash/sash-plus-patches-3.7)0
-rw-r--r--system/sash/sash-3.7-CFLAGS_i486.patch12
-rw-r--r--system/sash/sash-3.7-CFLAGS_i686.patch12
-rw-r--r--system/sash/sash.SlackBuild56
-rw-r--r--system/sash/sash.info4
8 files changed, 37 insertions, 49 deletions
diff --git a/system/sash/doinst.sh b/system/sash/doinst.sh
index e5dccd90cc02..04f7d604cd9e 100644
--- a/system/sash/doinst.sh
+++ b/system/sash/doinst.sh
@@ -1,5 +1,3 @@
-#!/bin/sh
-
# Add sash to the shells if not there
if ! grep -q "/sash$" etc/shells ; then
echo "/bin/sash" >> etc/shells
diff --git a/system/sash/sash-3.7-DESTDIR.patch b/system/sash/patches/sash-3.7-DESTDIR.patch
index ff9b438f2088..ff9b438f2088 100644
--- a/system/sash/sash-3.7-DESTDIR.patch
+++ b/system/sash/patches/sash-3.7-DESTDIR.patch
diff --git a/system/sash/sash-3.7-cmd_chattr.c.patch b/system/sash/patches/sash-3.7-cmd_chattr.c.patch
index 11ee50933813..11ee50933813 100644
--- a/system/sash/sash-3.7-cmd_chattr.c.patch
+++ b/system/sash/patches/sash-3.7-cmd_chattr.c.patch
diff --git a/system/sash/sash-plus-patches-3.7 b/system/sash/patches/sash-plus-patches-3.7
index 77d17df90cc7..77d17df90cc7 100644
--- a/system/sash/sash-plus-patches-3.7
+++ b/system/sash/patches/sash-plus-patches-3.7
diff --git a/system/sash/sash-3.7-CFLAGS_i486.patch b/system/sash/sash-3.7-CFLAGS_i486.patch
deleted file mode 100644
index 2d4b14ee3566..000000000000
--- a/system/sash/sash-3.7-CFLAGS_i486.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Nur sash-3.7.orig/Makefile sash-3.7/Makefile
---- sash-3.7.orig/Makefile 2002-07-21 18:24:47.000000000 -0500
-+++ sash-3.7/Makefile 2007-08-22 15:56:15.225837097 -0500
-@@ -14,7 +14,7 @@
- MOUNT_TYPE = '"ext3"'
-
-
--CFLAGS = -O3 -Wall -Wmissing-prototypes \
-+CFLAGS = -O2 -march=i486 -mtune=i686 -Wall -Wmissing-prototypes \
- -DHAVE_GZIP=$(HAVE_GZIP) \
- -DHAVE_LINUX_ATTR=$(HAVE_LINUX_ATTR) \
- -DHAVE_LINUX_MOUNT=$(HAVE_LINUX_MOUNT) \
diff --git a/system/sash/sash-3.7-CFLAGS_i686.patch b/system/sash/sash-3.7-CFLAGS_i686.patch
deleted file mode 100644
index 423718f372fe..000000000000
--- a/system/sash/sash-3.7-CFLAGS_i686.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Nur sash-3.7.orig/Makefile sash-3.7/Makefile
---- sash-3.7.orig/Makefile 2002-07-21 18:24:47.000000000 -0500
-+++ sash-3.7/Makefile 2007-08-22 15:56:15.225837097 -0500
-@@ -14,7 +14,7 @@
- MOUNT_TYPE = '"ext3"'
-
-
--CFLAGS = -O3 -Wall -Wmissing-prototypes \
-+CFLAGS = -O2 -march=i686 -mtune=i686 -Wall -Wmissing-prototypes \
- -DHAVE_GZIP=$(HAVE_GZIP) \
- -DHAVE_LINUX_ATTR=$(HAVE_LINUX_ATTR) \
- -DHAVE_LINUX_MOUNT=$(HAVE_LINUX_MOUNT) \
diff --git a/system/sash/sash.SlackBuild b/system/sash/sash.SlackBuild
index 64acbb690d60..6b3941eb27bc 100644
--- a/system/sash/sash.SlackBuild
+++ b/system/sash/sash.SlackBuild
@@ -2,67 +2,79 @@
# Slackware build script for the stand alone shell (sash)
-# Written by Menno E. Duursma <druiloor@zonnet.nl>
+# Written by Menno Duursma <druiloor@zonnet.nl>
# Modified by Robby Workman of the SlackBuilds.org project
-# Exit on most errors
-set -e
+# This program is free software. It comes without any warranty.
+# Granted WTFPL, Version 2, as published by Sam Hocevar. See
+# http://sam.zoy.org/wtfpl/COPYING for more details.
PRGNAM=sash
-VERSION=3.7
+VERSION=${VERSION:-3.7}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+fi
+
+set -e # Exit on most errors
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-# The 'sash-plus-patches' patch adds support for _very_ usefull features
-# like env var expention and the 'chroot' command:
+# The 'sash-plus-patches' patch adds support for _very_ useful features
+# like env var expansion and the 'chroot' command:
# http://www.baiti.net/sash/
-patch -p1 --verbose < $CWD/sash-plus-patches-3.7
+patch -p1 --verbose < $CWD/patches/sash-plus-patches-3.7
# Apply the appropriate CFLAGS to the Makefile
-if [ "$ARCH" = "i486" ]; then
- patch -p1 --verbose < $CWD/sash-3.7-CFLAGS_i486.patch
-elif [ "$ARCH" = "i686" ]; then
- patch -p1 --verbose < $CWD/sash-3.7-CFLAGS_i686.patch
-fi
+sed -i "s/^CFLAGS = -O3/CFLAGS = $SLKCFLAGS/" Makefile
# Let's make this thing support DESTDIR
-patch -p1 --verbose < $CWD/sash-3.7-DESTDIR.patch
+patch -p1 --verbose < $CWD/patches/sash-3.7-DESTDIR.patch
# Fix an include line in cmd_chattr.c
-patch -p1 --verbose < $CWD/sash-3.7-cmd_chattr.c.patch
+patch -p1 --verbose < $CWD/patches/sash-3.7-cmd_chattr.c.patch
# Create target dirs
-mkdir -p $PKG/bin
-mkdir -p $PKG/usr/man/man1
+mkdir -p $PKG/bin $PKG/usr/man/man1
-# Compile the application and install it into the $PKG directory
make
make install DESTDIR=$PKG
( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
)
( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \;
- for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
+ for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
)
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a CHANGES README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -72,4 +84,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/sash/sash.info b/system/sash/sash.info
index 92927e796e8d..d098f8783d21 100644
--- a/system/sash/sash.info
+++ b/system/sash/sash.info
@@ -3,6 +3,8 @@ VERSION="3.7"
HOMEPAGE="http://members.canb.auug.org.au/~dbell/programs/"
DOWNLOAD="http://members.canb.auug.org.au/~dbell/programs/sash-3.7.tar.gz"
MD5SUM="ee7c7ed5aad76599974d016a6f201ef4"
-MAINTAINER="Menno E. Duursma"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Menno Duursma"
EMAIL="druiloor@zonnet.nl"
APPROVED="rworkman"