]> git.pld-linux.org Git - packages/libxcrypt.git/blame - libxcrypt.spec
up to 4.4.34
[packages/libxcrypt.git] / libxcrypt.spec
CommitLineData
0f4884b2
JP
1#
2# Conditional build:
402966f5
JB
3%bcond_without compat_pkg # compat package (libcrypt.so.1 with legacy APIs)
4%bcond_without default_crypt # libxcrypt as default libcrypt
5%bcond_without tests # testing
0f4884b2 6
37a8c0b7 7Summary: Crypt Library for DES, MD5, and Blowfish
e65f8c9b 8Summary(pl.UTF-8): Biblioteka szyfrująca hasła obsługująca DES, MD5 i Blowfish
37a8c0b7 9Name: libxcrypt
a664dde6
JP
10Version: 4.4.34
11Release: 1
c311c836 12License: LGPL v2.1+
37a8c0b7 13Group: Libraries
dd0823fd
JB
14#Source0Download: https://github.com/besser82/libxcrypt/releases
15Source0: https://github.com/besser82/libxcrypt/archive/v%{version}/%{name}-%{version}.tar.gz
a664dde6 16# Source0-md5: d3e741c9fb393f6ac69b147d49d4da65
c311c836 17Patch0: %{name}-xcrypt.patch
dd0823fd 18URL: https://github.com/besser82/libxcrypt
c311c836
JB
19BuildRequires: autoconf >= 2.62
20BuildRequires: automake >= 1:1.14
c6198b7e 21BuildRequires: gcc >= 5:3.2
f35557c2 22BuildRequires: libltdl-devel
dd0823fd 23BuildRequires: libtool >= 2:2
c311c836 24BuildRequires: pkgconfig >= 1:0.27
0f4884b2
JP
25%if %{with default_crypt}
26Provides: crypt(blowfish)
402966f5 27Obsoletes: glibc-libcrypt < 6:2.37
0f4884b2 28%endif
37a8c0b7
AM
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
05ee50b3 31%undefine __cxx
f0e142fd 32
0f4884b2 33%if %{with default_crypt}
402966f5 34%define libname libcrypt
0f4884b2 35%else
05ee50b3 36%undefine with_compat_pkg
402966f5 37%define libname libxcrypt
05ee50b3
AM
38%endif
39
37a8c0b7 40%description
e65f8c9b
JB
41libxcrypt is a replacement for libcrypt, which comes with the GNU C
42Library. It supports DES crypt, MD5, and passwords with Blowfish
37a8c0b7
AM
43encryption.
44
e65f8c9b
JB
45%description -l pl.UTF-8
46libxcrypt to zamiennik biblioteki libcrypt dostarczanej wraz z
47biblioteką GNU C (libc). Obsługuje szyfrowanie haseł DES, MD5 oraz
48Blowfish.
49
37a8c0b7 50%package devel
e65f8c9b
JB
51Summary: Header file for libxcrypt
52Summary(pl.UTF-8): Plik nagłówkowy biblioteki libxcrypt
53License: LGPL v2.1+
37a8c0b7 54Group: Development/Libraries
18fb40b5 55Requires: %{name} = %{version}-%{release}
04fe7a72 56%{?with_default_crypt:Conflicts: glibc-devel-doc < 6:2.34-7}
37a8c0b7
AM
57
58%description devel
e65f8c9b 59This package contains the header file to develop software using
37a8c0b7
AM
60libxcrypt.
61
e65f8c9b
JB
62%description devel -l pl.UTF-8
63Ten pakiet zawiera plik nagłówkowy pozwalający na tworzenie programów
64korzystających z libxcrypt.
65
37a8c0b7
AM
66%package static
67Summary: Static libxcrypt library
e65f8c9b
JB
68Summary(pl.UTF-8): Statyczna biblioteka libxcrypt
69License: LGPL v2.1+
37a8c0b7 70Group: Development/Libraries
18fb40b5 71Requires: %{name}-devel = %{version}-%{release}
37a8c0b7
AM
72
73%description static
e65f8c9b
JB
74This package contains the static libxcrypt library used for
75development.
76
77%description static -l pl.UTF-8
78Ten pakiet zawiera statyczną wersję biblioteki libxcrypt.
37a8c0b7 79
402966f5
JB
80%package compat
81Summary: Compatibility library providing legacy API functions
82Summary(pl.UTF-8): Biblioteka zgodności wstecznej dostarczająca dawne funkcje API
83Requires: %{name} = %{version}-%{release}
84
85%description compat
86This package contains the library providing the compatibility API for
87applications that are linked against glibc's libcrypt, or that are
88still using the unsafe and deprecated, encrypt, encrypt_r, setkey,
89setkey_r, and fcrypt functions, which are still required by recent
90versions of POSIX, the Single UNIX Specification, and various other
91standards.
92
93All existing binary executables linked against glibc's libcrypt should
94work unmodified with the library supplied by this package.
95
96%description compat -l pl.UTF-8
97Ten pakiet zawiera bibliotekę dostarczającą API zgodności wstecznej
98dla aplikacji skonsolidowanych z biblioteką libcrypt z glibc lub
99nadal wykorzystujących niebezpieczne i przestarzałe funkcje encrypt,
100encrypt_r, setkey, setkey_r oraz fcrypt, nadal wymagane przez obecne
101wersje standardów POSIX, Single UNIX Specification i innych.
102
103Wszystkie istniejące programy wykonywalne skonsolidowane z biblioteką
104libcrypt z glibc powinny działać bez modyfikacji z biblioteką
105dostarczaną przez ten pakiet.
106
37a8c0b7
AM
107%prep
108%setup -q
0f4884b2 109%{!?with_default_crypt:%patch0 -p1}
37a8c0b7
AM
110
111%build
dd0823fd 112%{__libtoolize}
f35557c2 113%{__aclocal}
dd0823fd
JB
114%{__autoconf}
115%{__autoheader}
116%{__automake}
05ee50b3
AM
117
118install -d regular
119cd regular
120../%configure \
121 --enable-hashes=all \
f8fd6844 122%if %{with default_crypt}
402966f5
JB
123 --disable-obsolete-api \
124 --disable-obsolete-api-enosys \
f8fd6844
AM
125%else
126 --includedir=%{_includedir}/xcrypt \
127 --disable-xcrypt-compat-files \
128%endif
129 --disable-werror
37a8c0b7
AM
130%{__make}
131
3dbc3119
AM
132%if %{with tests}
133%{__make} check
134%endif
05ee50b3
AM
135cd ..
136
137%if %{with compat_pkg}
138install -d compat
139cd compat
140../%configure \
402966f5
JB
141 --enable-hashes=all \
142 --enable-obsolete-api=glibc \
143 --enable-obsolete-api-enosys \
144 --disable-werror
05ee50b3
AM
145%{__make}
146
147%if %{with tests}
148%{__make} check
149%endif
150cd ..
151%endif
3dbc3119 152
37a8c0b7
AM
153%install
154rm -rf $RPM_BUILD_ROOT
c311c836 155install -d $RPM_BUILD_ROOT/%{_lib}
37a8c0b7 156
05ee50b3
AM
157%if %{with compat_pkg}
158%{__make} -C compat install \
402966f5 159 DESTDIR=$RPM_BUILD_ROOT
05ee50b3
AM
160
161# clean everything beside library
9f0f940c 162find $RPM_BUILD_ROOT -not -type d -not -name 'libcrypt.so.1*' -delete -print
05ee50b3
AM
163%endif
164
165%{__make} -C regular install \
402966f5 166 DESTDIR=$RPM_BUILD_ROOT
37a8c0b7 167
0f4884b2 168%{__mv} $RPM_BUILD_ROOT%{_libdir}/%{libname}.so.* $RPM_BUILD_ROOT/%{_lib}
9f0f940c 169ln -snf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/%{libname}.so.2.*.*) $RPM_BUILD_ROOT%{_libdir}/%{libname}.so
429af81c 170
53a124c9 171# obsoleted by pkg-config
0f4884b2 172%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{libname}.la
7de2424d
JB
173
174%if %{without default_crypt}
175# PLD doesn't need Owl compatibility
176%{__rm} $RPM_BUILD_ROOT%{_libdir}/libowcrypt.*
eee95ac9 177# packaged with glibc-devel
7de2424d
JB
178%{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/crypt{,_r,_ra,_rn}.3*
179%endif
37a8c0b7
AM
180
181%clean
182rm -rf $RPM_BUILD_ROOT
183
402966f5
JB
184%post -p /sbin/ldconfig
185%postun -p /sbin/ldconfig
37a8c0b7 186
402966f5
JB
187%post compat -p /sbin/ldconfig
188%postun compat -p /sbin/ldconfig
6f585af5 189
402966f5 190%posttrans compat
9f0f940c
JB
191if [ ! -L /%{_lib}/libcrypt.so.1 ]; then
192 %{__rm} -f /%{_lib}/libcrypt.so.1
7bd10e8a
JR
193 /sbin/ldconfig
194fi
195
37a8c0b7
AM
196%files
197%defattr(644,root,root,755)
c311c836 198%doc AUTHORS ChangeLog LICENSING NEWS README.md THANKS TODO.md
9f0f940c
JB
199%attr(755,root,root) /%{_lib}/%{libname}.so.2.*.*
200%attr(755,root,root) %ghost /%{_lib}/%{libname}.so.2
37a8c0b7
AM
201
202%files devel
203%defattr(644,root,root,755)
0f4884b2 204%attr(755,root,root) %{_libdir}/%{libname}.so
f7f4363a 205%if %{with default_crypt}
39d43e40 206%{_includedir}/crypt.h
f7f4363a 207%else
c311c836 208%{_includedir}/xcrypt
f7f4363a 209%endif
c311c836
JB
210%{_pkgconfigdir}/libcrypt.pc
211%{_pkgconfigdir}/libxcrypt.pc
212%{_mandir}/man3/crypt_checksalt.3*
213%{_mandir}/man3/crypt_gensalt*.3*
214%{_mandir}/man3/crypt_preferred_method.3*
0f4884b2
JP
215%if %{with default_crypt}
216%{_mandir}/man3/crypt.3*
217%{_mandir}/man3/crypt_r.3*
218%{_mandir}/man3/crypt_ra.3*
219%{_mandir}/man3/crypt_rn.3*
220%endif
c311c836 221%{_mandir}/man5/crypt.5*
37a8c0b7
AM
222
223%files static
224%defattr(644,root,root,755)
0f4884b2 225%{_libdir}/%{libname}.a
402966f5
JB
226
227%if %{with compat_pkg}
228%files compat
229%defattr(644,root,root,755)
9f0f940c
JB
230%attr(755,root,root) /%{_lib}/libcrypt.so.1.*.*
231%attr(755,root,root) %ghost /%{_lib}/libcrypt.so.1
402966f5 232%endif
This page took 0.303338 seconds and 4 git commands to generate.