2011-01-25 09:06:12 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package libcryptopp
|
|
|
|
|
#
|
2022-08-09 10:39:01 +00:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2011-01-25 09:06:12 +00:00
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
2018-11-24 06:19:05 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-01-25 09:06:12 +00:00
|
|
|
#
|
|
|
|
|
|
2012-03-18 18:07:05 +00:00
|
|
|
|
2019-07-20 10:15:29 +00:00
|
|
|
%define major 8
|
2022-08-09 08:36:18 +00:00
|
|
|
%define minor 7
|
2018-11-24 06:19:05 +00:00
|
|
|
%define patch 0
|
2021-03-18 04:09:17 +00:00
|
|
|
%define pkg_version %{major}%{minor}%patch
|
2020-07-02 12:55:22 +00:00
|
|
|
# There is no upstream interface version information.
|
|
|
|
|
# Therefore we need unique basenames (see boo#1027192):
|
2021-03-18 04:09:17 +00:00
|
|
|
%define sover %{major}_%{minor}_%patch
|
2011-01-25 09:06:12 +00:00
|
|
|
Name: libcryptopp
|
2017-03-05 15:27:36 +00:00
|
|
|
# WARNING: Execute "sh precheckin_baselibs.sh" to update baselibs.conf
|
2019-07-26 10:41:18 +00:00
|
|
|
# WARNING: uses source tarball name to create lib name.
|
2021-03-18 04:09:17 +00:00
|
|
|
Version: %{major}.%{minor}.%patch
|
2012-02-06 00:02:57 +00:00
|
|
|
Release: 0
|
2017-01-28 16:37:57 +00:00
|
|
|
Summary: Cryptographic library for C++
|
2013-03-01 18:39:52 +00:00
|
|
|
License: BSL-1.0
|
2020-07-02 12:55:22 +00:00
|
|
|
URL: https://www.cryptopp.com
|
2021-03-18 04:09:17 +00:00
|
|
|
Source: https://github.com/weidai11/cryptopp/archive/CRYPTOPP_%{major}_%{minor}_%patch.tar.gz
|
2017-03-05 15:27:36 +00:00
|
|
|
Source1: precheckin_baselibs.sh
|
|
|
|
|
Source2: baselibs.conf
|
2012-10-16 07:24:00 +00:00
|
|
|
# PATCH-FEATURE-OPENSUSE libcryptopp-shared.patch -- improve shared library creation
|
2011-10-14 15:26:48 +00:00
|
|
|
Patch1: libcryptopp-shared.patch
|
2021-01-06 11:14:55 +00:00
|
|
|
BuildRequires: dos2unix
|
2011-10-14 15:26:48 +00:00
|
|
|
BuildRequires: gcc-c++
|
2020-07-02 12:55:22 +00:00
|
|
|
BuildRequires: pkgconfig
|
2010-08-09 22:30:27 +00:00
|
|
|
|
|
|
|
|
%description
|
2017-01-28 16:37:57 +00:00
|
|
|
The Crypto++ library is a C++ class library of cryptographic schemes.
|
2017-03-05 15:27:36 +00:00
|
|
|
Also contains:
|
|
|
|
|
pseudo random number generators (PRNG): ANSI X9.17 appendix C,
|
|
|
|
|
RandomPool, RDRAND, RDSEED, NIST Hash DRBG.
|
2010-08-09 22:30:27 +00:00
|
|
|
|
2017-03-05 15:27:36 +00:00
|
|
|
%package -n %{name}%{sover}
|
2011-01-25 09:06:12 +00:00
|
|
|
Summary: Cryptographic Library for C++
|
2017-03-05 15:27:36 +00:00
|
|
|
Obsoletes: %{name}%{major}_%{minor} = %{version}
|
2010-08-09 22:30:27 +00:00
|
|
|
|
2017-03-05 15:27:36 +00:00
|
|
|
%description -n %{name}%{sover}
|
2017-01-28 16:37:57 +00:00
|
|
|
The Crypto++ library provides authenticated encryption, stream and
|
|
|
|
|
block ciphers, block cipher operation modes, message authentication
|
|
|
|
|
codes, hash functions, PKI crypto, key agreement schemes and elliptic
|
|
|
|
|
curve crypto.
|
2010-08-09 22:30:27 +00:00
|
|
|
|
|
|
|
|
%package -n %{name}-devel
|
2017-01-28 16:37:57 +00:00
|
|
|
Summary: Development files for libcryptopp, a cryptographic library for C++
|
2017-03-05 15:27:36 +00:00
|
|
|
Requires: %{name}%{sover} = %{version}
|
2021-09-25 08:44:37 +00:00
|
|
|
Obsoletes: %{name}-devel-static <= %{version}
|
2010-08-09 22:30:27 +00:00
|
|
|
|
|
|
|
|
%description -n %{name}-devel
|
2017-03-05 15:27:36 +00:00
|
|
|
The Crypto++ library provides authenticated encryption, stream and
|
|
|
|
|
block ciphers, block cipher operation modes, message authentication
|
|
|
|
|
codes, hash functions, PKI crypto, key agreement schemes and elliptic
|
|
|
|
|
curve crypto. This package is used for crypto++ development.
|
|
|
|
|
|
2010-08-09 22:30:27 +00:00
|
|
|
%prep
|
2021-03-18 04:09:17 +00:00
|
|
|
%setup -q -n "cryptopp-CRYPTOPP_%{major}_%{minor}_%patch"
|
2021-01-06 11:14:55 +00:00
|
|
|
%autopatch -p1
|
2010-08-09 22:30:27 +00:00
|
|
|
|
|
|
|
|
%build
|
2019-08-11 13:11:04 +00:00
|
|
|
%ifarch %{arm} i586
|
2019-07-26 10:41:18 +00:00
|
|
|
%define _lto_cflags %{nil}
|
2018-11-24 06:19:05 +00:00
|
|
|
%endif
|
2019-07-26 10:41:18 +00:00
|
|
|
CXXFLAGS="-DNDEBUG %{optflags} -fpic -fPIC -pthread -fopenmp"
|
2022-08-10 05:40:03 +00:00
|
|
|
%ifarch i586
|
|
|
|
|
CXXFLAGS="$CXXFLAGS -mmmx -msse2"
|
|
|
|
|
%endif
|
2019-07-26 10:41:18 +00:00
|
|
|
# aarch64 arm -march=armv7-a -mfpu=neon
|
2018-11-24 06:19:05 +00:00
|
|
|
%ifarch ppc64
|
|
|
|
|
CXXFLAGS="$CXXFLAGS -DCRYPTOPP_DISABLE_ALTIVEC"
|
|
|
|
|
%endif
|
2020-07-02 12:55:22 +00:00
|
|
|
%make_build \
|
2018-11-24 06:19:05 +00:00
|
|
|
CXXFLAGS="$CXXFLAGS" \
|
2017-03-05 15:27:36 +00:00
|
|
|
DESTDIR="" \
|
|
|
|
|
PREFIX="%{_prefix}" \
|
|
|
|
|
LIB="%{_lib}" \
|
2011-10-14 15:26:48 +00:00
|
|
|
CXX="g++" \
|
2017-03-05 15:27:36 +00:00
|
|
|
LIBSUFFIX="-%{version}" \
|
|
|
|
|
LDFLAGS="-pthread" \
|
|
|
|
|
all static
|
2010-08-09 22:30:27 +00:00
|
|
|
|
|
|
|
|
%install
|
2020-07-02 12:55:22 +00:00
|
|
|
%make_install \
|
2010-08-09 22:30:27 +00:00
|
|
|
PREFIX="%{_prefix}" \
|
2017-03-05 15:27:36 +00:00
|
|
|
LIB="%{_lib}" \
|
2020-07-02 12:55:22 +00:00
|
|
|
LIBSUFFIX="-%{version}"
|
2019-07-20 10:15:29 +00:00
|
|
|
|
2016-09-14 16:45:39 +00:00
|
|
|
rm -rf "%{buildroot}%{_bindir}" %{buildroot}%{_datadir}/cryptopp
|
2019-07-20 10:15:29 +00:00
|
|
|
rm -rf %{buildroot}%{_libdir}/*.a
|
2021-01-06 11:14:55 +00:00
|
|
|
dos2unix Readme.txt
|
2017-03-05 15:27:36 +00:00
|
|
|
# Install .pc file with correct version field.
|
2011-10-14 15:26:48 +00:00
|
|
|
mkdir %{buildroot}%{_libdir}/pkgconfig/
|
2020-07-02 12:55:22 +00:00
|
|
|
cat > %{buildroot}%{_libdir}/pkgconfig/cryptopp.pc <<EOF
|
|
|
|
|
prefix=%{_prefix}
|
|
|
|
|
exec_prefix=\${prefix}
|
|
|
|
|
libdir=%{_libdir}
|
|
|
|
|
includedir=%{_includedir}
|
|
|
|
|
|
2021-03-18 04:09:17 +00:00
|
|
|
Name: libcrypto++
|
|
|
|
|
Description: General purpose cryptographic shared library
|
|
|
|
|
URL: https://www.cryptopp.com
|
|
|
|
|
Version: %{version}
|
2020-07-02 12:55:22 +00:00
|
|
|
Libs: -lcryptopp
|
|
|
|
|
Cflags:
|
|
|
|
|
EOF
|
2010-08-09 22:30:27 +00:00
|
|
|
|
|
|
|
|
%check
|
2020-07-02 12:55:22 +00:00
|
|
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir} %make_build test
|
2010-08-09 22:30:27 +00:00
|
|
|
|
2017-03-05 15:27:36 +00:00
|
|
|
%post -n %{name}%{sover} -p /sbin/ldconfig
|
|
|
|
|
%postun -n %{name}%{sover} -p /sbin/ldconfig
|
2010-08-09 22:30:27 +00:00
|
|
|
|
2017-03-05 15:27:36 +00:00
|
|
|
%files -n %{name}%{sover}
|
2016-09-14 16:45:39 +00:00
|
|
|
%{_libdir}/libcryptopp.so.%{major}.*
|
2019-07-20 10:15:29 +00:00
|
|
|
%license License.txt
|
2010-08-09 22:30:27 +00:00
|
|
|
|
|
|
|
|
%files -n %{name}-devel
|
2019-07-20 10:15:29 +00:00
|
|
|
%doc Readme.txt
|
2010-08-09 22:30:27 +00:00
|
|
|
%{_includedir}/cryptopp
|
|
|
|
|
%{_libdir}/libcryptopp.so
|
2022-08-09 08:36:18 +00:00
|
|
|
%{_libdir}/libcryptopp.so.%{major}
|
2011-10-14 15:26:48 +00:00
|
|
|
%{_libdir}/pkgconfig/cryptopp.pc
|
2011-07-11 08:35:56 +00:00
|
|
|
|
2011-01-25 09:06:12 +00:00
|
|
|
%changelog
|