]>
Commit | Line | Data |
---|---|---|
72a0958d JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without asm # disable x86 assembly code | |
17888f8d ER |
4 | %bcond_without tests # build without tests |
5 | ||
e7868f1d | 6 | %define orig_ver 564 |
1e862315 | 7 | Summary: Cryptopp Library - a free C++ class library of cryptographic schemes |
6081e9d5 | 8 | Summary(pl.UTF-8): Cryptopp - biblioteka klas C++ dostarczająca narzędzia do kryptografii |
1e862315 | 9 | Name: cryptopp |
e7868f1d JB |
10 | Version: 5.6.4 |
11 | Release: 1 | |
12 | License: Boost v1.0 (BSD-like) | |
1e862315 | 13 | Group: Libraries |
4c7740b9 | 14 | Source0: http://downloads.sourceforge.net/cryptopp/%{name}%{orig_ver}.zip |
e7868f1d | 15 | # Source0-md5: 4ee7e5cdd4a45a14756c169eaf2a77fc |
dd9c76ee | 16 | Source1: %{name}.pc |
64f5fd71 | 17 | Patch0: %{name}-libdir.patch |
1e862315 | 18 | URL: http://www.cryptopp.com/ |
e7868f1d | 19 | BuildRequires: cmake >= 2.8.5 |
1e862315 JB |
20 | BuildRequires: libstdc++-devel |
21 | BuildRequires: unzip | |
98033b6e | 22 | Obsoletes: cryptopp-progs |
ff61087a | 23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
25 | %description | |
26 | Cryptopp Library is a free C++ class library of cryptographic schemes. | |
27 | ||
92858504 | 28 | %description -l pl.UTF-8 |
4c7740b9 JB |
29 | Cryptopp jest biblioteką klas C++ dostarczającą narzędzia do |
30 | kryptografii. | |
ff61087a | 31 | |
32 | %package devel | |
1e862315 | 33 | Summary: Files for development of applications which will use Cryptopp |
e414df15 | 34 | Summary(pl.UTF-8): Pliki do tworzenia aplikacji używających Cryptopp |
1e862315 JB |
35 | Group: Development/Libraries |
36 | Requires: %{name} = %{version}-%{release} | |
ff61087a | 37 | |
38 | %description devel | |
1e862315 | 39 | Files for development of applications which will use Cryptopp. |
ff61087a | 40 | |
92858504 JR |
41 | %description devel -l pl.UTF-8 |
42 | Pliki do tworzenia aplikacji używających Cryptopp. | |
ff61087a | 43 | |
1e862315 JB |
44 | %package static |
45 | Summary: Static Cryptopp library | |
e414df15 | 46 | Summary(pl.UTF-8): Statyczna biblioteka Cryptopp |
1e862315 JB |
47 | Group: Development/Libraries |
48 | Requires: %{name}-devel = %{version}-%{release} | |
ff61087a | 49 | |
1e862315 JB |
50 | %description static |
51 | Static Cryptopp library. | |
ff61087a | 52 | |
92858504 | 53 | %description static -l pl.UTF-8 |
1e862315 | 54 | Statyczna biblioteka Cryptopp. |
ff61087a | 55 | |
ff61087a | 56 | %prep |
1e862315 | 57 | %setup -q -c |
64f5fd71 | 58 | %patch0 -p1 |
ff61087a | 59 | |
60 | %build | |
e7868f1d JB |
61 | install -d build |
62 | cd build | |
63 | %cmake .. \ | |
64 | %{!?with_asm:-DDISABLE_ASM=ON} | |
65 | ||
66 | %{__make} | |
ff61087a | 67 | |
17888f8d | 68 | %if %{with tests} |
e7868f1d | 69 | ctest -V |
17888f8d | 70 | %endif |
472a31a8 | 71 | |
ff61087a | 72 | %install |
1e862315 | 73 | rm -rf $RPM_BUILD_ROOT |
e7868f1d JB |
74 | |
75 | %{__make} -C build install \ | |
472a31a8 | 76 | DESTDIR=$RPM_BUILD_ROOT |
ff61087a | 77 | |
dd9c76ee ER |
78 | install -d $RPM_BUILD_ROOT%{_pkgconfigdir} |
79 | sed -e " | |
80 | s|@PREFIX@|%{_prefix}|g | |
81 | s|@LIBDIR@|%{_libdir}|g | |
82 | s|@VERSION@|%{version}|g | |
83 | " %{SOURCE1} > $RPM_BUILD_ROOT%{_pkgconfigdir}/cryptopp.pc | |
84 | ||
e7868f1d JB |
85 | # tests |
86 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/cryptest.exe | |
87 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/cryptopp/Test{Data,Vectors} | |
d0c3dcd5 | 88 | |
ff61087a | 89 | %clean |
90 | rm -rf $RPM_BUILD_ROOT | |
91 | ||
1e862315 JB |
92 | %post -p /sbin/ldconfig |
93 | %postun -p /sbin/ldconfig | |
94 | ||
ff61087a | 95 | %files |
1e862315 | 96 | %defattr(644,root,root,755) |
ff61087a | 97 | %doc License.txt Readme.txt |
e7868f1d | 98 | %attr(755,root,root) %{_libdir}/libcryptopp.so.5.6 |
ff61087a | 99 | |
100 | %files devel | |
1e862315 | 101 | %defattr(644,root,root,755) |
6081e9d5 | 102 | %attr(755,root,root) %{_libdir}/libcryptopp.so |
4c7740b9 | 103 | %{_includedir}/cryptopp |
dd9c76ee | 104 | %{_pkgconfigdir}/cryptopp.pc |
e7868f1d | 105 | %{_libdir}/cmake/cryptopp |
1e862315 JB |
106 | |
107 | %files static | |
108 | %defattr(644,root,root,755) | |
109 | %{_libdir}/libcryptopp.a |