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