]>
Commit | Line | Data |
---|---|---|
a01c2c55 | 1 | # |
db595231 | 2 | # Conditional build: |
9ef5f45c | 3 | %bcond_with dietlibc # don't build static dietlibc library |
ffb9394c | 4 | %bcond_with libcap # Linux capabilities usage |
fd9ca9a8 | 5 | # |
4ecd37fd | 6 | Summary: Cryptographic library based on the code from GnuPG |
20b5cab2 ER |
7 | Summary(es.UTF-8): Libgcrypt es una biblioteca general de desarrole embasada em GnuPG |
8 | Summary(pl.UTF-8): Biblioteka kryptograficzna oparta na kodzie GnuPG | |
9 | Summary(pt_BR.UTF-8): libgcrypt é uma biblioteca de criptografia de uso geral baseada no GnuPG | |
4ecd37fd | 10 | Name: libgcrypt |
099faaf4 | 11 | Version: 1.9.0 |
f8778084 | 12 | Release: 1 |
3804524e | 13 | License: LGPL v2.1+ |
4ecd37fd | 14 | Group: Libraries |
44126e3c | 15 | Source0: ftp://ftp.gnupg.org/gcrypt/libgcrypt/%{name}-%{version}.tar.bz2 |
099faaf4 | 16 | # Source0-md5: 5ef99d1838092bc15c0ddafb22830a02 |
3804524e | 17 | Patch0: %{name}-info.patch |
25369dba | 18 | Patch1: %{name}-libgcrypt_config.patch |
37929a93 | 19 | Patch2: %{name}-poll.patch |
099faaf4 | 20 | Patch3: kdf-selftest.patch |
27a21139 | 21 | URL: https://directory.fsf.org/wiki/Libgcrypt |
53fa4918 | 22 | BuildRequires: autoconf >= 2.60 |
25454cff | 23 | BuildRequires: automake >= 1:1.14 |
9b03de5c | 24 | BuildRequires: binutils >= 2:2.12 |
393f4c30 | 25 | %{?with_dietlibc:BuildRequires: dietlibc-static >= 2:0.31-5} |
3c1a6646 | 26 | BuildRequires: gcc >= 5:3.2 |
9f887196 | 27 | %{?with_libcap:BuildRequires: libcap-devel} |
099faaf4 | 28 | BuildRequires: libgpg-error-devel >= 1.27 |
37929a93 | 29 | BuildRequires: libtool >= 2:2.2.6 |
7d8f3174 | 30 | BuildRequires: texinfo |
099faaf4 | 31 | Requires: libgpg-error >= 1.27 |
4ecd37fd GS |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
33 | ||
393f4c30 JR |
34 | # for some reason known only to rpm there must be "\\|" not "\|" here |
35 | %define dietarch %(echo %{_target_cpu} | sed -e 's/i.86\\|pentium.\\|athlon/i386/;s/amd64/x86_64/;s/armv.*/arm/') | |
36 | %define dietlibdir %{_prefix}/lib/dietlibc/lib-%{dietarch} | |
37 | ||
4ecd37fd GS |
38 | %description |
39 | This is a general purpose cryptographic library based on the code from | |
40 | GnuPG. It provides functions for all cryptograhic building blocks: | |
a7d3a772 | 41 | symmetric ciphers (AES, DES, Blowfish, CAST5, Twofish, Arcfour), hash |
4ecd37fd GS |
42 | algorithms (MD5, RIPE-MD160, SHA-1, TIGER-192), MACs (HMAC for all |
43 | hash algorithms), public key algorithms (RSA, ElGamal, DSA), large | |
44 | integer functions, random numbers and a lot of supporting functions. | |
45 | ||
b50b58a0 | 46 | %description -l pl.UTF-8 |
3535d24f | 47 | Ten pakiet zawiera bibliotekę kryptograficzną ogólnego przeznaczenia, |
48 | opartą na kodzie GnuPG. Biblioteka ta dostarcza funkcje do wszystkich | |
49 | podstawowych bloków kryptografii: szyfrów symetrycznych (AES, DES, | |
50 | Blowfish, CAST5, Twofish, Acrfour), algorytmów mieszających (MD5, | |
51 | RIPE-MD160, SHA-1, RIGER-192), MAC-ów (HMAC dla wszystkich algorytmów | |
52 | mieszających), algorytmów klucza publicznego (RSA, ElGamal, DSA), | |
53 | funkcji dużych liczb całkowitych, liczb losowych i wiele funkcji | |
54 | pomocniczych. | |
a7d3a772 | 55 | |
b50b58a0 JR |
56 | %description -l pt_BR.UTF-8 |
57 | Libgcrypt é uma biblioteca de criptografia de uso geral baseada no | |
7d8f3174 | 58 | GnuPG. |
59 | ||
f5cdaef6 | 60 | %package tools |
f8778084 ŁK |
61 | Summary: Additional binary tools for libgcrypt |
62 | Summary(pl.UTF-8): Dodatkowe narzędzia dla biblioteki libgcrypt | |
63 | Group: Development/Libraries | |
64 | Requires: %{name} = %{version}-%{release} | |
f5cdaef6 ŁM |
65 | |
66 | %description tools | |
335309d0 JB |
67 | Additional binary tools for libgcrypt. |
68 | ||
69 | %description tools -l pl.UTF-8 | |
70 | Dodatkowe narzędzia dla biblioteki libgcrypt. | |
f5cdaef6 | 71 | |
4ecd37fd GS |
72 | %package devel |
73 | Summary: Header files etc to develop libgcrypt applications | |
20b5cab2 ER |
74 | Summary(es.UTF-8): Archivos de desarrollo de libgcrypt |
75 | Summary(pl.UTF-8): Pliki nagłówkowe i inne do libgcrypt | |
76 | Summary(pt_BR.UTF-8): Arquivos de desenvolvimento da libgcrypt | |
4ecd37fd | 77 | Group: Development/Libraries |
01efb238 | 78 | Requires: %{name} = %{version}-%{release} |
9f887196 | 79 | %{?with_libcap:Requires: libcap-devel} |
e7d29211 | 80 | Requires: libgpg-error-devel >= 1.25 |
4ecd37fd GS |
81 | |
82 | %description devel | |
83 | Header files etc to develop libgcrypt applications. | |
84 | ||
b50b58a0 JR |
85 | %description devel -l pl.UTF-8 |
86 | Pliki nagłówkowe i inne do libgcrypt. | |
4ecd37fd | 87 | |
b50b58a0 | 88 | %description devel -l pt_BR.UTF-8 |
7d8f3174 | 89 | Bibliotecas de desenvolvimento para libgcrypt. |
90 | ||
cb76832e | 91 | %package static |
92 | Summary: Static libgcrypt library | |
20b5cab2 ER |
93 | Summary(es.UTF-8): Archivos de desarrollo de libgcrypt - estatico |
94 | Summary(pl.UTF-8): Biblioteka statyczna libgcrypt | |
95 | Summary(pt_BR.UTF-8): Arquivos de desenvolvimento da libgcrypt - biblioteca estática | |
cb76832e | 96 | Group: Development/Libraries |
01efb238 | 97 | Requires: %{name}-devel = %{version}-%{release} |
cb76832e | 98 | |
99 | %description static | |
100 | Static libgcrypt library. | |
101 | ||
b50b58a0 | 102 | %description static -l pl.UTF-8 |
cb76832e | 103 | Biblioteka statyczna libgcrypt. |
104 | ||
b50b58a0 JR |
105 | %description static -l pt_BR.UTF-8 |
106 | Bibliotecas de desenvolvimento para libgcrypt - estático. | |
7d8f3174 | 107 | |
393f4c30 JR |
108 | %package dietlibc |
109 | Summary: Static dietlibc libgcrypt library | |
110 | Summary(pl.UTF-8): Biblioteka statyczna dietlibc libgcrypt | |
111 | Group: Development/Libraries | |
112 | Requires: %{name}-devel = %{version}-%{release} | |
113 | ||
114 | %description dietlibc | |
115 | Static dietlibc libgcrypt library. | |
116 | ||
117 | %description dietlibc -l pl.UTF-8 | |
118 | Biblioteka statyczna dietlibc libgcrypt. | |
119 | ||
4ecd37fd GS |
120 | %prep |
121 | %setup -q | |
7d8f3174 | 122 | %patch0 -p1 |
123 | %patch1 -p1 | |
37929a93 | 124 | %patch2 -p1 |
099faaf4 | 125 | %patch3 -p1 |
4ecd37fd GS |
126 | |
127 | %build | |
25369dba | 128 | %{__rm} m4/libtool.m4 |
7d8f3174 | 129 | %{__libtoolize} |
16ad79d3 | 130 | %{__aclocal} -I m4 |
34926466 | 131 | %{__autoconf} |
01efb238 | 132 | %{__automake} |
393f4c30 JR |
133 | |
134 | %if %{with dietlibc} | |
cb76832e | 135 | %configure \ |
68508f33 | 136 | CC="diet %{__cc} %{rpmcflags} %{rpmldflags} -Os" \ |
db595231 | 137 | --enable-static \ |
393f4c30 JR |
138 | --disable-shared |
139 | ||
140 | # libtool sucks, build just the libs | |
37929a93 | 141 | %{__make} -C compat |
393f4c30 JR |
142 | %{__make} -C cipher |
143 | %{__make} -C mpi | |
144 | %{__make} -C random | |
c4b9e883 JB |
145 | %{__make} -C src \ |
146 | PROGRAMS= | |
393f4c30 JR |
147 | mv src/.libs/libgcrypt.a diet-libgcrypt.a |
148 | %{__make} clean | |
149 | %endif | |
150 | ||
151 | %configure \ | |
9f887196 JB |
152 | --enable-static \ |
153 | %{?with_libcap:--with-capabilities} | |
565dcb22 | 154 | |
4ecd37fd GS |
155 | %{__make} |
156 | ||
157 | %install | |
158 | rm -rf $RPM_BUILD_ROOT | |
393f4c30 | 159 | %{?with_dietlibc:install -d $RPM_BUILD_ROOT%{dietlibdir}} |
cb76832e | 160 | |
161 | %{__make} install \ | |
162 | DESTDIR=$RPM_BUILD_ROOT \ | |
163 | m4datadir=%{_aclocaldir} | |
4ecd37fd | 164 | |
4759a87d | 165 | install -d $RPM_BUILD_ROOT/%{_lib} |
3804524e JB |
166 | mv -f $RPM_BUILD_ROOT%{_libdir}/libgcrypt.so.* $RPM_BUILD_ROOT/%{_lib} |
167 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libgcrypt.so.*.*.*) \ | |
4759a87d JB |
168 | $RPM_BUILD_ROOT%{_libdir}/libgcrypt.so |
169 | ||
393f4c30 JR |
170 | %{?with_dietlibc:install diet-libgcrypt.a $RPM_BUILD_ROOT%{dietlibdir}/libgcrypt.a} |
171 | ||
4ecd37fd GS |
172 | %clean |
173 | rm -rf $RPM_BUILD_ROOT | |
174 | ||
a7d3a772 JB |
175 | %post -p /sbin/ldconfig |
176 | %postun -p /sbin/ldconfig | |
177 | ||
ca354e80 | 178 | %post devel -p /sbin/postshell |
75a5f44a | 179 | -/usr/sbin/fix-info-dir -c %{_infodir} |
7d8f3174 | 180 | |
ca354e80 | 181 | %postun devel -p /sbin/postshell |
75a5f44a | 182 | -/usr/sbin/fix-info-dir -c %{_infodir} |
7d8f3174 | 183 | |
4ecd37fd GS |
184 | %files |
185 | %defattr(644,root,root,755) | |
3804524e | 186 | %doc AUTHORS ChangeLog NEWS README THANKS TODO |
f5cdaef6 ŁM |
187 | %attr(755,root,root) /%{_lib}/libgcrypt.so.*.*.* |
188 | %attr(755,root,root) %ghost /%{_lib}/libgcrypt.so.20 | |
189 | ||
190 | %files tools | |
191 | %defattr(644,root,root,755) | |
ca354e80 JB |
192 | %attr(755,root,root) %{_bindir}/dumpsexp |
193 | %attr(755,root,root) %{_bindir}/hmac256 | |
c4b9e883 | 194 | %attr(755,root,root) %{_bindir}/mpicalc |
c4b9e883 | 195 | %{_mandir}/man1/hmac256.1* |
4ecd37fd GS |
196 | |
197 | %files devel | |
198 | %defattr(644,root,root,755) | |
35243943 | 199 | %attr(755,root,root) %{_bindir}/libgcrypt-config |
4759a87d JB |
200 | %attr(755,root,root) %{_libdir}/libgcrypt.so |
201 | %{_libdir}/libgcrypt.la | |
3804524e | 202 | %{_includedir}/gcrypt*.h |
a890b62b | 203 | %{_pkgconfigdir}/libgcrypt.pc |
3804524e | 204 | %{_aclocaldir}/libgcrypt.m4 |
a890b62b | 205 | %{_infodir}/gcrypt.info* |
cb76832e | 206 | |
207 | %files static | |
208 | %defattr(644,root,root,755) | |
4759a87d | 209 | %{_libdir}/libgcrypt.a |
393f4c30 JR |
210 | |
211 | %if %{with dietlibc} | |
212 | %files dietlibc | |
213 | %defattr(644,root,root,755) | |
214 | %{dietlibdir}/libgcrypt.a | |
db595231 | 215 | %endif |