summaryrefslogtreecommitdiff
path: root/packaging/libxcrypt.spec
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/libxcrypt.spec')
-rw-r--r--packaging/libxcrypt.spec111
1 files changed, 111 insertions, 0 deletions
diff --git a/packaging/libxcrypt.spec b/packaging/libxcrypt.spec
new file mode 100644
index 0000000..2819c2c
--- /dev/null
+++ b/packaging/libxcrypt.spec
@@ -0,0 +1,111 @@
+%define keepstatic 1
+
+Name: libxcrypt
+Version: 4.4.36
+Release: 0
+Summary: Extended crypt library for descrypt, md5crypt, bcrypt, and others
+
+# For explicit license breakdown, see the
+# LICENSING file in the source tarball.
+License: LGPL-2.1-or-later AND BSD-3-Clause AND BSD-2-Clause AND BSD-2-Clause-FreeBSD AND 0BSD AND CC0-1.0 AND LicenseRef-Fedora-Public-Domain
+URL: https://github.com/besser82/%{name}
+
+Source0: %{name}-%{version}.tar.bz2
+
+BuildRequires: glibc-devel glibc-devel-static
+BuildRequires: make
+BuildRequires: perl(File::Spec::Functions)
+BuildRequires: perl(File::Temp)
+
+%description
+libxcrypt is a modern library for one-way hashing of passwords. It
+supports a wide variety of both modern and historical hashing methods:
+yescrypt, gost-yescrypt, scrypt, bcrypt, sha512crypt, sha256crypt,
+md5crypt, SunMD5, sha1crypt, NT, bsdicrypt, bigcrypt, and descrypt.
+It 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.
+
+libxcrypt is intended to be used by login(1), passwd(1), and other
+similar programs; that is, to hash a small number of passwords during
+an interactive authentication dialogue with a human. It is not suitable
+for use in bulk password-cracking applications, or in any other situation
+where speed is more important than careful handling of sensitive data.
+However, it is intended to be fast and lightweight enough for use in
+servers that must field thousands of login attempts per minute.
+
+%package devel
+Summary: Development files for %{name}
+Requires: %{name} = %{version}-%{release}
+Requires: glibc-devel
+
+%description devel
+The %{name}-devel package contains libraries and header files for
+developing applications that use %{name}.
+
+%package devel-static
+Summary: Static library for -static linking with %{name}
+
+Requires: %{name}-devel = %{version}-%{release}
+Requires: glibc-devel-static
+
+%description devel-static
+This package contains the %{name} static library for -static
+linking.
+
+You don't need this, unless you link statically, which is highly
+discouraged.
+
+%prep
+%setup -q -n %{name}-%{version}
+./autogen.sh
+
+%build
+
+%reconfigure \
+ --enable-hashes=all \
+ --enable-obsolete-api=yes \
+ --disable-failure-tokens \
+ --disable-silent-rules \
+ --enable-shared \
+ --enable-static
+
+%{__make} %{?_smp_mflags}
+
+%install
+%make_install
+
+%check
+%{__make} %{?_smp_mflags} check
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%{_libdir}/libcrypt.so.*
+%{_libdir}/libowcrypt.so.*
+%{_mandir}/man5/crypt.5*
+
+%files devel
+%{_libdir}/libcrypt.so
+%{_libdir}/libxcrypt.so
+%{_libdir}/libowcrypt.so
+%{_includedir}/crypt.h
+%{_includedir}/xcrypt.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_checksalt.3*
+%{_mandir}/man3/crypt_gensalt.3*
+%{_mandir}/man3/crypt_gensalt_ra.3*
+%{_mandir}/man3/crypt_gensalt_rn.3*
+%{_mandir}/man3/crypt_preferred_method.3*
+
+%files devel-static
+%{_libdir}/libcrypt.a
+%{_libdir}/libxcrypt.a
+%{_libdir}/libowcrypt.a