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