aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/hashID/README5
-rw-r--r--system/hashID/hashID.SlackBuild107
-rw-r--r--system/hashID/hashID.info4
-rw-r--r--system/hashID/slack-desc2
4 files changed, 49 insertions, 69 deletions
diff --git a/system/hashID/README b/system/hashID/README
index 90691ad2ae..c32610ecee 100644
--- a/system/hashID/README
+++ b/system/hashID/README
@@ -1,4 +1,7 @@
-hashID
+hashID (hash identifier)
Identify the different types of hashes used to encrypt data
and especially passwords.
+
+Note that the man page and executable are called "hashid" (all
+lowercase), despite the package name being "hashID".
diff --git a/system/hashID/hashID.SlackBuild b/system/hashID/hashID.SlackBuild
index 46cede1e9b..7e19d6ec4a 100644
--- a/system/hashID/hashID.SlackBuild
+++ b/system/hashID/hashID.SlackBuild
@@ -2,45 +2,30 @@
# Slackware build script for hashID
-# Copyright 2017 Andre Fernando, Indonesia
-# All rights reserved.
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Original author: Andre Fernando, Indonesia.
+# Modified and now maintained by B. Watson (urchlay@slackware.uk).
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# 20250929 bkw: BUILD=2
+# - take over maintenance.
+# - install the man page to /usr/man, not /usr/doc.
+# - also, make it a section 1 man page.
+# - ARCH=noarch.
+# - simplify script.
+# - name executable correctly; compatibility symlinks for the old
+# name (which seems to have been made up from thin air).
+# - get setup.py, setup.cfg out of the package. not used.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=hashID
VERSION=${VERSION:-3.1.4}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
+ARCH=noarch
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) ARCH=i586 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
- 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
@@ -50,20 +35,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
@@ -73,26 +44,32 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
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 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-
-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
-
-mkdir -p $PKG/usr/bin
-install -D -m 0775 hashid.py $PKG/usr/bin/hash-identifier
-
-mkdir -p $PKG/usr/share/$PRGNAM-$VERSION
-cp -a setup.py setup.cfg $PKG/usr/share/$PRGNAM-$VERSION
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a doc/* $PKG/usr/doc/$PRGNAM-$VERSION
-
-cp -a README.rst $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
+
+EXE=hashid
+OLDEXE=hash-identifier
+PKGBIN=$PKG/usr/bin
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+PKGMAN=$PKG/usr/man/man1
+PKGSHARE=$PKG/usr/share/$PRGNAM-$VERSION
+
+mkdir -p $PKGBIN $PKGDOC $PKGMAN $PKGSHARE
+install -oroot -groot -m0775 hashid.py $PKGBIN/$EXE
+cp -a setup.py setup.cfg $PKGSHARE
+
+sed '/^\.TH/s,7,1,' doc/man/h*.7 | gzip -9c > $PKGMAN/$EXE.1.gz
+
+# 20250930 bkw: compatibility links for the old name from the
+# previous maintainer of this build. No idea why he installed it as
+# hash-identifier. The Debian package has it as hashid, the upstream
+# name is hashid.py, and the man page is named hashid. I'm including
+# the old name in case anyone wrote scripts that use it.
+ln -s $EXE $PKGBIN/$OLDEXE
+ln -s $EXE.1.gz $PKGMAN/$OLDEXE.1.gz
+
+cp -a README* doc/{CHANGE*,LIC*,hashinfo.*} $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/system/hashID/hashID.info b/system/hashID/hashID.info
index 353c38fa0f..2f8e4ee244 100644
--- a/system/hashID/hashID.info
+++ b/system/hashID/hashID.info
@@ -6,5 +6,5 @@ MD5SUM="afc2329679c9d3564b8f2663e7917637"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="Andre Fernando"
-EMAIL="ando344@gmail.com"
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"
diff --git a/system/hashID/slack-desc b/system/hashID/slack-desc
index 10bc928468..f1998c1e19 100644
--- a/system/hashID/slack-desc
+++ b/system/hashID/slack-desc
@@ -6,7 +6,7 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-hashID: hashID (hash-identifier)
+hashID: hashID (hash identifier)
hashID:
hashID: Software to identify the different types of hashes used to encrypt
hashID: data and especially passwords.