3 %bcond_without tests # testing
4 %bcond_with sse2 # SSE2 instructions
6 %ifarch pentium4 %{x8664} x32
10 Summary: Cryptopp Library - a free C++ class library of cryptographic schemes
11 Summary(pl.UTF-8): Cryptopp - biblioteka klas C++ dostarczająca narzędzia do kryptografii
14 %define tag_ver %(echo %{version} | tr . _)
16 License: Boost v1.0 (BSD-like)
18 #Source0Download: https://github.com/weidai11/cryptopp/releases
19 Source0: https://github.com/weidai11/cryptopp/archive/CRYPTOPP_%{tag_ver}/%{name}-%{tag_ver}.tar.gz
20 # Source0-md5: 56f8ce6f2e052bd4b0129a04f38f2a0b
22 URL: https://cryptopp.com/
23 BuildRequires: libstdc++-devel
25 %{?with_sse2:Requires: cpuinfo(sse2)}
26 Obsoletes: cryptopp-progs < 5.6
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 Cryptopp Library is a free C++ class library of cryptographic schemes.
32 %description -l pl.UTF-8
33 Cryptopp jest biblioteką klas C++ dostarczającą narzędzia do
37 Summary: Files for development of applications which will use Cryptopp
38 Summary(pl.UTF-8): Pliki do tworzenia aplikacji używających Cryptopp
39 Group: Development/Libraries
40 Requires: %{name} = %{version}-%{release}
43 Files for development of applications which will use Cryptopp.
45 %description devel -l pl.UTF-8
46 Pliki do tworzenia aplikacji używających Cryptopp.
49 Summary: Static Cryptopp library
50 Summary(pl.UTF-8): Statyczna biblioteka Cryptopp
51 Group: Development/Libraries
52 Requires: %{name}-devel = %{version}-%{release}
55 Static Cryptopp library.
57 %description static -l pl.UTF-8
58 Statyczna biblioteka Cryptopp.
61 %setup -q -n %{name}-CRYPTOPP_%{tag_ver}
64 CXXFLAGS="%{rpmcxxflags} %{!?with_sse2:-DCRYPTOPP_DISABLE_SSE2} %{?with_sse2:-msse2}" \
65 %{__make} shared static %{?with_tests:cryptest.exe} \
73 rm -rf $RPM_BUILD_ROOT
76 DESTDIR=$RPM_BUILD_ROOT \
80 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
82 s|@PREFIX@|%{_prefix}|g
83 s|@LIBDIR@|%{_libdir}|g
84 s|@VERSION@|%{version}|g
85 " %{SOURCE1} > $RPM_BUILD_ROOT%{_pkgconfigdir}/cryptopp.pc
88 %{__rm} $RPM_BUILD_ROOT%{_bindir}/cryptest.exe
89 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/cryptopp/Test{Data,Vectors}
92 rm -rf $RPM_BUILD_ROOT
94 %post -p /sbin/ldconfig
95 %postun -p /sbin/ldconfig
97 %triggerpostun -- cryptopp < 5.6.5
98 rm -f %{_libdir}/libcryptopp.so.5.6
102 %defattr(644,root,root,755)
103 %doc License.txt Readme.txt
104 %attr(755,root,root) %{_libdir}/libcryptopp.so.*.*.*
105 %attr(755,root,root) %ghost %{_libdir}/libcryptopp.so.8
108 %defattr(644,root,root,755)
109 %attr(755,root,root) %{_libdir}/libcryptopp.so
110 %{_includedir}/cryptopp
111 %{_pkgconfigdir}/cryptopp.pc
114 %defattr(644,root,root,755)
115 %{_libdir}/libcryptopp.a