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