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