Files
haikuports/app-crypt/rhash/rhash-1.4.6.recipe
2026-01-25 07:22:18 +01:00

104 lines
2.8 KiB
Bash

SUMMARY="Utility for verifying hash sums of files"
DESCRIPTION="RHash (Recursive Hasher) is a console utility for computing and \
verifying hash sums of files. It supports CRC32, MD4, MD5, SHA1, SHA256, \
SHA512, Tiger, DC++ TTH, BitTorrent BTIH, ED2K, AICH, GOST R 34.11-94, \
RIPEMD-160, HAS-160, EDON-R 256/512, Whirlpool and Snefru-128/256 algorithms.
Hash sums are used to ensure and verify integrity of large volumes of data for \
a long-term storing or transferring."
HOMEPAGE="https://github.com/rhash/RHash"
COPYRIGHT="2005 Aleksey Kravchenko"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://github.com/rhash/RHash/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="9f6019cfeeae8ace7067ad22da4e4f857bb2cfa6c2deaa2258f55b2227ec937a"
SOURCE_DIR="RHash-$portVersion"
PATCHES="rhash-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
GLOBAL_WRITABLE_FILES="
settings/rhashrc keep-old
"
USER_SETTINGS_FILES="
settings/rhashrc
"
PROVIDES="
rhash$secondaryArchSuffix = $portVersion
cmd:ed2k_link$commandSuffix = $portVersion
cmd:edonr256_hash$commandSuffix = $portVersion
cmd:edonr512_hash$commandSuffix = $portVersion
cmd:gost_hash$commandSuffix = $portVersion
cmd:gost12_256_hash$commandSuffix = $portVersion
cmd:gost12_512_hash$commandSuffix = $portVersion
cmd:has160_hash$commandSuffix = $portVersion
cmd:magnet_link$commandSuffix = $portVersion
cmd:rhash$commandSuffix = $portVersion
cmd:sfv_hash$commandSuffix = $portVersion
cmd:tiger_hash$commandSuffix = $portVersion
cmd:tth_hash$commandSuffix = $portVersion
cmd:whirlpool_hash$commandSuffix = $portVersion
lib:librhash$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
rhash${secondaryArchSuffix}_devel = $portVersion
devel:librhash$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
haiku${secondaryArchSuffix}_devel
rhash$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:sed
"
BUILD()
{
INSTALL_INCDIR="$includeDir" \
./configure --prefix="$prefix" --bindir="$commandBinDir" \
--libdir="$libDir" --localedir="$dataDir"/locale --mandir="$manDir" \
--sysconfdir="$sysconfDir"
make $jobArgs
}
INSTALL()
{
make install install-pkg-config
make -C librhash install-lib-headers install-lib-shared install-so-link
prepareInstalledDevelLib librhash
fixPkgconfig
packageEntries devel \
"$developDir"
}
TEST()
{
cd tests
LIBRARY_PATH="$sourceDir/librhash${LIBRARY_PATH:+:$LIBRARY_PATH}" \
./test_rhash.sh --full ../rhash
}