]> git.pld-linux.org Git - packages/libxcrypt.git/blob - libxcrypt.spec
61a22e43c25407598684448549ab44b3560dd5d3
[packages/libxcrypt.git] / libxcrypt.spec
1 #
2 # Conditional build:
3 %bcond_without  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.25
9 Release:        3
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:  4828b1530f5bf35af0b45b35acc4db1d
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 %description
40 libxcrypt is a replacement for libcrypt, which comes with the GNU C
41 Library. It supports DES crypt, MD5, and passwords with Blowfish
42 encryption.
43
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
49 %package devel
50 Summary:        Header file for libxcrypt
51 Summary(pl.UTF-8):      Plik nagłówkowy biblioteki libxcrypt
52 License:        LGPL v2.1+
53 Group:          Development/Libraries
54 Requires:       %{name} = %{version}-%{release}
55
56 %description devel
57 This package contains the header file to develop software using
58 libxcrypt.
59
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
64 %package static
65 Summary:        Static libxcrypt library
66 Summary(pl.UTF-8):      Statyczna biblioteka libxcrypt
67 License:        LGPL v2.1+
68 Group:          Development/Libraries
69 Requires:       %{name}-devel = %{version}-%{release}
70
71 %description static
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.
77
78 %prep
79 %setup -q
80 %{!?with_default_crypt:%patch0 -p1}
81
82 %build
83 %{__libtoolize}
84 %{__aclocal}
85 %{__autoconf}
86 %{__autoheader}
87 %{__automake}
88 %configure \
89 %if %{with default_crypt}
90         --enable-obsolete-api=glibc \
91         --enable-obsolete-api-enosys=yes \
92 %else
93         --includedir=%{_includedir}/xcrypt \
94         --disable-xcrypt-compat-files \
95 %endif
96         --disable-werror
97 %{__make}
98
99 %install
100 rm -rf $RPM_BUILD_ROOT
101 install -d $RPM_BUILD_ROOT/%{_lib}
102
103 %{__make} install \
104         DESTDIR=$RPM_BUILD_ROOT
105
106 %{__mv} $RPM_BUILD_ROOT%{_libdir}/%{libname}.so.* $RPM_BUILD_ROOT/%{_lib}
107 ln -snf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/%{libname}.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/%{libname}.so
108
109 # obsoleted by pkg-config
110 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{libname}.la
111 # packaged with glibc-devel
112 %{!?with_default_crypt:%{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/crypt{,_r,_ra,_rn}.3*}
113
114 %clean
115 rm -rf $RPM_BUILD_ROOT
116
117 %post   -p /sbin/ldconfig
118 %postun -p /sbin/ldconfig
119
120 %posttrans
121 if [ ! -L /%{_lib}/%{libname}.so.%{libver} ]; then
122         %{__rm} -f /%{_lib}/%{libname}.so.%{libver}
123         /sbin/ldconfig
124 fi
125
126 %files
127 %defattr(644,root,root,755)
128 %doc AUTHORS ChangeLog LICENSING NEWS README.md THANKS TODO.md
129 %attr(755,root,root) /%{_lib}/%{libname}.so.*.*.*
130 %attr(755,root,root) %ghost /%{_lib}/%{libname}.so.%{libver}
131
132 %files devel
133 %defattr(644,root,root,755)
134 %attr(755,root,root) %{_libdir}/%{libname}.so
135 %if %{with default_crypt}
136 %{_includedir}/crypt.h
137 %{_includedir}/xcrypt.h
138 %attr(755,root,root) %{_libdir}/libxcrypt.so
139 %else
140 %{_includedir}/xcrypt
141 %endif
142 %{_pkgconfigdir}/libcrypt.pc
143 %{_pkgconfigdir}/libxcrypt.pc
144 %{_mandir}/man3/crypt_checksalt.3*
145 %{_mandir}/man3/crypt_gensalt*.3*
146 %{_mandir}/man3/crypt_preferred_method.3*
147 %if %{with default_crypt}
148 %{_mandir}/man3/crypt.3*
149 %{_mandir}/man3/crypt_r.3*
150 %{_mandir}/man3/crypt_ra.3*
151 %{_mandir}/man3/crypt_rn.3*
152 %endif
153 %{_mandir}/man5/crypt.5*
154
155 %files static
156 %defattr(644,root,root,755)
157 %{_libdir}/%{libname}.a
158 %if %{with default_crypt}
159 %{_libdir}/libxcrypt.a
160 %endif
This page took 0.075565 seconds and 2 git commands to generate.