]>
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 |
8b3e8dd0 | 11 | Version: 1.8.6 |
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 |
8b3e8dd0 | 16 | # Source0-md5: e9dfc1e789a2a42f36917c543fcd7862 |
3804524e | 17 | Patch0: %{name}-info.patch |
25369dba | 18 | Patch1: %{name}-libgcrypt_config.patch |
37929a93 | 19 | Patch2: %{name}-poll.patch |
f2c0caad | 20 | URL: http://directory.fsf.org/wiki/Libgcrypt |
53fa4918 | 21 | BuildRequires: autoconf >= 2.60 |
25454cff | 22 | BuildRequires: automake >= 1:1.14 |
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} |
e7d29211 | 27 | BuildRequires: libgpg-error-devel >= 1.25 |
37929a93 | 28 | BuildRequires: libtool >= 2:2.2.6 |
7d8f3174 | 29 | BuildRequires: texinfo |
e7d29211 | 30 | Requires: libgpg-error >= 1.25 |
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 | ||
f5cdaef6 | 59 | %package tools |
f8778084 ŁK |
60 | Summary: Additional binary tools for libgcrypt |
61 | Summary(pl.UTF-8): Dodatkowe narzędzia dla biblioteki libgcrypt | |
62 | Group: Development/Libraries | |
63 | Requires: %{name} = %{version}-%{release} | |
f5cdaef6 ŁM |
64 | |
65 | %description tools | |
335309d0 JB |
66 | Additional binary tools for libgcrypt. |
67 | ||
68 | %description tools -l pl.UTF-8 | |
69 | Dodatkowe narzędzia dla biblioteki libgcrypt. | |
f5cdaef6 | 70 | |
4ecd37fd GS |
71 | %package devel |
72 | Summary: Header files etc to develop libgcrypt applications | |
20b5cab2 ER |
73 | Summary(es.UTF-8): Archivos de desarrollo de libgcrypt |
74 | Summary(pl.UTF-8): Pliki nagłówkowe i inne do libgcrypt | |
75 | Summary(pt_BR.UTF-8): Arquivos de desenvolvimento da libgcrypt | |
4ecd37fd | 76 | Group: Development/Libraries |
01efb238 | 77 | Requires: %{name} = %{version}-%{release} |
9f887196 | 78 | %{?with_libcap:Requires: libcap-devel} |
e7d29211 | 79 | Requires: libgpg-error-devel >= 1.25 |
4ecd37fd GS |
80 | |
81 | %description devel | |
82 | Header files etc to develop libgcrypt applications. | |
83 | ||
b50b58a0 JR |
84 | %description devel -l pl.UTF-8 |
85 | Pliki nagłówkowe i inne do libgcrypt. | |
4ecd37fd | 86 | |
b50b58a0 | 87 | %description devel -l pt_BR.UTF-8 |
7d8f3174 | 88 | Bibliotecas de desenvolvimento para libgcrypt. |
89 | ||
cb76832e | 90 | %package static |
91 | Summary: Static libgcrypt library | |
20b5cab2 ER |
92 | Summary(es.UTF-8): Archivos de desarrollo de libgcrypt - estatico |
93 | Summary(pl.UTF-8): Biblioteka statyczna libgcrypt | |
94 | Summary(pt_BR.UTF-8): Arquivos de desenvolvimento da libgcrypt - biblioteca estática | |
cb76832e | 95 | Group: Development/Libraries |
01efb238 | 96 | Requires: %{name}-devel = %{version}-%{release} |
cb76832e | 97 | |
98 | %description static | |
99 | Static libgcrypt library. | |
100 | ||
b50b58a0 | 101 | %description static -l pl.UTF-8 |
cb76832e | 102 | Biblioteka statyczna libgcrypt. |
103 | ||
b50b58a0 JR |
104 | %description static -l pt_BR.UTF-8 |
105 | Bibliotecas de desenvolvimento para libgcrypt - estático. | |
7d8f3174 | 106 | |
393f4c30 JR |
107 | %package dietlibc |
108 | Summary: Static dietlibc libgcrypt library | |
109 | Summary(pl.UTF-8): Biblioteka statyczna dietlibc libgcrypt | |
110 | Group: Development/Libraries | |
111 | Requires: %{name}-devel = %{version}-%{release} | |
112 | ||
113 | %description dietlibc | |
114 | Static dietlibc libgcrypt library. | |
115 | ||
116 | %description dietlibc -l pl.UTF-8 | |
117 | Biblioteka statyczna dietlibc libgcrypt. | |
118 | ||
4ecd37fd GS |
119 | %prep |
120 | %setup -q | |
7d8f3174 | 121 | %patch0 -p1 |
122 | %patch1 -p1 | |
37929a93 | 123 | %patch2 -p1 |
4ecd37fd GS |
124 | |
125 | %build | |
25369dba | 126 | %{__rm} m4/libtool.m4 |
7d8f3174 | 127 | %{__libtoolize} |
16ad79d3 | 128 | %{__aclocal} -I m4 |
34926466 | 129 | %{__autoconf} |
01efb238 | 130 | %{__automake} |
393f4c30 JR |
131 | |
132 | %if %{with dietlibc} | |
cb76832e | 133 | %configure \ |
68508f33 | 134 | CC="diet %{__cc} %{rpmcflags} %{rpmldflags} -Os" \ |
db595231 | 135 | --enable-static \ |
393f4c30 JR |
136 | --disable-shared |
137 | ||
138 | # libtool sucks, build just the libs | |
37929a93 | 139 | %{__make} -C compat |
393f4c30 JR |
140 | %{__make} -C cipher |
141 | %{__make} -C mpi | |
142 | %{__make} -C random | |
c4b9e883 JB |
143 | %{__make} -C src \ |
144 | PROGRAMS= | |
393f4c30 JR |
145 | mv src/.libs/libgcrypt.a diet-libgcrypt.a |
146 | %{__make} clean | |
147 | %endif | |
148 | ||
149 | %configure \ | |
9f887196 JB |
150 | --enable-static \ |
151 | %{?with_libcap:--with-capabilities} | |
565dcb22 | 152 | |
4ecd37fd GS |
153 | %{__make} |
154 | ||
155 | %install | |
156 | rm -rf $RPM_BUILD_ROOT | |
393f4c30 | 157 | %{?with_dietlibc:install -d $RPM_BUILD_ROOT%{dietlibdir}} |
cb76832e | 158 | |
159 | %{__make} install \ | |
160 | DESTDIR=$RPM_BUILD_ROOT \ | |
161 | m4datadir=%{_aclocaldir} | |
4ecd37fd | 162 | |
4759a87d | 163 | install -d $RPM_BUILD_ROOT/%{_lib} |
3804524e JB |
164 | mv -f $RPM_BUILD_ROOT%{_libdir}/libgcrypt.so.* $RPM_BUILD_ROOT/%{_lib} |
165 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libgcrypt.so.*.*.*) \ | |
4759a87d JB |
166 | $RPM_BUILD_ROOT%{_libdir}/libgcrypt.so |
167 | ||
393f4c30 JR |
168 | %{?with_dietlibc:install diet-libgcrypt.a $RPM_BUILD_ROOT%{dietlibdir}/libgcrypt.a} |
169 | ||
4ecd37fd GS |
170 | %clean |
171 | rm -rf $RPM_BUILD_ROOT | |
172 | ||
a7d3a772 JB |
173 | %post -p /sbin/ldconfig |
174 | %postun -p /sbin/ldconfig | |
175 | ||
ca354e80 | 176 | %post devel -p /sbin/postshell |
75a5f44a | 177 | -/usr/sbin/fix-info-dir -c %{_infodir} |
7d8f3174 | 178 | |
ca354e80 | 179 | %postun devel -p /sbin/postshell |
75a5f44a | 180 | -/usr/sbin/fix-info-dir -c %{_infodir} |
7d8f3174 | 181 | |
4ecd37fd GS |
182 | %files |
183 | %defattr(644,root,root,755) | |
3804524e | 184 | %doc AUTHORS ChangeLog NEWS README THANKS TODO |
f5cdaef6 ŁM |
185 | %attr(755,root,root) /%{_lib}/libgcrypt.so.*.*.* |
186 | %attr(755,root,root) %ghost /%{_lib}/libgcrypt.so.20 | |
187 | ||
188 | %files tools | |
189 | %defattr(644,root,root,755) | |
ca354e80 JB |
190 | %attr(755,root,root) %{_bindir}/dumpsexp |
191 | %attr(755,root,root) %{_bindir}/hmac256 | |
c4b9e883 | 192 | %attr(755,root,root) %{_bindir}/mpicalc |
c4b9e883 | 193 | %{_mandir}/man1/hmac256.1* |
4ecd37fd GS |
194 | |
195 | %files devel | |
196 | %defattr(644,root,root,755) | |
35243943 | 197 | %attr(755,root,root) %{_bindir}/libgcrypt-config |
4759a87d JB |
198 | %attr(755,root,root) %{_libdir}/libgcrypt.so |
199 | %{_libdir}/libgcrypt.la | |
3804524e | 200 | %{_includedir}/gcrypt*.h |
a890b62b | 201 | %{_pkgconfigdir}/libgcrypt.pc |
3804524e | 202 | %{_aclocaldir}/libgcrypt.m4 |
a890b62b | 203 | %{_infodir}/gcrypt.info* |
cb76832e | 204 | |
205 | %files static | |
206 | %defattr(644,root,root,755) | |
4759a87d | 207 | %{_libdir}/libgcrypt.a |
393f4c30 JR |
208 | |
209 | %if %{with dietlibc} | |
210 | %files dietlibc | |
211 | %defattr(644,root,root,755) | |
212 | %{dietlibdir}/libgcrypt.a | |
db595231 | 213 | %endif |