]>
Commit | Line | Data |
---|---|---|
9b363aa2 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without ltm # use LibTomMath for Math provider | |
4 | ||
105aa51b JB |
5 | Summary: LibTomCrypt - fairly comprehensive, modular and portable cryptographic toolkit |
6 | Summary(pl.UTF-8): LibTomCrypt - dość obszerna, modularna i przenośna biblioteka kryptograficzna | |
7 | Name: libtomcrypt | |
a1139c06 | 8 | Version: 1.18.2 |
78baa3c1 JB |
9 | Release: 1 |
10 | License: Public Domain or WTFPL v2 | |
105aa51b | 11 | Group: Libraries |
f855753b | 12 | #Source0Download: https://github.com/libtom/libtomcrypt/releases |
78baa3c1 | 13 | Source0: https://github.com/libtom/libtomcrypt/releases/download/v%{version}/crypt-%{version}.tar.xz |
a1139c06 | 14 | # Source0-md5: e8d22351b7c95bef423c1cd02dcf836d |
78baa3c1 JB |
15 | Patch0: %{name}-pc.patch |
16 | URL: http://www.libtom.net/LibTomCrypt/ | |
17 | %{?with_ltm:BuildRequires: libtommath-devel >= 1.0.1} | |
6ec01323 | 18 | BuildRequires: libtool >= 2:1.5 |
78baa3c1 JB |
19 | %{?with_ltm:BuildRequires: pkgconfig} |
20 | BuildRequires: tar >= 1:1.22 | |
21 | BuildRequires: xz | |
105aa51b JB |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23 | ||
24 | %description | |
25 | LibTomCrypt is a fairly comprehensive, modular and portable | |
26 | cryptographic toolkit that provides developers with a vast array of | |
27 | well known published block ciphers, one-way hash functions, chaining | |
28 | modes, pseudo-random number generators, public key cryptography and a | |
29 | plethora of other routines. | |
30 | ||
31 | %description -l pl.UTF-8 | |
32 | LibTomCrypt to dość obszerna, modularna i przenośna biblioteka | |
33 | kryptograficzna, zapewniająca programistom szeroki zbiór dobrze | |
34 | znanych szyfrów blokowych, jednokierunkowych funkcji haszujących, | |
35 | trybów łańcuchowych, generatorów liczb pseudolosowych, kryptografii | |
36 | klucza publicznego oraz wiele innych procedur. | |
37 | ||
38 | %package devel | |
39 | Summary: Header files for LibTomCrypt library | |
40 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki LibTomCrypt | |
41 | Group: Development/Libraries | |
42 | Requires: %{name} = %{version}-%{release} | |
1680eb3c | 43 | %{?with_ltm:Requires: libtommath-devel} |
105aa51b JB |
44 | |
45 | %description devel | |
46 | Header files for LibTomCrypt library. | |
47 | ||
48 | %description devel -l pl.UTF-8 | |
49 | Pliki nagłówkowe biblioteki LibTomCrypt. | |
50 | ||
51 | %package static | |
52 | Summary: Static LibTomCrypt library | |
53 | Summary(pl.UTF-8): Statyczna biblioteka LibTomCrypt | |
54 | Group: Development/Libraries | |
55 | Requires: %{name}-devel = %{version}-%{release} | |
1680eb3c | 56 | %{?with_ltm:Requires: libtommath-static} |
105aa51b JB |
57 | |
58 | %description static | |
59 | Static LibTomCrypt library. | |
60 | ||
61 | %description static -l pl.UTF-8 | |
62 | Statyczna biblioteka LibTomCrypt. | |
63 | ||
64 | %prep | |
65 | %setup -q | |
66 | %patch0 -p1 | |
67 | ||
68 | %build | |
78baa3c1 JB |
69 | # IGNORE_SPEED avoids overriding rpmcflags |
70 | CFLAGS="%{rpmcflags} %{?with_ltm:-DUSE_LTM -DLTM_DESC}" \ | |
105aa51b | 71 | %{__make} -f makefile.shared \ |
78baa3c1 JB |
72 | CC="%{__cc}" \ |
73 | IGNORE_SPEED=1 \ | |
105aa51b JB |
74 | LIBPATH=%{_libdir} |
75 | ||
76 | %install | |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | ||
79 | %{__make} -f makefile.shared install \ | |
80 | DESTDIR=$RPM_BUILD_ROOT \ | |
78baa3c1 JB |
81 | PREFIX=%{_prefix} \ |
82 | LIBPATH=%{_libdir} | |
105aa51b JB |
83 | |
84 | %clean | |
85 | rm -rf $RPM_BUILD_ROOT | |
86 | ||
87 | %post -p /sbin/ldconfig | |
88 | %postun -p /sbin/ldconfig | |
89 | ||
90 | %files | |
91 | %defattr(644,root,root,755) | |
78baa3c1 | 92 | %doc LICENSE README.md changes |
105aa51b | 93 | %attr(755,root,root) %{_libdir}/libtomcrypt.so.*.*.* |
78baa3c1 | 94 | %attr(755,root,root) %ghost %{_libdir}/libtomcrypt.so.1 |
105aa51b JB |
95 | |
96 | %files devel | |
97 | %defattr(644,root,root,755) | |
98 | %doc doc/crypt.pdf notes/*.txt | |
99 | %attr(755,root,root) %{_libdir}/libtomcrypt.so | |
105aa51b | 100 | %{_libdir}/libtomcrypt.la |
105aa51b | 101 | %{_includedir}/tomcrypt*.h |
78baa3c1 | 102 | %{_pkgconfigdir}/libtomcrypt.pc |
105aa51b JB |
103 | |
104 | %files static | |
105 | %defattr(644,root,root,755) | |
106 | %{_libdir}/libtomcrypt.a |