summaryrefslogtreecommitdiffstats
path: root/misc/dvtm/dvtm.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'misc/dvtm/dvtm.SlackBuild')
-rw-r--r--misc/dvtm/dvtm.SlackBuild45
1 files changed, 36 insertions, 9 deletions
diff --git a/misc/dvtm/dvtm.SlackBuild b/misc/dvtm/dvtm.SlackBuild
index 5a37858326..3a6459d8cc 100644
--- a/misc/dvtm/dvtm.SlackBuild
+++ b/misc/dvtm/dvtm.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for "dvtm".
@@ -24,26 +24,38 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Modified by slackbuilds.org
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=dvtm
VERSION=${VERSION:-0.15}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
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}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -71,11 +83,25 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# Strip the slackware way
+sed "/@${STRIP} dvtm/d" Makefile
+
+# Fix terminfo
+sed -i "s|f22.*$|&,|" dvtm.info
+
CFLAGS="$SLKCFLAGS" \
LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \
make
-make install DESTDIR=$PKG PREFIX=/usr MANPREFIX=/usr/man
-# binaries are already stripped
+make install \
+ PREFIX=/usr \
+ MANPREFIX=/usr/man \
+ DESTDIR=$PKG
+
+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
+
+# install terminfo
+install -D -m 0644 dvtm.info $PKG/usr/share/dvtm/dvtm.info
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
@@ -88,6 +114,7 @@ for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; r
mkdir $PKG/install
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.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE