File libxcrypt.spec of Package libxcrypt
#
# spec file for package libxcrypt (Version 3.0.2)
#
# Copyright (c) 2009 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
# bug437293
%ifarch ppc64
Obsoletes: libxcrypt-64bit
%endif
#
Version: 3.0.2
Release: 2
Summary: Crypt Library for DES, MD5, Blowfish and others
Source: libxcrypt-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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
# bug437293
%ifarch ppc64
Obsoletes: libxcrypt-devel-64bit
%endif
#
%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
%build
./configure CFLAGS="$RPM_OPT_FLAGS -Wno-cast-align" \
--prefix=%{_prefix} \
--libdir=/%{_lib} --disable-static
make
%check
%ifnarch %arm
# testsuite kills qemu-arm and worker :(
make check
%endif
%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