3 %bcond_without default_crypt # build as default libcrypt provider
5 Summary: Crypt Library for DES, MD5, and Blowfish
6 Summary(pl.UTF-8): Biblioteka szyfrująca hasła obsługująca DES, MD5 i Blowfish
12 #Source0Download: https://github.com/besser82/libxcrypt/releases
13 Source0: https://github.com/besser82/libxcrypt/archive/v%{version}/%{name}-%{version}.tar.gz
14 # Source0-md5: 4036f4dda35ad8d18b894da426dbf7cd
15 Patch0: %{name}-xcrypt.patch
16 URL: https://github.com/besser82/libxcrypt
17 BuildRequires: autoconf >= 2.62
18 BuildRequires: automake >= 1:1.14
19 BuildRequires: gcc >= 5:3.2
20 BuildRequires: libltdl-devel
21 BuildRequires: libtool >= 2:2
22 BuildRequires: pkgconfig >= 1:0.27
23 %if %{with default_crypt}
24 Provides: crypt(blowfish)
25 Obsoletes: glibc-libcrypt
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 %if %{with default_crypt}
32 %define libname libcrypt
35 %define libname libxcrypt
40 libxcrypt is a replacement for libcrypt, which comes with the GNU C
41 Library. It supports DES crypt, MD5, and passwords with Blowfish
44 %description -l pl.UTF-8
45 libxcrypt to zamiennik biblioteki libcrypt dostarczanej wraz z
46 biblioteką GNU C (libc). Obsługuje szyfrowanie haseł DES, MD5 oraz
50 Summary: Header file for libxcrypt
51 Summary(pl.UTF-8): Plik nagłówkowy biblioteki libxcrypt
53 Group: Development/Libraries
54 Requires: %{name} = %{version}-%{release}
55 Conflicts: glibc-devel-doc < 6:2.34-7
58 This package contains the header file to develop software using
61 %description devel -l pl.UTF-8
62 Ten pakiet zawiera plik nagłówkowy pozwalający na tworzenie programów
63 korzystających z libxcrypt.
66 Summary: Static libxcrypt library
67 Summary(pl.UTF-8): Statyczna biblioteka libxcrypt
69 Group: Development/Libraries
70 Requires: %{name}-devel = %{version}-%{release}
73 This package contains the static libxcrypt library used for
76 %description static -l pl.UTF-8
77 Ten pakiet zawiera statyczną wersję biblioteki libxcrypt.
81 %{!?with_default_crypt:%patch0 -p1}
90 %if %{with default_crypt}
91 --enable-obsolete-api=glibc \
92 --enable-obsolete-api-enosys=yes \
94 --includedir=%{_includedir}/xcrypt \
95 --disable-xcrypt-compat-files \
101 rm -rf $RPM_BUILD_ROOT
102 install -d $RPM_BUILD_ROOT/%{_lib}
105 DESTDIR=$RPM_BUILD_ROOT
107 %{__mv} $RPM_BUILD_ROOT%{_libdir}/%{libname}.so.* $RPM_BUILD_ROOT/%{_lib}
108 ln -snf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/%{libname}.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/%{libname}.so
110 # obsoleted by pkg-config
111 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{libname}.la
113 %if %{without default_crypt}
114 # PLD doesn't need Owl compatibility
115 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libowcrypt.*
116 # packaged with glibc-devel
117 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/crypt{,_r,_ra,_rn}.3*
121 rm -rf $RPM_BUILD_ROOT
123 %post -p /sbin/ldconfig
124 %postun -p /sbin/ldconfig
127 if [ ! -L /%{_lib}/%{libname}.so.%{libver} ]; then
128 %{__rm} -f /%{_lib}/%{libname}.so.%{libver}
133 %defattr(644,root,root,755)
134 %doc AUTHORS ChangeLog LICENSING NEWS README.md THANKS TODO.md
135 %attr(755,root,root) /%{_lib}/%{libname}.so.*.*.*
136 %attr(755,root,root) %ghost /%{_lib}/%{libname}.so.%{libver}
139 %defattr(644,root,root,755)
140 %attr(755,root,root) %{_libdir}/%{libname}.so
141 %if %{with default_crypt}
142 %{_includedir}/crypt.h
143 %{_includedir}/xcrypt.h
144 %attr(755,root,root) %{_libdir}/libxcrypt.so
146 %{_includedir}/xcrypt
148 %{_pkgconfigdir}/libcrypt.pc
149 %{_pkgconfigdir}/libxcrypt.pc
150 %{_mandir}/man3/crypt_checksalt.3*
151 %{_mandir}/man3/crypt_gensalt*.3*
152 %{_mandir}/man3/crypt_preferred_method.3*
153 %if %{with default_crypt}
154 %{_mandir}/man3/crypt.3*
155 %{_mandir}/man3/crypt_r.3*
156 %{_mandir}/man3/crypt_ra.3*
157 %{_mandir}/man3/crypt_rn.3*
159 %{_mandir}/man5/crypt.5*
162 %defattr(644,root,root,755)
163 %{_libdir}/%{libname}.a
164 %if %{with default_crypt}
165 %{_libdir}/libxcrypt.a