summaryrefslogtreecommitdiffstats
path: root/development/ex-vi/ex-vi.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/ex-vi/ex-vi.SlackBuild')
-rw-r--r--development/ex-vi/ex-vi.SlackBuild45
1 files changed, 26 insertions, 19 deletions
diff --git a/development/ex-vi/ex-vi.SlackBuild b/development/ex-vi/ex-vi.SlackBuild
index af648e2207..cab4116d11 100644
--- a/development/ex-vi/ex-vi.SlackBuild
+++ b/development/ex-vi/ex-vi.SlackBuild
@@ -1,11 +1,13 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for ex-vi
-# Written by B. Watson (yalhcru@gmail.com)
+# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20210830 bkw: build 4, -j1 no longer needed on -current.
+
# 20160726 bkw: build 3
# parallel make (-jN where N > 1) fails on Slack 14.2, add -j1
@@ -22,18 +24,13 @@
# mode. Exceeding TUBELINES just means vi ignores the extra lines at the
# bottom of the terminal.
-# Default to 320x200, which would be enough for a 8x16 console font on a
-# WQXGA 2560x1600 display, or a 2/3-width full-height X terminal on 4K
-# UHDTV (3840x2160). If I don't make this configurable, someone will
-# need it to be. So:
-TUBECOLS=${TUBECOLS:-320}
-TUBELINES=${TUBELINES:-200}
+cd $(dirname $0) ; CWD=$(pwd)
-# We now return you to your regularly scheduled programming:
PRGNAM=ex-vi
VERSION=${VERSION:-050325}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-4}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -43,7 +40,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+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}
@@ -64,6 +65,15 @@ fi
set -e
+# Default to 320x200, which would be enough for a 8x16 console font on a
+# WQXGA 2560x1600 display, or a 2/3-width full-height X terminal on 4K
+# UHDTV (3840x2160). If I don't make this configurable, someone will
+# need it to be. So:
+TUBECOLS=${TUBECOLS:-320}
+TUBELINES=${TUBELINES:-200}
+
+# We now return you to your regularly scheduled programming:
+
TARNAME=ex
rm -rf $PKG
@@ -73,11 +83,8 @@ rm -rf $TARNAME-$VERSION
tar xvf $CWD/$TARNAME-$VERSION.tar.bz2
cd $TARNAME-$VERSION
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 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
# Don't install the binary with the sticky bit set. It doesn't do anything
# on Linux, and might set off alarm bells.
@@ -91,8 +98,8 @@ sed -i -e "/^#define/s,\\(TUBESIZE *\\).*$,\\1 $(( TUBECOLS * TUBELINES ))," \
# To avoid conflicts with Slackware's elvis and/or vim, we install to /opt and
# include a login script to set PATH and MANPATH.
-make -j1 all install \
- CC="gcc $SLKCFLAGS" \
+make all install \
+ RPMCFLAGS="$SLKCFLAGS" \
MANDIR=/opt/$PRGNAM/man \
PREFIX=/opt/$PRGNAM \
INSTALL=install \
@@ -117,4 +124,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.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE