]>
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 | ||
472a31a8 | 10 | %define orig_ver 561 |
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 |
472a31a8 | 14 | Version: 5.6.1 |
dd9c76ee | 15 | Release: 4 |
4c7740b9 | 16 | License: BSD-like |
1e862315 | 17 | Group: Libraries |
4c7740b9 | 18 | Source0: http://downloads.sourceforge.net/cryptopp/%{name}%{orig_ver}.zip |
472a31a8 | 19 | # Source0-md5: 96cbeba0907562b077e26bcffb483828 |
dd9c76ee | 20 | Source1: %{name}.pc |
0114b496 | 21 | Patch0: %{name}-autotools.patch |
472a31a8 | 22 | Patch1: cxx.patch |
1e862315 | 23 | URL: http://www.cryptopp.com/ |
0114b496 | 24 | BuildRequires: autoconf |
25 | BuildRequires: automake | |
1e862315 | 26 | BuildRequires: libstdc++-devel |
4c7740b9 | 27 | BuildRequires: libtool >= 2:1.5 |
1e862315 | 28 | BuildRequires: unzip |
98033b6e | 29 | Obsoletes: cryptopp-progs |
ff61087a | 30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
32 | %description | |
33 | Cryptopp Library is a free C++ class library of cryptographic schemes. | |
34 | ||
92858504 | 35 | %description -l pl.UTF-8 |
4c7740b9 JB |
36 | Cryptopp jest biblioteką klas C++ dostarczającą narzędzia do |
37 | kryptografii. | |
ff61087a | 38 | |
39 | %package devel | |
1e862315 | 40 | Summary: Files for development of applications which will use Cryptopp |
e414df15 | 41 | Summary(pl.UTF-8): Pliki do tworzenia aplikacji używających Cryptopp |
1e862315 JB |
42 | Group: Development/Libraries |
43 | Requires: %{name} = %{version}-%{release} | |
ff61087a | 44 | |
45 | %description devel | |
1e862315 | 46 | Files for development of applications which will use Cryptopp. |
ff61087a | 47 | |
92858504 JR |
48 | %description devel -l pl.UTF-8 |
49 | Pliki do tworzenia aplikacji używających Cryptopp. | |
ff61087a | 50 | |
1e862315 JB |
51 | %package static |
52 | Summary: Static Cryptopp library | |
e414df15 | 53 | Summary(pl.UTF-8): Statyczna biblioteka Cryptopp |
1e862315 JB |
54 | Group: Development/Libraries |
55 | Requires: %{name}-devel = %{version}-%{release} | |
ff61087a | 56 | |
1e862315 JB |
57 | %description static |
58 | Static Cryptopp library. | |
ff61087a | 59 | |
92858504 | 60 | %description static -l pl.UTF-8 |
1e862315 | 61 | Statyczna biblioteka Cryptopp. |
ff61087a | 62 | |
ff61087a | 63 | %prep |
1e862315 | 64 | %setup -q -c |
0fcd268d | 65 | %patch0 -p1 |
472a31a8 | 66 | %patch1 -p0 |
ff61087a | 67 | |
68 | %build | |
0114b496 | 69 | %{__libtoolize} |
70 | %{__aclocal} | |
71 | %{__autoconf} | |
72 | %{__autoheader} | |
73 | %{__automake} | |
74 | ||
72a0958d JR |
75 | %if %{without asm} |
76 | CFLAGS="%{rpmcflags} -DCRYPTOPP_DISABLE_X86ASM" | |
77 | CXXFLAGS="%{rpmcxxflags} -DCRYPTOPP_DISABLE_X86ASM" | |
78 | %endif | |
4c7740b9 | 79 | %configure |
1efe63ff | 80 | %{__make} -j1 |
ff61087a | 81 | |
17888f8d | 82 | %if %{with tests} |
472a31a8 | 83 | ./cryptest v |
17888f8d | 84 | %endif |
472a31a8 | 85 | |
ff61087a | 86 | %install |
1e862315 | 87 | rm -rf $RPM_BUILD_ROOT |
472a31a8 | 88 | %{__make} install \ |
17888f8d | 89 | INSTALL="install -p -c " \ |
472a31a8 | 90 | DESTDIR=$RPM_BUILD_ROOT |
ff61087a | 91 | |
dd9c76ee ER |
92 | install -d $RPM_BUILD_ROOT%{_pkgconfigdir} |
93 | sed -e " | |
94 | s|@PREFIX@|%{_prefix}|g | |
95 | s|@LIBDIR@|%{_libdir}|g | |
96 | s|@VERSION@|%{version}|g | |
97 | " %{SOURCE1} > $RPM_BUILD_ROOT%{_pkgconfigdir}/cryptopp.pc | |
98 | ||
d0c3dcd5 ER |
99 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/cryptest |
100 | ||
ff61087a | 101 | %clean |
102 | rm -rf $RPM_BUILD_ROOT | |
103 | ||
1e862315 JB |
104 | %post -p /sbin/ldconfig |
105 | %postun -p /sbin/ldconfig | |
106 | ||
ff61087a | 107 | %files |
1e862315 | 108 | %defattr(644,root,root,755) |
ff61087a | 109 | %doc License.txt Readme.txt |
1e862315 | 110 | %attr(755,root,root) %{_libdir}/libcryptopp.so.*.*.* |
4c7740b9 | 111 | %attr(755,root,root) %ghost %{_libdir}/libcryptopp.so.4 |
ff61087a | 112 | |
113 | %files devel | |
1e862315 | 114 | %defattr(644,root,root,755) |
6081e9d5 | 115 | %attr(755,root,root) %{_libdir}/libcryptopp.so |
4c7740b9 JB |
116 | %{_libdir}/libcryptopp.la |
117 | %{_includedir}/cryptopp | |
dd9c76ee | 118 | %{_pkgconfigdir}/cryptopp.pc |
1e862315 JB |
119 | |
120 | %files static | |
121 | %defattr(644,root,root,755) | |
122 | %{_libdir}/libcryptopp.a |