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>
This commit is contained in:
B. Watson 2024-09-04 15:00:13 -04:00 committed by Willy Sudiarto Raharjo
parent 75c65730d3
commit 90bfb515f5
No known key found for this signature in database
GPG key ID: 3F617144D7238786
3 changed files with 27 additions and 33 deletions

View file

@ -1,3 +1,5 @@
uni2ascii (convert UTF-8 into 7-bit ASCII and vice versa)
uni2ascii provides conversion in both directions between UTF-8 Unicode
and more than thirty 7-bit ASCII equivalents, including HTML numeric
character references, various escapes and hexadecimal. Such ASCII

View file

@ -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
make install-strip DESTDIR=$PKG
gzip -9 $PKG/usr/man/man*/*
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
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

View file

@ -1,10 +1,10 @@
PRGNAM="uni2ascii"
VERSION="4.18"
VERSION="4.20"
HOMEPAGE="http://billposer.org/Software/uni2ascii.html"
DOWNLOAD="http://billposer.org/Software/Downloads/uni2ascii-4.18.tar.bz2"
MD5SUM="a1b1df74cccd1fa997bad79c8c4ced68"
DOWNLOAD="http://billposer.org/Software/Downloads/uni2ascii-4.20.tar.bz2"
MD5SUM="db8c907d6b2c1d71a465cfd4d0f7b4ab"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="Oleg O. Chukaev"
EMAIL="oleg.chukaev@mail.ru"
MAINTAINER="B. Watson"
EMAIL="urchlay@slackware.uk"