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