cryptopp/cryptopp.spec

131 lines
3.4 KiB
RPMSpec
Raw Normal View History

2022-07-29 15:20:26 +08:00
%define _lto_cflags %{nil}
2020-09-17 14:40:44 +08:00
2022-07-29 15:20:26 +08:00
Name: cryptopp
2023-08-22 15:25:05 +08:00
Version: 8.8.0
2022-07-29 15:20:26 +08:00
Release: 1
Summary: C++ class library of cryptographic schemes
License: Boost
URL: http://www.cryptopp.com/
2023-08-22 15:25:05 +08:00
Source0: http://www.cryptopp.com/cryptopp880.zip
2022-07-29 15:20:26 +08:00
Source1: cryptopp.pc
2023-08-22 15:25:05 +08:00
#Patch0: https://github.com/weidai11/cryptopp/commit/94aba0105efa.patch
2020-09-17 14:40:44 +08:00
2022-07-29 15:20:26 +08:00
BuildRequires: doxygen
2023-02-28 11:35:52 +08:00
BuildRequires: clang
2022-07-29 15:20:26 +08:00
# %ifarch i686 x86_64
# BuildRequires: nasm
# %endif
2023-08-22 15:25:05 +08:00
BuildRequires: make
2022-07-29 15:20:26 +08:00
# Obsoletes pycryptopp to avoid breaking upgrades
Obsoletes: pycryptopp < 0.7
Provides: pycryptopp = 0.7
2020-09-17 14:40:44 +08:00
%description
Crypto++ Library is a free C++ class library of cryptographic schemes.
2022-07-29 15:20:26 +08:00
See http://www.cryptopp.com/ for a list of supported algorithms.
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.
2020-09-17 14:40:44 +08:00
%package devel
2022-07-29 15:20:26 +08:00
Summary: Header files and development documentation for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
2020-09-17 14:40:44 +08:00
%description devel
2022-07-29 15:20:26 +08:00
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.
2020-09-17 14:40:44 +08:00
%prep
2022-07-29 15:20:26 +08:00
%autosetup -c -p1
perl -pi -e 's/\r$//g' License.txt Readme.txt
2020-09-17 14:40:44 +08:00
%build
2022-07-29 15:20:26 +08:00
%{set_build_flags}
%make_build -f GNUmakefile \
ZOPT='' \
shared cryptest.exe
doxygen
2020-09-17 14:40:44 +08:00
%install
2022-07-29 15:20:26 +08:00
%make_install INSTALL="install -p -c " PREFIX="%{_prefix}" LIBDIR="%{_libdir}"
2020-09-17 14:40:44 +08:00
2022-07-29 15:20:26 +08:00
# Install the pkg-config file
install -D -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_libdir}/pkgconfig/cryptopp.pc
# 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
2020-09-17 14:40:44 +08:00
2022-07-29 15:20:26 +08:00
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/TestVectors
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/TestData
install -m644 TestVectors/* $RPM_BUILD_ROOT%{_datadir}/%{name}/TestVectors
install -m644 TestData/* $RPM_BUILD_ROOT%{_datadir}/%{name}/TestData
2020-09-17 14:40:44 +08:00
2022-07-29 15:20:26 +08:00
# Rename cryptest
mv $RPM_BUILD_ROOT%{_bindir}/cryptest.exe \
$RPM_BUILD_ROOT%{_bindir}/cryptest
2020-09-17 14:40:44 +08:00
2022-07-29 15:20:26 +08:00
# Remove static lib
rm %{buildroot}%{_libdir}/libcryptopp.a
%check
./cryptest.exe v
%ldconfig_scriptlets
2020-09-17 14:40:44 +08:00
%files
2022-07-29 15:20:26 +08:00
%{_libdir}/libcryptopp.so.8*
%doc Readme.txt
2020-09-17 14:40:44 +08:00
%license License.txt
%files devel
2022-07-29 15:20:26 +08:00
%{_includedir}/cryptopp
%{_libdir}/libcryptopp.so
%{_libdir}/pkgconfig/cryptopp.pc
2020-09-17 14:40:44 +08:00
2022-07-29 15:20:26 +08:00
%files doc
%license License.txt
%doc html-docs/*
2020-09-17 14:40:44 +08:00
2022-07-29 15:20:26 +08:00
%files progs
%{_bindir}/cryptest
%{_datadir}/%{name}
2020-09-17 14:40:44 +08:00
2022-07-29 15:20:26 +08:00
%changelog
2023-08-22 15:25:05 +08:00
* Tue Aug 22 2023 leeffo <liweiganga@uniontech.com> - 8.8.0-1
- upgrade to version 8.8.0
2023-02-28 11:35:52 +08:00
* Tue Feb 28 2023 lilong <lilong@kylinos.cn> - 8.7.0-1
- Upgrade to 8.7.0
2022-07-29 15:20:26 +08:00
* 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