]> git.pld-linux.org Git - packages/libxcrypt.git/blame - libxcrypt.spec
Run test suite.
[packages/libxcrypt.git] / libxcrypt.spec
CommitLineData
0f4884b2
JP
1#
2# Conditional build:
f8fd6844 3%bcond_without default_crypt # build as default libcrypt provider
3dbc3119 4%bcond_without tests
0f4884b2 5
37a8c0b7 6Summary: Crypt Library for DES, MD5, and Blowfish
e65f8c9b 7Summary(pl.UTF-8): Biblioteka szyfrująca hasła obsługująca DES, MD5 i Blowfish
37a8c0b7 8Name: libxcrypt
b8dea599 9Version: 4.4.33
7de2424d 10Release: 1
c311c836 11License: LGPL v2.1+
37a8c0b7 12Group: Libraries
dd0823fd
JB
13#Source0Download: https://github.com/besser82/libxcrypt/releases
14Source0: https://github.com/besser82/libxcrypt/archive/v%{version}/%{name}-%{version}.tar.gz
b8dea599 15# Source0-md5: 1cfd40c89ab1e3d4a1f030c9842474e9
c311c836 16Patch0: %{name}-xcrypt.patch
dd0823fd 17URL: https://github.com/besser82/libxcrypt
c311c836
JB
18BuildRequires: autoconf >= 2.62
19BuildRequires: automake >= 1:1.14
c6198b7e 20BuildRequires: gcc >= 5:3.2
f35557c2 21BuildRequires: libltdl-devel
dd0823fd 22BuildRequires: libtool >= 2:2
c311c836 23BuildRequires: pkgconfig >= 1:0.27
0f4884b2
JP
24%if %{with default_crypt}
25Provides: crypt(blowfish)
26Obsoletes: glibc-libcrypt
27%endif
37a8c0b7
AM
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
f0e142fd 30%undefine __cxx
31
0f4884b2
JP
32%if %{with default_crypt}
33%define libname libcrypt
34%define libver 1
35%else
36%define libname libxcrypt
37%define libver 2
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
AM
79
80%prep
81%setup -q
0f4884b2 82%{!?with_default_crypt:%patch0 -p1}
37a8c0b7
AM
83
84%build
dd0823fd 85%{__libtoolize}
f35557c2 86%{__aclocal}
dd0823fd
JB
87%{__autoconf}
88%{__autoheader}
89%{__automake}
37a8c0b7 90%configure \
f8fd6844
AM
91%if %{with default_crypt}
92 --enable-obsolete-api=glibc \
93 --enable-obsolete-api-enosys=yes \
94%else
95 --includedir=%{_includedir}/xcrypt \
96 --disable-xcrypt-compat-files \
97%endif
98 --disable-werror
37a8c0b7
AM
99%{__make}
100
3dbc3119
AM
101%if %{with tests}
102%{__make} check
103%endif
104
37a8c0b7
AM
105%install
106rm -rf $RPM_BUILD_ROOT
c311c836 107install -d $RPM_BUILD_ROOT/%{_lib}
37a8c0b7
AM
108
109%{__make} install \
110 DESTDIR=$RPM_BUILD_ROOT
111
0f4884b2
JP
112%{__mv} $RPM_BUILD_ROOT%{_libdir}/%{libname}.so.* $RPM_BUILD_ROOT/%{_lib}
113ln -snf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/%{libname}.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/%{libname}.so
429af81c 114
53a124c9 115# obsoleted by pkg-config
0f4884b2 116%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{libname}.la
7de2424d
JB
117
118%if %{without default_crypt}
119# PLD doesn't need Owl compatibility
120%{__rm} $RPM_BUILD_ROOT%{_libdir}/libowcrypt.*
eee95ac9 121# packaged with glibc-devel
7de2424d
JB
122%{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/crypt{,_r,_ra,_rn}.3*
123%endif
37a8c0b7
AM
124
125%clean
126rm -rf $RPM_BUILD_ROOT
127
128%post -p /sbin/ldconfig
129%postun -p /sbin/ldconfig
130
7bd10e8a
JR
131%posttrans
132if [ ! -L /%{_lib}/%{libname}.so.%{libver} ]; then
133 %{__rm} -f /%{_lib}/%{libname}.so.%{libver}
134 /sbin/ldconfig
135fi
136
37a8c0b7
AM
137%files
138%defattr(644,root,root,755)
c311c836 139%doc AUTHORS ChangeLog LICENSING NEWS README.md THANKS TODO.md
0f4884b2
JP
140%attr(755,root,root) /%{_lib}/%{libname}.so.*.*.*
141%attr(755,root,root) %ghost /%{_lib}/%{libname}.so.%{libver}
37a8c0b7
AM
142
143%files devel
144%defattr(644,root,root,755)
0f4884b2 145%attr(755,root,root) %{_libdir}/%{libname}.so
f7f4363a 146%if %{with default_crypt}
39d43e40 147%{_includedir}/crypt.h
f8fd6844
AM
148%{_includedir}/xcrypt.h
149%attr(755,root,root) %{_libdir}/libxcrypt.so
f7f4363a 150%else
c311c836 151%{_includedir}/xcrypt
f7f4363a 152%endif
c311c836
JB
153%{_pkgconfigdir}/libcrypt.pc
154%{_pkgconfigdir}/libxcrypt.pc
155%{_mandir}/man3/crypt_checksalt.3*
156%{_mandir}/man3/crypt_gensalt*.3*
157%{_mandir}/man3/crypt_preferred_method.3*
0f4884b2
JP
158%if %{with default_crypt}
159%{_mandir}/man3/crypt.3*
160%{_mandir}/man3/crypt_r.3*
161%{_mandir}/man3/crypt_ra.3*
162%{_mandir}/man3/crypt_rn.3*
163%endif
c311c836 164%{_mandir}/man5/crypt.5*
37a8c0b7
AM
165
166%files static
167%defattr(644,root,root,755)
0f4884b2 168%{_libdir}/%{libname}.a
f8fd6844
AM
169%if %{with default_crypt}
170%{_libdir}/libxcrypt.a
171%endif
This page took 0.166809 seconds and 4 git commands to generate.