!2 update to version 8.6.0

From: @leeffo 
Reviewed-by: @zhujianwei001 
Signed-off-by: @zhujianwei001
This commit is contained in:
openeuler-ci-bot 2022-08-19 06:58:54 +00:00 committed by Gitee
commit 5f115b2a95
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 110 additions and 57 deletions

13
cryptopp.pc Normal file
View File

@ -0,0 +1,13 @@
prefix=@PREFIX@
exec_prefix=@PREFIX@
libdir=@LIBDIR@
Name: Crypto++
Description: A free C++ class library of cryptographic schemes
Version: @VERSION@
URL: http://www.cryptopp.com
Requires:
Conflicts:
Libs: -lcryptopp
Libs.private:
Cflags:

View File

@ -1,87 +1,127 @@
%global _version CRYPTOPP_8_2_0 %define _lto_cflags %{nil}
Name: cryptopp
Version: 8.2.0
Release: 1
Summary: Crypto++ Library is a free C++ class library of cryptographic schemes
License: BSL-1.0 Name: cryptopp
Version: 8.6.0
Release: 1
Summary: C++ class library of cryptographic schemes
License: Boost
URL: http://www.cryptopp.com/
Source0: http://www.cryptopp.com/cryptopp860.zip
Source1: cryptopp.pc
URL: https://www.cryptopp.com/ BuildRequires: doxygen
Source0: https://github.com/weidai11/cryptopp/archive/%{_version}.tar.gz BuildRequires: gcc-c++
# %ifarch i686 x86_64
# BuildRequires: nasm
# %endif
BuildRequires: make
# Obsoletes pycryptopp to avoid breaking upgrades
Obsoletes: pycryptopp < 0.7
Provides: pycryptopp = 0.7
BuildRequires: gcc make
%description %description
Crypto++ Library is a free C++ class library of cryptographic schemes. Crypto++ Library is a free C++ class library of cryptographic schemes.
The Crypto++ library was orginally written by Wei Dai. The library is now maintained by several team members and the community. See http://www.cryptopp.com/ for a list of supported algorithms.
Currently the library contains algorithms like AES, RSA, MD5 etc..
One purpose of Crypto++ is to act as a repository of public domain
(not copyrighted) source code. Although the library is copyrighted as a
compilation, the individual files in it are in the public domain.
%package devel %package devel
Summary: Development files for %{name} Summary: Header files and development documentation for %{name}
Requires: %{name} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel %description devel
This package contains the header files and libraries for developing with %{name}. Crypto++ Library is a free C++ class library of cryptographic schemes.
This package contains the header files and development documentation
for %{name}.
%package doc
Summary: Documentation for %{name}
BuildArch: noarch
%description doc
Crypto++ Library is a free C++ class library of cryptographic schemes.
This package contains documentation for %{name}.
%package progs
Summary: Programs for manipulating %{name} routines
Requires: %{name}%{?_isa} = %{version}-%{release}
%description progs
Crypto++ Library is a free C++ class library of cryptographic schemes.
This package contains programs for manipulating %{name} routines.
%prep %prep
%autosetup -n %{name}-%{_version} %autosetup -c -p1
perl -pi -e 's/\r$//g' License.txt Readme.txt
%build %build
%make_build # %ifarch i686 x86_64
# ./rdrand-nasm.sh
# %endif
%{set_build_flags}
%make_build -f GNUmakefile \
ZOPT='' \
shared cryptest.exe
doxygen
%install %install
# doc %make_install INSTALL="install -p -c " PREFIX="%{_prefix}" LIBDIR="%{_libdir}"
mkdir -p %{buildroot}%{_datadir}/%{name}-%{version}/TestData
mkdir -p %{buildroot}%{_datadir}/%{name}-%{version}/TestVectors
cp -a %{_builddir}/%{name}-%{_version}/TestData/*.dat %{buildroot}%{_datadir}/%{name}-%{version}/TestData
cp -a %{_builddir}/%{name}-%{_version}/TestVectors/*.txt %{buildroot}%{_datadir}/%{name}-%{version}/TestVectors
# lib file # Install the pkg-config file
mkdir -p %{buildroot}/%{_libdir} install -D -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_libdir}/pkgconfig/cryptopp.pc
cp -a %{_builddir}/%{name}-%{_version}/libcryptopp.a %{buildroot}%{_libdir}/libcryptopp-%{version}.a # Fill in the variables
sed -i "s|@PREFIX@|%{_prefix}|g" $RPM_BUILD_ROOT%{_libdir}/pkgconfig/cryptopp.pc
sed -i "s|@LIBDIR@|%{_libdir}|g" $RPM_BUILD_ROOT%{_libdir}/pkgconfig/cryptopp.pc
sed -i "s|@VERSION@|%{version}}|g" $RPM_BUILD_ROOT%{_libdir}/pkgconfig/cryptopp.pc
# include file mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/TestVectors
mkdir -p %{buildroot}/%{_includedir}/%{name} mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/TestData
cp -a %{_builddir}/%{name}-%{_version}/*.h %{buildroot}/%{_includedir}/%{name} install -m644 TestVectors/* $RPM_BUILD_ROOT%{_datadir}/%{name}/TestVectors
install -m644 TestData/* $RPM_BUILD_ROOT%{_datadir}/%{name}/TestData
# executable file # Rename cryptest
mkdir -p %{buildroot}/%{_bindir} mv $RPM_BUILD_ROOT%{_bindir}/cryptest.exe \
cp -a %{_builddir}/%{name}-%{_version}/cryptest.exe %{buildroot}%{_bindir} $RPM_BUILD_ROOT%{_bindir}/cryptest
%clean # Remove static lib
rm -rf %{buildroot} rm %{buildroot}%{_libdir}/libcryptopp.a
%check
./cryptest.exe v
%ldconfig_scriptlets
%files %files
%defattr(0644,root,root,0644) %{_libdir}/libcryptopp.so.8*
%doc History.txt Install.txt Readme.txt %doc Readme.txt
%license License.txt %license License.txt
%{_datadir}/%{name}-%{version}/TestData/*.dat
%{_datadir}/%{name}-%{version}/TestVectors/*.txt
%attr(0755,root,root) %{_bindir}/cryptest.exe
%files devel %files devel
%defattr(0644,root,root,0644) %{_includedir}/cryptopp
%{_libdir}/*.a %{_libdir}/libcryptopp.so
%{_includedir}/%{name}/*.h %{_libdir}/pkgconfig/cryptopp.pc
%post devel %files doc
ln -s %{_libdir}/libcryptopp-%{version}.a %{_libdir}/libcryptopp.a %license License.txt
%doc html-docs/*
%postun devel %files progs
if [ -h %{_libdir}/libcryptopp.a ]; then %{_bindir}/cryptest
rm -f %{_libdir}/libcryptopp.a %{_datadir}/%{name}
fi
if [ -d %{_includedir}/%{name} ]; then
rm -rf %{_includedir}/%{name}
fi
%postun
if [ -d %{_datadir}/%{name}-%{version} ]; then
rm -rf %{_datadir}/%{name}-%{version}
fi
%changelog %changelog
* Thu Sep 10 2020 <liurenxu@talkweb.com.cn> * Fri Jul 29 2022 liweiganga <liweiganga@uniontech.com> - 8.6.0-1
- update to 8.6.0
* Thu Sep 10 2020 liurenxu <liurenxu@talkweb.com.cn> - 8.2.0-1
- Package init - Package init