]> git.pld-linux.org Git - packages/libxcrypt.git/blob - libxcrypt.spec
up to 4.4.22
[packages/libxcrypt.git] / libxcrypt.spec
1 #
2 # Conditional build:
3 %bcond_with     default_crypt   # build as default libcrypt provider
4
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
7 Name:           libxcrypt
8 Version:        4.4.22
9 Release:        1
10 License:        LGPL v2.1+
11 Group:          Libraries
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:  6e4f363d86f99562d012c47e7f024618
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
26 %endif
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %undefine       __cxx
30
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
40 %description
41 libxcrypt is a replacement for libcrypt, which comes with the GNU C
42 Library. It supports DES crypt, MD5, and passwords with Blowfish
43 encryption.
44
45 %description -l pl.UTF-8
46 libxcrypt to zamiennik biblioteki libcrypt dostarczanej wraz z
47 biblioteką GNU C (libc). Obsługuje szyfrowanie haseł DES, MD5 oraz
48 Blowfish.
49
50 %package devel
51 Summary:        Header file for libxcrypt
52 Summary(pl.UTF-8):      Plik nagłówkowy biblioteki libxcrypt
53 License:        LGPL v2.1+
54 Group:          Development/Libraries
55 Requires:       %{name} = %{version}-%{release}
56
57 %description devel
58 This package contains the header file to develop software using
59 libxcrypt.
60
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.
64
65 %package static
66 Summary:        Static libxcrypt library
67 Summary(pl.UTF-8):      Statyczna biblioteka libxcrypt
68 License:        LGPL v2.1+
69 Group:          Development/Libraries
70 Requires:       %{name}-devel = %{version}-%{release}
71
72 %description static
73 This package contains the static libxcrypt library used for
74 development.
75
76 %description static -l pl.UTF-8
77 Ten pakiet zawiera statyczną wersję biblioteki libxcrypt.
78
79 %prep
80 %setup -q
81 %{!?with_default_crypt:%patch0 -p1}
82
83 %build
84 %{__libtoolize}
85 %{__aclocal}
86 %{__autoconf}
87 %{__autoheader}
88 %{__automake}
89 %configure \
90         %{!?with_default_crypt:--includedir=%{_includedir}/xcrypt} \
91         --disable-werror \
92         --disable-xcrypt-compat-files
93 %{__make}
94
95 %install
96 rm -rf $RPM_BUILD_ROOT
97 install -d $RPM_BUILD_ROOT/%{_lib}
98
99 %{__make} install \
100         DESTDIR=$RPM_BUILD_ROOT
101
102 %{__mv} $RPM_BUILD_ROOT%{_libdir}/%{libname}.so.* $RPM_BUILD_ROOT/%{_lib}
103 ln -snf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/%{libname}.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/%{libname}.so
104
105 # obsoleted by pkg-config
106 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{libname}.la
107 # PLD doesn't need Owl compatibility
108 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libowcrypt.*
109 # packaged with glibc-devel
110 %{!?with_default_crypt:%{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/crypt{,_r,_ra,_rn}.3*}
111
112 %clean
113 rm -rf $RPM_BUILD_ROOT
114
115 %post   -p /sbin/ldconfig
116 %postun -p /sbin/ldconfig
117
118 %files
119 %defattr(644,root,root,755)
120 %doc AUTHORS ChangeLog LICENSING NEWS README.md THANKS TODO.md
121 %attr(755,root,root) /%{_lib}/%{libname}.so.*.*.*
122 %attr(755,root,root) %ghost /%{_lib}/%{libname}.so.%{libver}
123
124 %files devel
125 %defattr(644,root,root,755)
126 %attr(755,root,root) %{_libdir}/%{libname}.so
127 %if %{with default_crypt}
128 %{_includedir}/crypt.h
129 %else
130 %{_includedir}/xcrypt
131 %endif
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*
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
143 %{_mandir}/man5/crypt.5*
144
145 %files static
146 %defattr(644,root,root,755)
147 %{_libdir}/%{libname}.a
This page took 1.332307 seconds and 3 git commands to generate.