1# This file is automatically generated from rhash.spec.in 2%define version @VERSION@ 3%define make %{?__make}%{!?__make:make} 4 5# major is the part of the shared library name after the .so 6%define major 0 7 8%if 0%{?mgaversion:1} 9%define libname %mklibname rhash %{major} 10%define devlibname %mklibname -d rhash 11%define opensll_dev libopenssl1.0.0-devel 12%else 13%define libname librhash%{major} 14%define devlibname rhash-devel 15%define opensll_dev openssl-devel 16%endif 17 18Summary: Utility for computing hash sums and creating magnet links. 19Name: rhash 20Version: %{version} 21Release: 1%{?dist} 22License: 0BSD 23%if 0%{?suse_version} 24Group: Productivity/File utilities 25%else 26Group: Applications/File 27%endif 28Vendor: Novosibirsk, Animegorodok 29Packager: Aleksey Kravchenko 30URL: http://rhash.sourceforge.net/ 31Source: http://downloads.sourceforge.net/rhash/rhash-%{version}-src.tar.gz 32BuildRoot: %{_builddir}/%{name}-%{version}-root 33BuildRequires: gcc, %{opensll_dev} 34%description 35RHash is a console utility for calculation and verification of magnet links 36and a wide range of hash sums like CRC32, MD4, MD5, SHA1, SHA256, SHA512, 37AICH, ED2K, Tiger, DC++ TTH, BitTorrent BTIH, GOST R 34.11-94, RIPEMD-160, 38HAS-160, EDON-R, Whirlpool and Snefru. 39Hash sums are used to ensure and verify integrity of large volumes of data 40for a long-term storing or transferring. 41 42Features: 43 * Output in a predefined (SFV, BSD-like) or a user-defined format. 44 * Calculation of Magnet links. 45 * Ability to process directories recursively. 46 * Updating hash files (adding hash sums of files missing in the hash file). 47 * Portability: the program works the same on Linux, *BSD or Windows. 48 49# LibRHash shared library, contains librhash.so.[major] only 50%package -n %{libname} 51Summary: LibRHash shared library 52Group: System/Libraries 53Provides: librhash = %{version}-%{release} 54%description -n %{libname} 55LibRHash is a professional, portable, thread-safe C library for computing 56a wide variety of hash sums, such as CRC32, MD4, MD5, SHA1, SHA256, SHA512, 57AICH, ED2K, Tiger, DC++ TTH, BitTorrent BTIH, GOST R 34.11-94, RIPEMD-160, 58HAS-160, EDON-R, Whirlpool and Snefru. 59Hash sums are used to ensure and verify integrity of large volumes of data 60for a long-term storing or transferring. 61 62%package -n %{devlibname} 63Summary: Headers and static library for LibRHash 64Group: Development/C 65Requires: %{libname} = %{version} 66#(!) MANDATORY 67Provides: librhash-devel = %{version}-%{release} 68%description -n %{devlibname} 69LibRHash is a professional, portable, thread-safe C library for computing 70a wide variety of hash sums, such as CRC32, MD4, MD5, SHA1, SHA256, SHA512, 71AICH, ED2K, Tiger, DC++ TTH, BitTorrent BTIH, GOST R 34.11-94, RIPEMD-160, 72HAS-160, EDON-R, Whirlpool and Snefru. 73Hash sums are used to ensure and verify integrity of large volumes of data 74for a long-term storing or transferring. 75 76%prep 77%setup 78 79%build 80./configure --enable-openssl-runtime --disable-gettext --enable-lib-static \ 81 --prefix=/usr --sysconfdir=/etc --mandir="%{_mandir}" --libdir="%{_libdir}" \ 82 --extra-cflags="$RPM_OPT_FLAGS" 83%{make} 84 85%check 86%{make} test 87 88%install 89%{make} install install-lib-so-link DESTDIR="$RPM_BUILD_ROOT" 90 91%clean 92rm -rf "$RPM_BUILD_ROOT" 93 94%files 95%defattr(-,root,root) 96%doc ChangeLog COPYING README 97/usr/bin/* 98/etc/rhashrc 99%{_mandir}/man1/ 100 101%files -n %{devlibname} 102%defattr(-,root,root) 103%{_libdir}/librhash.a 104%{_libdir}/librhash.so 105%{_includedir}/*.h 106 107%files -n %{libname} 108%defattr(-,root,root) 109%doc COPYING README ChangeLog 110%{_libdir}/librhash.so.%{major} 111 112%post -n %{libname} 113ldconfig 114 115%postun -n %{libname} 116ldconfig 117 118%changelog 119