]>
Commit | Line | Data |
---|---|---|
0f4884b2 JP |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with default_crypt # build as default libcrypt provider | |
4 | ||
37a8c0b7 | 5 | Summary: Crypt Library for DES, MD5, and Blowfish |
e65f8c9b | 6 | Summary(pl.UTF-8): Biblioteka szyfrująca hasła obsługująca DES, MD5 i Blowfish |
37a8c0b7 | 7 | Name: libxcrypt |
53a124c9 | 8 | Version: 4.4.17 |
c6198b7e | 9 | Release: 1 |
c311c836 | 10 | License: LGPL v2.1+ |
37a8c0b7 | 11 | Group: Libraries |
dd0823fd JB |
12 | #Source0Download: https://github.com/besser82/libxcrypt/releases |
13 | Source0: https://github.com/besser82/libxcrypt/archive/v%{version}/%{name}-%{version}.tar.gz | |
53a124c9 | 14 | # Source0-md5: 12118d098ead971f9a8377cacfdd0da7 |
c311c836 | 15 | Patch0: %{name}-xcrypt.patch |
dd0823fd | 16 | URL: https://github.com/besser82/libxcrypt |
c311c836 JB |
17 | BuildRequires: autoconf >= 2.62 |
18 | BuildRequires: automake >= 1:1.14 | |
c6198b7e | 19 | BuildRequires: gcc >= 5:3.2 |
dd0823fd | 20 | BuildRequires: libtool >= 2:2 |
c311c836 | 21 | BuildRequires: pkgconfig >= 1:0.27 |
0f4884b2 JP |
22 | %if %{with default_crypt} |
23 | Provides: crypt(blowfish) | |
24 | Obsoletes: glibc-libcrypt | |
25 | %endif | |
37a8c0b7 AM |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
27 | ||
f0e142fd | 28 | %undefine __cxx |
29 | ||
0f4884b2 JP |
30 | %if %{with default_crypt} |
31 | %define libname libcrypt | |
32 | %define libver 1 | |
33 | %else | |
34 | %define libname libxcrypt | |
35 | %define libver 2 | |
36 | %endif | |
37 | ||
38 | ||
37a8c0b7 | 39 | %description |
e65f8c9b JB |
40 | libxcrypt is a replacement for libcrypt, which comes with the GNU C |
41 | Library. It supports DES crypt, MD5, and passwords with Blowfish | |
37a8c0b7 AM |
42 | encryption. |
43 | ||
e65f8c9b JB |
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 | |
47 | Blowfish. | |
48 | ||
37a8c0b7 | 49 | %package devel |
e65f8c9b JB |
50 | Summary: Header file for libxcrypt |
51 | Summary(pl.UTF-8): Plik nagłówkowy biblioteki libxcrypt | |
52 | License: LGPL v2.1+ | |
37a8c0b7 | 53 | Group: Development/Libraries |
18fb40b5 | 54 | Requires: %{name} = %{version}-%{release} |
37a8c0b7 AM |
55 | |
56 | %description devel | |
e65f8c9b | 57 | This package contains the header file to develop software using |
37a8c0b7 AM |
58 | libxcrypt. |
59 | ||
e65f8c9b JB |
60 | %description devel -l pl.UTF-8 |
61 | Ten pakiet zawiera plik nagłówkowy pozwalający na tworzenie programów | |
62 | korzystających z libxcrypt. | |
63 | ||
37a8c0b7 AM |
64 | %package static |
65 | Summary: Static libxcrypt library | |
e65f8c9b JB |
66 | Summary(pl.UTF-8): Statyczna biblioteka libxcrypt |
67 | License: LGPL v2.1+ | |
37a8c0b7 | 68 | Group: Development/Libraries |
18fb40b5 | 69 | Requires: %{name}-devel = %{version}-%{release} |
37a8c0b7 AM |
70 | |
71 | %description static | |
e65f8c9b JB |
72 | This package contains the static libxcrypt library used for |
73 | development. | |
74 | ||
75 | %description static -l pl.UTF-8 | |
76 | Ten pakiet zawiera statyczną wersję biblioteki libxcrypt. | |
37a8c0b7 AM |
77 | |
78 | %prep | |
79 | %setup -q | |
0f4884b2 | 80 | %{!?with_default_crypt:%patch0 -p1} |
37a8c0b7 AM |
81 | |
82 | %build | |
dd0823fd JB |
83 | %{__libtoolize} |
84 | %{__aclocal} -I m4 | |
85 | %{__autoconf} | |
86 | %{__autoheader} | |
87 | %{__automake} | |
37a8c0b7 | 88 | %configure \ |
f7f4363a | 89 | %{!?with_default_crypt:--includedir=%{_includedir}/xcrypt} \ |
c311c836 JB |
90 | --disable-werror \ |
91 | --disable-xcrypt-compat-files | |
37a8c0b7 AM |
92 | %{__make} |
93 | ||
94 | %install | |
95 | rm -rf $RPM_BUILD_ROOT | |
c311c836 | 96 | install -d $RPM_BUILD_ROOT/%{_lib} |
37a8c0b7 AM |
97 | |
98 | %{__make} install \ | |
99 | DESTDIR=$RPM_BUILD_ROOT | |
100 | ||
0f4884b2 JP |
101 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/%{libname}.so.* $RPM_BUILD_ROOT/%{_lib} |
102 | ln -snf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/%{libname}.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/%{libname}.so | |
429af81c | 103 | |
53a124c9 | 104 | # obsoleted by pkg-config |
0f4884b2 | 105 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{libname}.la |
eee95ac9 JB |
106 | # PLD doesn't need Owl compatibility |
107 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libowcrypt.* | |
108 | # packaged with glibc-devel | |
0f4884b2 | 109 | %{!?with_default_crypt:%{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/crypt{,_r,_ra,_rn}.3*} |
37a8c0b7 AM |
110 | |
111 | %clean | |
112 | rm -rf $RPM_BUILD_ROOT | |
113 | ||
114 | %post -p /sbin/ldconfig | |
115 | %postun -p /sbin/ldconfig | |
116 | ||
117 | %files | |
118 | %defattr(644,root,root,755) | |
c311c836 | 119 | %doc AUTHORS ChangeLog LICENSING NEWS README.md THANKS TODO.md |
0f4884b2 JP |
120 | %attr(755,root,root) /%{_lib}/%{libname}.so.*.*.* |
121 | %attr(755,root,root) %ghost /%{_lib}/%{libname}.so.%{libver} | |
37a8c0b7 AM |
122 | |
123 | %files devel | |
124 | %defattr(644,root,root,755) | |
0f4884b2 | 125 | %attr(755,root,root) %{_libdir}/%{libname}.so |
f7f4363a | 126 | %if %{with default_crypt} |
39d43e40 | 127 | %{_includedir}/crypt.h |
f7f4363a | 128 | %else |
c311c836 | 129 | %{_includedir}/xcrypt |
f7f4363a | 130 | %endif |
c311c836 JB |
131 | %{_pkgconfigdir}/libcrypt.pc |
132 | %{_pkgconfigdir}/libxcrypt.pc | |
133 | %{_mandir}/man3/crypt_checksalt.3* | |
134 | %{_mandir}/man3/crypt_gensalt*.3* | |
135 | %{_mandir}/man3/crypt_preferred_method.3* | |
0f4884b2 JP |
136 | %if %{with default_crypt} |
137 | %{_mandir}/man3/crypt.3* | |
138 | %{_mandir}/man3/crypt_r.3* | |
139 | %{_mandir}/man3/crypt_ra.3* | |
140 | %{_mandir}/man3/crypt_rn.3* | |
141 | %endif | |
c311c836 | 142 | %{_mandir}/man5/crypt.5* |
37a8c0b7 AM |
143 | |
144 | %files static | |
145 | %defattr(644,root,root,755) | |
0f4884b2 | 146 | %{_libdir}/%{libname}.a |