]> git.pld-linux.org Git - packages/cryptopp.git/blob - cryptopp.spec
- updated to 8.2.0
[packages/cryptopp.git] / cryptopp.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 Summary:        Cryptopp Library - a free C++ class library of cryptographic schemes
6 Summary(pl.UTF-8):      Cryptopp - biblioteka klas C++ dostarczająca narzędzia do kryptografii
7 Name:           cryptopp
8 Version:        8.2.0
9 %define tag_ver %(echo %{version} | tr . _)
10 Release:        1
11 License:        Boost v1.0 (BSD-like)
12 Group:          Libraries
13 #Source0Download: https://github.com/weidai11/cryptopp/releases
14 Source0:        https://github.com/weidai11/cryptopp/archive/CRYPTOPP_%{tag_ver}/%{name}-%{tag_ver}.tar.gz
15 # Source0-md5:  5bc45a6047132f49dbff9261e5ca0fac
16 Source1:        %{name}.pc
17 URL:            http://www.cryptopp.com/
18 BuildRequires:  libstdc++-devel
19 BuildRequires:  unzip
20 Obsoletes:      cryptopp-progs
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
26 %description -l pl.UTF-8
27 Cryptopp jest biblioteką klas C++ dostarczającą narzędzia do
28 kryptografii.
29
30 %package devel
31 Summary:        Files for development of applications which will use Cryptopp
32 Summary(pl.UTF-8):      Pliki do tworzenia aplikacji używających Cryptopp
33 Group:          Development/Libraries
34 Requires:       %{name} = %{version}-%{release}
35
36 %description devel
37 Files for development of applications which will use Cryptopp.
38
39 %description devel -l pl.UTF-8
40 Pliki do tworzenia aplikacji używających Cryptopp.
41
42 %package static
43 Summary:        Static Cryptopp library
44 Summary(pl.UTF-8):      Statyczna biblioteka Cryptopp
45 Group:          Development/Libraries
46 Requires:       %{name}-devel = %{version}-%{release}
47
48 %description static
49 Static Cryptopp library.
50
51 %description static -l pl.UTF-8
52 Statyczna biblioteka Cryptopp.
53
54 %prep
55 %setup -q -n %{name}-CRYPTOPP_%{tag_ver}
56
57 %build
58 CXXFLAGS="%{rpmcxxflags}" \
59 %{__make} shared static %{?with_tests:cryptest.exe} \
60         CXX="%{__cxx}"
61
62 %if %{with tests}
63 %{__make} test
64 %endif
65
66 %install
67 rm -rf $RPM_BUILD_ROOT
68
69 %{__make} install \
70         DESTDIR=$RPM_BUILD_ROOT \
71         PREFIX=%{_prefix} \
72         LIBDIR=%{_libdir}
73
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
81 # tests
82 %{__rm} $RPM_BUILD_ROOT%{_bindir}/cryptest.exe
83 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/cryptopp/Test{Data,Vectors}
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %post   -p /sbin/ldconfig
89 %postun -p /sbin/ldconfig
90
91 %triggerpostun -- cryptopp < 5.6.5
92 rm -f %{_libdir}/libcryptopp.so.5.6
93 /sbin/ldconfig
94
95 %files
96 %defattr(644,root,root,755)
97 %doc License.txt Readme.txt
98 %attr(755,root,root) %{_libdir}/libcryptopp.so.*.*.*
99 %attr(755,root,root) %ghost %{_libdir}/libcryptopp.so.8
100
101 %files devel
102 %defattr(644,root,root,755)
103 %attr(755,root,root) %{_libdir}/libcryptopp.so
104 %{_includedir}/cryptopp
105 %{_pkgconfigdir}/cryptopp.pc
106
107 %files static
108 %defattr(644,root,root,755)
109 %{_libdir}/libcryptopp.a
This page took 0.073203 seconds and 3 git commands to generate.