!7 [sync] PR-4: update to upstream version 2.3.4

From: @openeuler-sync-bot 
Reviewed-by: @peijiankang 
Signed-off-by: @peijiankang
This commit is contained in:
openeuler-ci-bot 2023-04-23 05:38:55 +00:00 committed by Gitee
commit 16f04d7fe2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 64 additions and 133 deletions

Binary file not shown.

BIN
qca-2.3.4.tar.xz Normal file

Binary file not shown.

197
qca.spec
View File

@ -1,51 +1,51 @@
%undefine __cmake_in_source_build
%if 0%{?fedora} %if 0%{?fedora} < 34 && 0%{?rhel} < 9
%global qt4 1
%endif
%global qt5 1
%if 0%{?fedora} > 26 || 0%{?rhel} > 7
%global botan 1 %global botan 1
%endif %endif
#global doc 1
%global tests 1
Name: qca Name: qca
Summary: Qt Cryptographic Architecture Summary: Qt Cryptographic Architecture
Version: 2.2.1 Version: 2.3.4
Release: 1 Release: 1
License: LGPLv2+ License: LGPLv2+
URL: https://userbase.kde.org/QCA URL: https://userbase.kde.org/QCA
%if 0%{?snap}
Source0: qca-%{version}-%{snap}git.tar.xz
Source10: qca.sh
%else
Source0: http://download.kde.org/stable/qca/%{version}/qca-%{version}.tar.xz Source0: http://download.kde.org/stable/qca/%{version}/qca-%{version}.tar.xz
%endif
## upstream patches
## upstreamable patches
BuildRequires: cmake >= 2.8.12 BuildRequires: cmake >= 2.8.12
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: libgcrypt-devel BuildRequires: libgcrypt-devel
%if 0%{?botan}
BuildRequires: pkgconfig(botan-2)
%else
Obsoletes: qca-botan < %{version}-%{release}
%endif
BuildRequires: pkgconfig(libcrypto) pkgconfig(libssl) BuildRequires: pkgconfig(libcrypto) pkgconfig(libssl)
BuildRequires: pkgconfig(nss) BuildRequires: pkgconfig(nss)
BuildRequires: pkgconfig(libpkcs11-helper-1) BuildRequires: pkgconfig(libpkcs11-helper-1)
BuildRequires: pkgconfig(libsasl2) BuildRequires: pkgconfig(libsasl2)
%if 0%{?qt4} BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(QtCore)
%endif
BuildRequires: doxygen
BuildRequires: graphviz
%if 0%{?doc}
# apidocs
# may need to add some tex-related ones too -- rex
BuildRequires: doxygen-latex
BuildRequires: graphviz
%endif
# qca2 renamed qca
Obsoletes: qca2 < 2.1.0 Obsoletes: qca2 < 2.1.0
Provides: qca2 = %{version}-%{release} Provides: qca2 = %{version}-%{release}
Provides: qca2%{?_isa} = %{version}-%{release} Provides: qca2%{?_isa} = %{version}-%{release}
%if ! 0%{?botan}
Obsoletes: qca-qt5-botan < %{version}-%{release}
%endif
# most runtime consumers seem to assume the ossl plugin be present
Recommends: %{name}-ossl%{?_isa} Recommends: %{name}-ossl%{?_isa}
%description %description
@ -60,6 +60,7 @@ application!
%package devel %package devel
Summary: Qt Cryptographic Architecture development files Summary: Qt Cryptographic Architecture development files
# qca2 renamed qca
Obsoletes: qca2-devel < 2.1.0 Obsoletes: qca2-devel < 2.1.0
Provides: qca2-devel = %{version}-%{release} Provides: qca2-devel = %{version}-%{release}
Provides: qca2-devel%{?_isa} = %{version}-%{release} Provides: qca2-devel%{?_isa} = %{version}-%{release}
@ -73,11 +74,14 @@ BuildArch: noarch
%description doc %description doc
This package includes QCA API documentation in HTML This package includes QCA API documentation in HTML
%if 0%{?botan}
%package botan %package botan
Summary: Botan plugin for the Qt Cryptographic Architecture Summary: Botan plugin for the Qt Cryptographic Architecture
BuildRequires: pkgconfig(botan-2)
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
%description botan %description botan
%{summary}. %{summary}.
%endif
%package cyrus-sasl %package cyrus-sasl
Summary: Cyrus-SASL plugin for the Qt Cryptographic Architecture Summary: Cyrus-SASL plugin for the Qt Cryptographic Architecture
@ -128,13 +132,9 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%description softstore %description softstore
%{summary}. %{summary}.
%if 0%{?qt5}
%package qt5 %package qt5
Summary: Qt5 Cryptographic Architecture Summary: Qt5 Cryptographic Architecture
BuildRequires: pkgconfig(Qt5Core) # most runtime consumers seem to assume the ossl plugin be present
%if ! 0%{?botan}
Obsoletes: qca-qt5-botan < %{version}-%{release}
%endif
Recommends: %{name}-qt5-ossl%{?_isa} Recommends: %{name}-qt5-ossl%{?_isa}
%description qt5 %description qt5
Taking a hint from the similarly-named Java Cryptography Architecture, Taking a hint from the similarly-named Java Cryptography Architecture,
@ -152,11 +152,14 @@ Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
%description qt5-devel %description qt5-devel
%{summary}. %{summary}.
%if 0%{?botan}
%package qt5-botan %package qt5-botan
Summary: Botan plugin for the Qt5 Cryptographic Architecture Summary: Botan plugin for the Qt5 Cryptographic Architecture
BuildRequires: pkgconfig(botan-2)
Requires: %{name}-qt5%{?_isa} = %{version}-%{release} Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
%description qt5-botan %description qt5-botan
%{summary}. %{summary}.
%endif
%package qt5-cyrus-sasl %package qt5-cyrus-sasl
Summary: Cyrus-SASL plugin for the Qt5 Cryptographic Architecture Summary: Cyrus-SASL plugin for the Qt5 Cryptographic Architecture
@ -206,7 +209,6 @@ Summary: Pkcs11 plugin for the Qt5 Cryptographic Architecture
Requires: %{name}-qt5%{?_isa} = %{version}-%{release} Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
%description qt5-softstore %description qt5-softstore
%{summary}. %{summary}.
%endif
%prep %prep
@ -214,131 +216,57 @@ Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
%build %build
%if 0%{?qt5} mkdir build
mkdir %{_target_platform}-qt5 pushd build
pushd %{_target_platform}-qt5 %cmake .. \
%{cmake} .. \ -Wno-dev \
-DQCA_BINARY_INSTALL_DIR:STRING=%{_bindir} \ -DBUILD_TESTS:BOOL=%{?tests:ON}%{!?tests:OFF} \
-DQCA_FEATURE_INSTALL_DIR:PATH=%{_qt5_archdatadir}/mkspecs/features \
-DQCA_INCLUDE_INSTALL_DIR:PATH=%{_qt5_headerdir} \ -DQCA_INCLUDE_INSTALL_DIR:PATH=%{_qt5_headerdir} \
-DQCA_LIBRARY_INSTALL_DIR:PATH=%{_qt5_libdir} \ -DQCA_INSTALL_IN_QT_PREFIX:BOOL=ON \
-DQCA_PLUGINS_INSTALL_DIR:PATH=%{_qt5_plugindir} \
-DQCA_PRIVATE_INCLUDE_INSTALL_DIR:PATH=%{_qt5_headerdir} \
-DQT4_BUILD:BOOL=OFF
popd
%make_build -C %{_target_platform}-qt5
%endif
%if 0%{?qt4}
mkdir %{_target_platform}
pushd %{_target_platform}
%{cmake} .. \
-DQCA_DOC_INSTALL_DIR:PATH=%{_docdir}/qca \
-DQCA_BINARY_INSTALL_DIR:STRING=%{_bindir} \ -DQCA_BINARY_INSTALL_DIR:STRING=%{_bindir} \
-DQCA_FEATURE_INSTALL_DIR:PATH=%{_qt4_prefix}/mkspecs/features \ -DQCA_MAN_INSTALL_DIR:PATH=%{_mandir} \
-DQCA_INCLUDE_INSTALL_DIR:PATH=%{_qt4_headerdir} \ -DQCA_PRIVATE_INCLUDE_INSTALL_DIR:PATH=%{_qt5_headerdir} \
-DQCA_LIBRARY_INSTALL_DIR:PATH=%{_qt4_libdir} \ -DWITH_botan_PLUGIN:BOOL=%{?botan:ON}%{?!botan:OFF}
-DQCA_PLUGINS_INSTALL_DIR:PATH=%{_qt4_plugindir} \
-DQCA_PRIVATE_INCLUDE_INSTALL_DIR:PATH=%{_qt4_headerdir} \
-DQT4_BUILD:BOOL=ON
popd
%make_build -C %{_target_platform} # -DQCA_FEATURE_INSTALL_DIR:PATH=%{_qt5_archdatadir}/mkspecs/features \
# -DQCA_LIBRARY_INSTALL_DIR:PATH=%{_qt5_libdir} \
%make_build doc -C %{_target_platform} # -DQCA_PLUGINS_INSTALL_DIR:PATH=%{_qt5_plugindir} \
%make_build
%if 0%{?doc}
%make_build --target doc
%endif %endif
popd
%install %install
%if 0%{?qt5} pushd build
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}-qt5 %make_install
%endif %if 0%{?doc}
%if 0%{?qt4}
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
# no make install target for docs yet # no make install target for docs yet
mkdir -p %{buildroot}%{_docdir}/qca mkdir -p %{buildroot}%{_docdir}/qca
cp -a %{_target_platform}/apidocs/html/ \ cp -a %{_target_platform}/apidocs/html/ \
%{buildroot}%{_docdir}/qca/ %{buildroot}%{_docdir}/qca/
%endif %endif
popd
%check %check
%if 0%{?test}
export CTEST_OUTPUT_ON_FAILURE=1 export CTEST_OUTPUT_ON_FAILURE=1
export PKG_CONFIG_PATH=%{buildroot}%{_libdir}/pkgconfig export PKG_CONFIG_PATH=%{buildroot}%{_libdir}/pkgconfig
# skip slow archs
%ifnarch %{arm} ppc64 s390x %ifnarch %{arm} ppc64 s390x
%if 0%{?qt4}
test "$(pkg-config --modversion qca2)" = "%{version}"
make test ARGS="--timeout 180 --output-on-failure" -C %{_target_platform} ||:
%endif
%if 0%{?qt5}
test "$(pkg-config --modversion qca2-qt5)" = "%{version}" test "$(pkg-config --modversion qca2-qt5)" = "%{version}"
make test ARGS="--timeout 180 --output-on-failure" -C %{_target_platform}-qt5 %ctest --timeout 180
%endif %endif
%endif %endif
%if 0%{?qt4} %if 0%{?doc}
%ldconfig_scriptlets
%files
%doc README TODO
%license COPYING
%{_qt4_libdir}/libqca.so.2*
%{_bindir}/mozcerts
%{_bindir}/qcatool
%{_mandir}/man1/qcatool.1*
%dir %{_qt4_plugindir}/crypto/
%exclude %{_docdir}/qca/html/
%files doc %files doc
%{_docdir}/qca/html/ %{_docdir}/qca/html/
%files devel
%{_qt4_headerdir}/QtCrypto
%{_qt4_libdir}/libqca.so
%{_libdir}/pkgconfig/qca2.pc
%{_libdir}/cmake/Qca/
%{_qt4_prefix}/mkspecs/features/crypto.prf
%files botan
%doc plugins/qca-botan/README
%{_qt4_plugindir}/crypto/libqca-botan.so
%files cyrus-sasl
%doc plugins/qca-gcrypt/README
%{_qt4_plugindir}/crypto/libqca-cyrus-sasl.so
%files gcrypt
%{_qt4_plugindir}/crypto/libqca-gcrypt.so
%files gnupg
%doc plugins/qca-cyrus-sasl/README
%{_qt4_plugindir}/crypto/libqca-gnupg.so
%files logger
%doc plugins/qca-logger/README
%{_qt4_plugindir}/crypto/libqca-logger.so
%files nss
%doc plugins/qca-nss/README
%{_qt4_plugindir}/crypto/libqca-nss.so
%files ossl
%doc plugins/qca-ossl/README
%{_qt4_plugindir}/crypto/libqca-ossl.so
%files pkcs11
%doc plugins/qca-pkcs11/README
%{_qt4_plugindir}/crypto/libqca-pkcs11.so
%files softstore
%doc plugins/qca-softstore/README
%{_qt4_plugindir}/crypto/libqca-softstore.so
%endif %endif
%if 0%{?qt5}
%ldconfig_scriptlets qt5 %ldconfig_scriptlets qt5
%files qt5 %files qt5
@ -357,9 +285,11 @@ make test ARGS="--timeout 180 --output-on-failure" -C %{_target_platform}-qt5
%{_libdir}/cmake/Qca-qt5/ %{_libdir}/cmake/Qca-qt5/
%{_qt5_archdatadir}/mkspecs/features/crypto.prf %{_qt5_archdatadir}/mkspecs/features/crypto.prf
%if 0%{?botan}
%files qt5-botan %files qt5-botan
%doc plugins/qca-botan/README %doc plugins/qca-botan/README
%{_qt5_plugindir}/crypto/libqca-botan.so %{_qt5_plugindir}/crypto/libqca-botan.so
%endif
%files qt5-cyrus-sasl %files qt5-cyrus-sasl
%doc plugins/qca-gcrypt/README %doc plugins/qca-gcrypt/README
@ -391,10 +321,11 @@ make test ARGS="--timeout 180 --output-on-failure" -C %{_target_platform}-qt5
%files qt5-softstore %files qt5-softstore
%doc plugins/qca-softstore/README %doc plugins/qca-softstore/README
%{_qt5_plugindir}/crypto/libqca-softstore.so %{_qt5_plugindir}/crypto/libqca-softstore.so
%endif
%changelog %changelog
* Thu Sep 08 2022 liweiganga <liweiganga@uniontech.com> - 2.3.4-1
- update to upstream version 2.3.4
* Fri Feb 18 2022 tanyulong <tanyulong@kylinos.cn> - 2.2.1-1 * Fri Feb 18 2022 tanyulong <tanyulong@kylinos.cn> - 2.2.1-1
- init packages for openEuler - init packages for openEuler