aboutsummaryrefslogtreecommitdiff
path: root/misc/uni2ascii/uni2ascii.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-09-04 15:00:13 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-09-07 09:08:49 +0700
commit90bfb515f575e2631f68783392b693f7b058d19c (patch)
tree5de0d5e6178be1124e76fdd2467cbb8f79f5698d /misc/uni2ascii/uni2ascii.SlackBuild
parent75c65730d31fd17f32f702d986628e5b532c3a6c (diff)
misc/uni2ascii: Updated for version 4.20, new maintainer.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'misc/uni2ascii/uni2ascii.SlackBuild')
-rw-r--r--misc/uni2ascii/uni2ascii.SlackBuild48
1 files changed, 20 insertions, 28 deletions
diff --git a/misc/uni2ascii/uni2ascii.SlackBuild b/misc/uni2ascii/uni2ascii.SlackBuild
index d862b634a9..d556d9c413 100644
--- a/misc/uni2ascii/uni2ascii.SlackBuild
+++ b/misc/uni2ascii/uni2ascii.SlackBuild
@@ -1,13 +1,22 @@
#!/bin/bash
# Slackware build script for uni2ascii
-# Written by Oleg O. Chukaev <oleg.chukaev@mail.ru>
+# Written by Oleg O. Chukaev
+# Modified and now maintained by B. Watson <urchlay@slackware.uk>
+
+# Original version of this script had no license. Modified version
+# licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# 20240904 bkw:
+# - new maintainer.
+# - updated for v4.20.
+# - license as WTFPL.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=uni2ascii
-VERSION=${VERSION:-4.18}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-4.20}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -19,9 +28,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# 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
@@ -33,16 +39,12 @@ 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
@@ -54,11 +56,8 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
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 \
- \( -perm 666 -o -perm 664 -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 {} +
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -68,20 +67,13 @@ CXXFLAGS="$SLKCFLAGS" \
--build=$ARCH-slackware-linux
make
-make install 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
-
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+make install-strip DESTDIR=$PKG
+gzip -9 $PKG/usr/man/man*/*
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a \
- AUTHORS COPYING CREDITS ChangeLog INSTALL NEWS README TODO \
- TestSuiteAscii2Uni \
- $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a AUTHORS COPYING CREDITS ChangeLog NEWS README TODO TestSuiteAscii2Uni $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc