libxcrypt/libxcrypt.spec
2025-02-05 22:22:33 +00:00

105 lines
3.1 KiB
RPMSpec

%define major 1
%define libname %mklibname xcrypt %{major}
%define devname %mklibname xcrypt -d
%define staticlibname %mklibname xcrypt -d -s
Name: libxcrypt
Version: 4.1.2
Release: 1
Summary: Extended crypt library for DES, MD5, Blowfish and others
License: GPL-3.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause AND SUSE-Public-Domain
Group: Development/C
URL: https://github.com/besser82/%{name}
Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: pkgconfig
%description
libxcrypt is a modern library for one-way hashing of passwords. It
supports DES, MD5, SHA-2-256, SHA-2-512, and bcrypt-based password
hashes, and provides the traditional Unix 'crypt' and 'crypt_r'
interfaces, as well as a set of extended interfaces pioneered by
Openwall Linux, 'crypt_rn', 'crypt_ra', 'crypt_gensalt',
'crypt_gensalt_rn', and 'crypt_gensalt_ra'.
%package -n %{libname}
Summary: Extended crypt library for DES, MD5, Blowfish and others
License: LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause AND SUSE-Public-Domain
Group: System/Libraries
Conflicts: glibc < 6:2.28-2
%description -n %{libname}
libxcrypt is a modern library for one-way hashing of passwords. It
supports DES, MD5, SHA-2-256, SHA-2-512, and bcrypt-based password
hashes, and provides the traditional Unix 'crypt' and 'crypt_r'
interfaces, as well as a set of extended interfaces pioneered by
Openwall Linux, 'crypt_rn', 'crypt_ra', 'crypt_gensalt',
'crypt_gensalt_rn', and 'crypt_gensalt_ra'.
%package -n %{devname}
Summary: Development files for %{name}
License: LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause AND SUSE-Public-Domain
Group: Development/C
Requires: %{libname} = %{version}
Requires: pkgconfig
Conflicts: glibc-devel < 6:2.28-2
Provides: %{name}-devel = %{version}-%{release}
Provides: xcrypt-devel = %{version}-%{release}
%description -n %{devname}
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q
%apply_patches
%build
autoreconf -fiv
%configure2_5x \
--disable-silent-rules \
--enable-shared \
--disable-static \
--enable-obsolete-api \
--enable-hashes=all \
--with-pkgconfigdir=%{_libdir}/pkgconfig
%make
%install
%makeinstall_std
#find %{buildroot}%{_libdir} -name '*.la' -print -delete
%check
%make check || \
{
rc=$?;
echo "-----BEGIN TESTLOG-----";
cat test-suite.log;
echo "-----END TESTLOG-----";
exit $rc;
}
%files -n %{libname}
%doc COPYING.LIB LICENSING
%doc AUTHORS NEWS README.md THANKS
%{_libdir}/libcrypt.so.%{major}*
%{_libdir}/libowcrypt.so.%{major}
%files -n %{devname}
%doc TODO
%{_libdir}/libcrypt.so
%{_libdir}/libowcrypt.so
%{_includedir}/crypt.h
%{_libdir}/pkgconfig/libcrypt.pc
%{_libdir}/pkgconfig/%{name}.pc
%{_mandir}/man3/crypt.3*
%{_mandir}/man3/crypt_r.3*
%{_mandir}/man3/crypt_ra.3*
%{_mandir}/man3/crypt_rn.3*
%{_mandir}/man3/crypt_gensalt.3*
%{_mandir}/man5/crypt.5*