aboutsummaryrefslogtreecommitdiff
path: root/system/rhash
diff options
context:
space:
mode:
authorСимон Болоканов <sbolokanov@abv.bg>2014-09-16 08:20:42 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-09-16 08:20:42 +0700
commit58f21d30bdacb8af2a9c1f0a893ff10c2a4828b4 (patch)
treee80421b21b84e57d41a0342e884b9b8851940598 /system/rhash
parentb5785fcfa514d661409c808f36d7b21b4ac518d2 (diff)
system/rhash: Added (verify hash).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/rhash')
-rw-r--r--system/rhash/README4
-rw-r--r--system/rhash/doinst.sh14
-rw-r--r--system/rhash/rhash.SlackBuild122
-rw-r--r--system/rhash/rhash.info10
-rw-r--r--system/rhash/slack-desc19
5 files changed, 169 insertions, 0 deletions
diff --git a/system/rhash/README b/system/rhash/README
new file mode 100644
index 0000000000000..e7cd41c96a3b9
--- /dev/null
+++ b/system/rhash/README
@@ -0,0 +1,4 @@
+RHash (Recursive Hasher) is a console utility for computing and verifying hash sums of files.
+Supports lots of algorithms.
+
+Note: If you do not want to build with OpenSSL support pass OPENSSL=no to the script.
diff --git a/system/rhash/doinst.sh b/system/rhash/doinst.sh
new file mode 100644
index 0000000000000..e6646ec82c97a
--- /dev/null
+++ b/system/rhash/doinst.sh
@@ -0,0 +1,14 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/rhashrc.new
diff --git a/system/rhash/rhash.SlackBuild b/system/rhash/rhash.SlackBuild
new file mode 100644
index 0000000000000..7fc13cf9ba9a0
--- /dev/null
+++ b/system/rhash/rhash.SlackBuild
@@ -0,0 +1,122 @@
+#!/bin/sh
+
+# Copyright (c) 2014, Симон Болоканов, Bulgaria <sbolokanov@abv.bg>
+# 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.
+
+# Written by: Симон Болоканов <sbolokanov@abv.bg>
+# Date: Unknown
+
+# Changelog:
+# v1.3.3 - Re-done the sript and send it to SBo
+
+PRGNAM=rhash
+VERSION=${VERSION:-1.3.3}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+# Shall we compile with OpenSSL support?
+OPENSSL=${OPENSSL:-yes}
+
+if [ "$OPENSSL" = "yes" ]; then
+ OPTCFLAGS="-DOPENSSL_RUNTIME -rdynamic"
+ OPTLDFLAGS="-ldl"
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -m32 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION-src.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 {} \;
+
+# -DUSE_GETTEXT = internationalization support
+make ADDCFLAGS="${SLKCFLAGS} -DUSE_GETTEXT ${OPTCFLAGS}" \
+ ADDLDFLAGS="${OPTLDFLAGS}" \
+ PREFIX=/usr \
+ MANDIR=/usr/man \
+ DESTDIR=$PKG \
+ install
+
+# Install libraries (static and shared)
+make ADDCFLAGS="${SLKCFLAGS} -DUSE_GETTEXT ${OPTCFLAGS}" \
+ ADDLDFLAGS="${OPTLDFLAGS}" \
+ PREFIX=/usr \
+ LIBDIR=/usr/lib${LIBDIRSUFFIX} \
+ DESTDIR=$PKG \
+ install-lib-shared
+
+# Install locales
+make PREFIX=/usr \
+ DESTDIR=$PKG \
+ compile-gmo install-gmo
+
+# Don't clobber the default config
+mv -v $PKG/etc/rhashrc $PKG/etc/rhashrc.new
+
+# Copy docs
+mkdir -pv $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a ChangeLog COPYING README INSTALL $PKG/usr/doc/$PRGNAM-$VERSION/
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+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 -pv $PKG/install
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/rhash/rhash.info b/system/rhash/rhash.info
new file mode 100644
index 0000000000000..0673a04919721
--- /dev/null
+++ b/system/rhash/rhash.info
@@ -0,0 +1,10 @@
+PRGNAM="rhash"
+VERSION="1.3.3"
+HOMEPAGE="http://rhash.anz.ru/?l=en"
+DOWNLOAD="http://downloads.sourceforge.net/rhash/rhash-1.3.3-src.tar.gz"
+MD5SUM="0e3c758b5e4b25e29e0094a33a9d2764"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Симон Болоканов"
+EMAIL="sbolokanov@abv.bg"
diff --git a/system/rhash/slack-desc b/system/rhash/slack-desc
new file mode 100644
index 0000000000000..767ca61ab3082
--- /dev/null
+++ b/system/rhash/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+rhash: rhash (Utility for verifying hash sums (SFV, CRC, etc))
+rhash:
+rhash: RHash (Recursive Hasher) is a console utility for computing and
+rhash: verifying hash sums of files. It supports CRC32, MD4, MD5, SHA1,
+rhash: SHA256, SHA512, Tiger, DC++ TTH, BitTorrent BTIH, ED2K, AICH,
+rhash: GOST R 34.11-94, RIPEMD-160, HAS-160, EDON-R 256/512, Whirlpool
+rhash: and Snefru-128/256 algorithms.
+rhash:
+rhash: Hash sums are used to ensure and verify integrity of large volumes
+rhash: of data for a long-term storing or transferring.
+rhash: