File mhash.spec of Package mhash
#
# spec file for package mhash
#
# Copyright (c) 2013 SUSE LINUX Products 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/
#
Name: mhash
Version: 0.9.9.9
Release: 0
BuildRequires: libtool
Url: http://mhash.sourceforge.net/
Summary: A Library for Working with Strong Hashes (Like MD5)
License: GPL-2.0+
Group: Development/Libraries/C and C++
Source: %{name}-%{version}.tar.bz2
Patch0: %{name}-%{version}-shared.diff
# PATCH-FIX-UPSTREAM fix-for-upstream-sources.patch sourceforge#2908478
Patch1: mhash_remove_premature_free.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The mhash library provides an easy way to access strong hashes, such as
MD5, SHA1, and other algorithms.
%package devel
Summary: Static Library and Header Files for mhash Library
Group: Development/Libraries/C and C++
Provides: mhash:/usr/include/mhash.h
Requires: glibc-devel
Requires: mhash = %{version}
%description devel
The mhash library provides an easy way to access strong hashes such as
MD5, SHA1, and other algorithms.
%prep
%setup -q -n %{name}-%{version}
%patch0
%patch1 -p1
%build
autoreconf --force --install
%configure --with-pic\
--disable-static
%{__make} %{?_smp_mflags}
%install
%{__make} DESTDIR=%{buildroot} install
# useless .la file - has empty dependency_libs variable
%{__rm} -f %{buildroot}%{_libdir}/libmhash.la
%check
make check
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README THANKS TODO
%doc doc/skid2-authentication doc/example.c
%{_libdir}/libmhash.so.*
%files devel
%defattr(-,root,root)
%doc %{_mandir}/man?/*
%{_includedir}/*
%{_libdir}/libmhash.so
%changelog