]> git.pld-linux.org Git - packages/cryptopp.git/blob - cryptopp.spec
- updated to 8.9.0
[packages/cryptopp.git] / cryptopp.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # testing
4 %bcond_with     sse2    # SSE2 instructions
5
6 %ifarch pentium4 %{x8664} x32
7 %define with_sse2       1
8 %endif
9
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
12 Name:           cryptopp
13 Version:        8.9.0
14 %define tag_ver %(echo %{version} | tr . _)
15 Release:        1
16 License:        Boost v1.0 (BSD-like)
17 Group:          Libraries
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
21 Source1:        %{name}.pc
22 URL:            https://cryptopp.com/
23 BuildRequires:  libstdc++-devel
24 BuildRequires:  unzip
25 %{?with_sse2:Requires:  cpuinfo(sse2)}
26 Obsoletes:      cryptopp-progs < 5.6
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 Cryptopp Library is a free C++ class library of cryptographic schemes.
31
32 %description -l pl.UTF-8
33 Cryptopp jest biblioteką klas C++ dostarczającą narzędzia do
34 kryptografii.
35
36 %package devel
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}
41
42 %description devel
43 Files for development of applications which will use Cryptopp.
44
45 %description devel -l pl.UTF-8
46 Pliki do tworzenia aplikacji używających Cryptopp.
47
48 %package static
49 Summary:        Static Cryptopp library
50 Summary(pl.UTF-8):      Statyczna biblioteka Cryptopp
51 Group:          Development/Libraries
52 Requires:       %{name}-devel = %{version}-%{release}
53
54 %description static
55 Static Cryptopp library.
56
57 %description static -l pl.UTF-8
58 Statyczna biblioteka Cryptopp.
59
60 %prep
61 %setup -q -n %{name}-CRYPTOPP_%{tag_ver}
62
63 %build
64 CXXFLAGS="%{rpmcxxflags} %{!?with_sse2:-DCRYPTOPP_DISABLE_SSE2} %{?with_sse2:-msse2}" \
65 %{__make} shared static %{?with_tests:cryptest.exe} \
66         CXX="%{__cxx}"
67
68 %if %{with tests}
69 %{__make} test
70 %endif
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74
75 %{__make} install \
76         DESTDIR=$RPM_BUILD_ROOT \
77         PREFIX=%{_prefix} \
78         LIBDIR=%{_libdir}
79
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
87 # tests
88 %{__rm} $RPM_BUILD_ROOT%{_bindir}/cryptest.exe
89 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/cryptopp/Test{Data,Vectors}
90
91 %clean
92 rm -rf $RPM_BUILD_ROOT
93
94 %post   -p /sbin/ldconfig
95 %postun -p /sbin/ldconfig
96
97 %triggerpostun -- cryptopp < 5.6.5
98 rm -f %{_libdir}/libcryptopp.so.5.6
99 /sbin/ldconfig
100
101 %files
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
106
107 %files devel
108 %defattr(644,root,root,755)
109 %attr(755,root,root) %{_libdir}/libcryptopp.so
110 %{_includedir}/cryptopp
111 %{_pkgconfigdir}/cryptopp.pc
112
113 %files static
114 %defattr(644,root,root,755)
115 %{_libdir}/libcryptopp.a
This page took 0.088624 seconds and 4 git commands to generate.