system/tm: Make noarch, fix zsh completion.

Signed-off-by: B. Watson <yalhcru@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2022-02-12 03:57:46 -05:00 committed by Willy Sudiarto Raharjo
parent 4fcccfc52c
commit ece03ce789
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 19 additions and 34 deletions

View file

@ -23,25 +23,21 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 20220212 bkw: Modified by SlackBuilds.org, BUILD=2:
# - mirror the source (original site is gone).
# - make this noarch, since it's just a shell script.
# - install the zsh completion in the right place.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=tm
VERSION=${VERSION:-20180206}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
ARCH=noarch
# 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
@ -51,20 +47,6 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
@ -76,20 +58,23 @@ cd $PRGNAM-$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 \
-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 {} \;
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
mkdir -p $PKG/usr/bin
cp -a tm $PKG/usr/bin/
ZSHVER="$( zsh --version | cut -d' ' -f2 )"
if [ -n "$ZSHVER" ]; then
mkdir -p $PKG/usr/share/zsh/$ZSHVER/functions
cp -a _tm $PKG/usr/share/zsh/$ZSHVER/functions
fi
# Include the doc files
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a examples LICENSE README.org $PKG/usr/doc/$PRGNAM-$VERSION/
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
# Include the bin files
mkdir -p $PKG/usr/bin
cp -a _tm tm $PKG/usr/bin/
# Include the slackbuild files
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

View file

@ -1,7 +1,7 @@
PRGNAM="tm"
VERSION="20180206"
HOMEPAGE="https://blog.ganneff.de/2013/03/tmux-like-screen-just-nicer.html"
DOWNLOAD="https://www.go4it2day.com/downloads/tm-20180206.tar.gz"
DOWNLOAD="https://slackware.uk/~urchlay/src/tm-20180206.tar.gz"
MD5SUM="87c45bcb4e91dbc793c225aec34f128d"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""