File libxcrypt.spec of Package libxcrypt

#
# spec file for package libxcrypt (Version 3.0.1)
#
# Copyright (c) 2008 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/
#

# norootforbuild


Name:           libxcrypt
License:        LGPL v2.1 or later; Public Domain, Freeware
Group:          System/Libraries
AutoReqProv:    on
Version:        3.0.1
Release:        25
Summary:        Crypt Library for DES, MD5, Blowfish and others
Source:         libxcrypt-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Patch:          gensalt-fixes.diff

%description
Libxcrypt is a replacement for libcrypt, which comes with the GNU C
Library. It supports DES crypt, MD5, SHA256, SHA512 and passwords with
blowfish encryption.



%package devel
License:        LGPL v2.1 or later; Public Domain, Freeware
Summary:        Development Include Files and Libraries for enhanced crypt functionality
Group:          Development/Libraries/C and C++
Requires:       libxcrypt = %{version}
AutoReqProv:    on

%description devel
libxcrypt is a replacement for libcrypt, which comes with the GNU C
Library. It supports DES crypt, MD5, and passwords with blowfish
encryption.

This package contains the header files and static libraries necessary
to develop software using libxcrypt.



%prep
%setup -q
%patch

%build
automake
./configure CFLAGS="$RPM_OPT_FLAGS -Wno-cast-align" \
	--prefix=%{_prefix} \
	--libdir=/%{_lib} --disable-static
make

%check
make check

%install
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_libdir}
rm $RPM_BUILD_ROOT/%{_lib}/libxcrypt.{so,la}
rm $RPM_BUILD_ROOT/%{_lib}/xcrypt/lib*.{so,la}
ln -sf ../../%{_lib}/libxcrypt.so.2 $RPM_BUILD_ROOT%{_libdir}/libxcrypt.so
/sbin/ldconfig -n $RPM_BUILD_ROOT/%{_lib}/

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc COPYING README NEWS README.bcrypt README.ufc-crypt
/%{_lib}/libxcrypt.so.*
%dir /%{_lib}/xcrypt
/%{_lib}/xcrypt/lib*.so.*

%files devel
%defattr(-,root,root)
%{_prefix}/include/*.h
%{_libdir}/libxcrypt.so

%changelog
* Sun Sep 28 2008 kukuk@suse.de
- Add missing gensalt security fixes (was [bnc#408719])
* Thu Jun 26 2008 kukuk@suse.de
- Remove old obsolete libxcrypt.so.1
* Tue Apr 15 2008 kukuk@suse.de
- Create libxcrypt.so.1 symlink and include it in package
* Thu Apr 10 2008 ro@suse.de
- added baselibs.conf file to build xxbit packages
  for multilib support
* Mon Apr 07 2008 schwab@suse.de
- Remove use of undefined macro.
- Work around unclean sources.
* Thu Apr 03 2008 kukuk@suse.de
- Add libxcrypt-3.0:
  * Add sha256 and sha512 hashes
  * Create plugins for every hash function except DES/bigcrypt
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Jan 06 2006 kukuk@suse.de
- Update to 2.4 (sync with crypt_blowfish 1.0)
* Sun Sep 18 2005 kukuk@suse.de
- Update to 2.3 (remove broken assembler code)
* Sat Apr 09 2005 schwab@suse.de
- Fix utterly broken and unportable code.
* Fri Jun 18 2004 kukuk@suse.de
- Update to 2.2 (apply fixes from glibc version)
* Sat Jan 10 2004 adrian@suse.de
- add %%run_ldconfig
* Fri Nov 14 2003 kukuk@suse.de
- Compile libarary with no exec stack
* Thu Oct 16 2003 kukuk@suse.de
- Update to 2.1 (use optimized assembler version on ix86)
* Mon Jul 28 2003 kukuk@suse.de
- Update to 2.0
* Tue May 13 2003 kukuk@suse.de
- Add defattr to filelist
* Thu Jan 16 2003 kukuk@suse.de
- Update to version 1.4 (compiles with glibc > 2.3.1)
* Fri Jan 10 2003 kukuk@suse.de
- Update to version 1.3 (fix initialisation of internal data
  struct for des_crypt)
* Mon Oct 21 2002 kukuk@suse.de
- Update to version 1.2 (fix compiling with glibc 2.3.x)
* Mon May 27 2002 kukuk@suse.de
- Update to version 1.1 (add SHA1 support)
* Wed Apr 17 2002 kukuk@suse.de
- Add require to libxcrypt-devel for correct shared library
* Mon Apr 15 2002 kukuk@suse.de
- Initial version of a libcrypt replacement
openSUSE Build Service is sponsored by