diff options
author | B. Watson <yalhcru@gmail.com> | 2021-08-26 12:54:47 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-10-13 00:51:44 +0700 |
commit | 678120d7259cd19f540d72c5e7c9e6443d6888da (patch) | |
tree | db98e5075a9d1b54c55457f230f797ce82e318f1 /system/fdclone/fdclone.SlackBuild | |
parent | 8cf6b5a018bc4ca7ca62146491915205916dcb34 (diff) |
system/fdclone: Convert .jp docs to UTF-8.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/fdclone/fdclone.SlackBuild')
-rw-r--r-- | system/fdclone/fdclone.SlackBuild | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/system/fdclone/fdclone.SlackBuild b/system/fdclone/fdclone.SlackBuild index 0a6bb1d824798..f4c9c95c9fc1e 100644 --- a/system/fdclone/fdclone.SlackBuild +++ b/system/fdclone/fdclone.SlackBuild @@ -11,12 +11,18 @@ # pages as "fdclone", not "fd", because SBo already has an "fd". I # also don't see the point of the stub fdsh man page. +# 20210826 bkw: BUILD=2 +# - include missing ToAdmin doc file +# - convert Japanese docs to UTF-8, since nothing on Slackware autodetects +# ISO-2002-JP (now you can read them with e.g. less). +# - hardcode built-in paths to less and vim (simpler code, and safer too) + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=fdclone SRCNAM=FD VERSION=${VERSION:-3.01j} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -28,9 +34,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 @@ -74,11 +77,8 @@ patch -p1 < $CWD/30_makefilein_setting.patch # Set the default pager & editor to things that actually exist on # Slackware. The user's EDITOR and PAGER will override these, or they # can be set system-wide by the admin, in the config file. -FDPAGER=${FDPAGER:-less} ; FDPAGER=$( which $FDPAGER ) -FDEDITOR=${FDEDITOR:-vim} ; FDEDITOR=$( which $FDEDITOR ) - -sed -i -e "s,/usr/bin/pager,$FDPAGER," \ - -e "s,/usr/bin/editor,$FDEDITOR," \ +sed -i -e "s,/usr/bin/pager,/usr/bin/less," \ + -e "s,/usr/bin/editor,/usr/bin/vi," \ fd.h make config @@ -120,9 +120,16 @@ cat $CWD/fd2rc > $PKG/etc/$PRGNAM/fd2rc echo "# fd2rc.siteconfig - see fd2rc for options you can use here" > \ $PKG/etc/$PRGNAM/fd2rc.siteconfig.new -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a FAQ* HISTORY* LICENSES* README* TECHKNOW* $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 + +# Convert the Japanese-language docs to UTF-8 encoding. +for i in FAQ HISTORY LICENSES README TECHKNOW ToAdmin; do + iconv -f ISO-2022-JP -t UTF-8 $i > $PKGDOC/$i + cp -a $i.eng $PKGDOC/$i.eng +done + +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc |