Summary: Thread-safe hash algorithms library Name: mhash Version: 0.9.2 Release: 1 URL: http://mhash.sourceforge.net/ License: LGPLv2+ Group: System Environment/Libraries Source: http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Provides: lib%{name} = %{version}-%{release} BuildRequires: make %description mhash is a thread-safe hash library, implemented in C, and provides a uniform interface to a large number of hash algorithms. These algorithms can be used to compute checksums, message digests, and other signatures. The HMAC support implements the basics for message authentication, following RFC 2104. Algorithms currently supplied are: CRC-32, CRC-32B, ALDER-32, MD-2, MD-4, MD-5, RIPEMD-128, RIPEMD-160, RIPEMD-256, RIPEMD-320, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, HAVAL-128, HAVAL-160, HAVAL-192, HAVAL-256, TIGER, TIGER-128, TIGER-160, GOST, WHIRLPOOL, SNEFRU-128, SNEFRU-256 Algorithms will be added to this list over time. The library is available as 32-bit and 64-bit. %package devel Summary: Header files and libraries for developing apps which use mhash Group: Development/Libraries Requires: %{name} = %{version}-%{release} Provides: lib%{name}-devel = %{version}-%{release} %description devel The %{name}-devel package contains the header files and libraries needed to develop programs that use the %{name} library. Install the %{name}-devel package if you want to develop applications that will use the %{name} library. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "xlc -q64" or "gcc -maix64". %prep %setup -q %build # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" export NM="nm -X32_64" # first build the 64-bit version export CC="xlc -q64" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static gmake %{?_smp_mflags} cp lib/.libs/lib%{name}.so.2 . gmake distclean # now build the 32-bit version export CC="xlc" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static gmake %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q lib/.libs/lib%{name}.a ./lib%{name}.so.2 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} gmake DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT} for dir in lib include do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc AUTHORS COPYING NEWS README THANKS TODO %{_libdir}/*.a /usr/lib/*.a %files devel %defattr(-,root,system,-) %doc ChangeLog ./doc/*.c ./doc/skid2-authentication %{_includedir}/* %{_libdir}/*.la %{_mandir}/man3/* /usr/include/* /usr/lib/*.la %changelog * Fri Jun 06 2008 Michael Perzl - 0.9.2-1 - first version for AIX V5.1 and higher