forked from pool/rhash
138 lines
4.3 KiB
RPMSpec
138 lines
4.3 KiB
RPMSpec
|
#
|
||
|
# spec file for package rhash
|
||
|
#
|
||
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||
|
#
|
||
|
# All modifications and additions to the file contributed by third parties
|
||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||
|
# upon. The license for this file, and modifications and additions to the
|
||
|
# file, is the same license as for the pristine package itself (unless the
|
||
|
# license for the pristine package is not an Open Source License, in which
|
||
|
# case the license is the MIT License). An "Open Source License" is a
|
||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||
|
# published by the Open Source Initiative.
|
||
|
|
||
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||
|
#
|
||
|
|
||
|
|
||
|
%define major 0
|
||
|
Name: rhash
|
||
|
Version: 1.3.4
|
||
|
Release: 0
|
||
|
Summary: Recursive Hasher
|
||
|
License: MIT
|
||
|
Group: Productivity/File utilities
|
||
|
Url: http://rhash.anz.ru/?l=en
|
||
|
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}-src.tar.gz
|
||
|
Source1: baselibs.conf
|
||
|
# PATCH-FIX-OPENSUSE rhash-1.3.0-shared.patch lazy.kent@opensuse.org -- install development files with shared library
|
||
|
Patch0: rhash-1.3.0-shared.patch
|
||
|
BuildRequires: pkgconfig
|
||
|
BuildRequires: pkgconfig(libcrypto)
|
||
|
Recommends: %{name}-lang
|
||
|
|
||
|
%description
|
||
|
RHash (Recurcive Hasher) is a console utility for computing and
|
||
|
verifying magnet links and hash sums of files.
|
||
|
It supports CRC32, MD4, MD5, SHA1/SHA2, Tiger, DC++ TTH, BitTorrent
|
||
|
BTIH, AICH, eDonkey hash, GOST R 34.11-94, RIPEMD-160, HAS-160, EDON-R,
|
||
|
Whirlpool and Snefru hash algorithms. Hash sums are used to ensure and
|
||
|
verify integrity of large volumes of data for a long-term storing or
|
||
|
transferring.
|
||
|
|
||
|
Program features:
|
||
|
* Calculation of Magnet links and EDonkey 2000 links.
|
||
|
* Output in a predefined (SFV, BSD-like) or a user-defined format.
|
||
|
* Updating crc files (adding hash sums of files missing in the crc
|
||
|
file).
|
||
|
* Ability to process directories recursively.
|
||
|
|
||
|
%package -n librhash%{major}
|
||
|
Summary: LibRHash Shared Library
|
||
|
Group: System/Libraries
|
||
|
|
||
|
%description -n librhash%{major}
|
||
|
LibRHash is a professional, portable, thread-safe C library for
|
||
|
computing a wide variety of hash sums, such as CRC32, MD4, MD5, SHA1,
|
||
|
SHA256, SHA512, AICH, ED2K, Tiger, DC++ TTH, BitTorrent BTIH, GOST R
|
||
|
34.11-94, RIPEMD-160 HAS-160, EDON-R, Whirlpool and Snefru.
|
||
|
Hash sums are used to ensure and verify integrity of large volumes of
|
||
|
data for a long-term storing or transferring.
|
||
|
|
||
|
%package devel
|
||
|
Summary: Headers and Static Library for LibRHash
|
||
|
Group: Development/Libraries/C and C++
|
||
|
Requires: librhash%{major} = %{version}
|
||
|
Provides: librhash-devel = %{version}
|
||
|
Obsoletes: librhash-devel < 1.3.1
|
||
|
|
||
|
%description devel
|
||
|
LibRHash is a professional, portable, thread-safe C library for
|
||
|
computing a wide variety of hash sums, such as CRC32, MD4, MD5, SHA1,
|
||
|
SHA256, SHA512, AICH, ED2K, Tiger, DC++ TTH, BitTorrent BTIH, GOST R
|
||
|
34.11-94, RIPEMD-160 HAS-160, EDON-R, Whirlpool and Snefru.
|
||
|
Hash sums are used to ensure and verify integrity of large volumes of
|
||
|
data for a long-term storing or transferring.
|
||
|
|
||
|
This package includes LibRHash development files.
|
||
|
|
||
|
%lang_package
|
||
|
|
||
|
%prep
|
||
|
%setup -q
|
||
|
%patch0 -p1
|
||
|
|
||
|
%build
|
||
|
# Don't run parallel make — it doesn't work.
|
||
|
# Use OPTLDFLAGS="" not to strip binaries.
|
||
|
make \
|
||
|
ADDCFLAGS="-DUSE_GETTEXT -DUSE_OPENSSL -DOPENSSL_RUNTIME -rdynamic" \
|
||
|
ADDLDFLAGS="-ldl" \
|
||
|
OPTFLAGS="%{optflags}" \
|
||
|
OPTLDFLAGS="" \
|
||
|
lib-shared all
|
||
|
|
||
|
%install
|
||
|
%make_install \
|
||
|
PREFIX=%{_prefix} \
|
||
|
LIBDIR=%{_libdir} \
|
||
|
OPTFLAGS="%{optflags}" \
|
||
|
OPTLDFLAGS="" \
|
||
|
install-lib-shared \
|
||
|
install-gmo
|
||
|
%find_lang %{name} %{?no_lang_C}
|
||
|
|
||
|
%check
|
||
|
make \
|
||
|
OPTFLAGS="%{optflags}" \
|
||
|
ADDCFLAGS="-DUSE_OPENSSL -DOPENSSL_RUNTIME -rdynamic" \
|
||
|
ADDLDFLAGS="-ldl" \
|
||
|
LD_LIBRARY_PATH="../librhash" \
|
||
|
test
|
||
|
|
||
|
%post -n librhash%{major} -p /sbin/ldconfig
|
||
|
%postun -n librhash%{major} -p /sbin/ldconfig
|
||
|
|
||
|
%files
|
||
|
%defattr(-,root,root,-)
|
||
|
%doc ChangeLog COPYING README dist/rhash.1.html
|
||
|
%{_bindir}/*
|
||
|
%{_mandir}/man?/*
|
||
|
%config(noreplace) %{_sysconfdir}/rhashrc
|
||
|
|
||
|
%files -n librhash%{major}
|
||
|
%defattr(-,root,root,-)
|
||
|
%{_libdir}/*.so.*
|
||
|
|
||
|
%files devel
|
||
|
%defattr(-,root,root,-)
|
||
|
%doc ChangeLog COPYING README
|
||
|
%{_includedir}/rhash*
|
||
|
%{_libdir}/*.so
|
||
|
|
||
|
%files lang -f %{name}.lang
|
||
|
%defattr(-,root,root)
|
||
|
|
||
|
%changelog
|