qca/qca.spec

335 lines
8.6 KiB
RPMSpec
Raw Permalink Normal View History

2022-09-08 13:35:53 +08:00
%undefine __cmake_in_source_build
2022-01-19 10:22:39 +08:00
2022-09-08 13:35:53 +08:00
%if 0%{?fedora} < 34 && 0%{?rhel} < 9
2022-01-19 10:22:39 +08:00
%global botan 1
%endif
2022-09-08 13:35:53 +08:00
#global doc 1
%global tests 1
2022-01-19 10:22:39 +08:00
2022-09-08 13:35:53 +08:00
Name: qca
Summary: Qt Cryptographic Architecture
2024-01-02 17:14:21 +08:00
Version: 2.3.7
2022-09-08 13:35:53 +08:00
Release: 1
2022-01-19 10:22:39 +08:00
2022-09-08 13:35:53 +08:00
License: LGPLv2+
URL: https://userbase.kde.org/QCA
2022-01-19 10:22:39 +08:00
Source0: http://download.kde.org/stable/qca/%{version}/qca-%{version}.tar.xz
2022-09-08 13:35:53 +08:00
## upstream patches
## upstreamable patches
2022-01-19 10:22:39 +08:00
BuildRequires: cmake >= 2.8.12
BuildRequires: gcc-c++
BuildRequires: libgcrypt-devel
BuildRequires: pkgconfig(libcrypto) pkgconfig(libssl)
BuildRequires: pkgconfig(nss)
BuildRequires: pkgconfig(libpkcs11-helper-1)
BuildRequires: pkgconfig(libsasl2)
2022-09-08 13:35:53 +08:00
BuildRequires: pkgconfig(Qt5Core)
%if 0%{?doc}
# apidocs
# may need to add some tex-related ones too -- rex
BuildRequires: doxygen-latex
2022-01-19 10:22:39 +08:00
BuildRequires: graphviz
2022-09-08 13:35:53 +08:00
%endif
2022-01-19 10:22:39 +08:00
2022-09-08 13:35:53 +08:00
# qca2 renamed qca
2022-01-19 10:22:39 +08:00
Obsoletes: qca2 < 2.1.0
Provides: qca2 = %{version}-%{release}
Provides: qca2%{?_isa} = %{version}-%{release}
2022-09-08 13:35:53 +08:00
%if ! 0%{?botan}
Obsoletes: qca-qt5-botan < %{version}-%{release}
%endif
# most runtime consumers seem to assume the ossl plugin be present
2022-01-19 10:22:39 +08:00
Recommends: %{name}-ossl%{?_isa}
%description
Taking a hint from the similarly-named Java Cryptography Architecture,
QCA aims to provide a straightforward and cross-platform crypto API,
using Qt datatypes and conventions. QCA separates the API from the
implementation, using plugins known as Providers. The advantage of this
model is to allow applications to avoid linking to or explicitly depending
on any particular cryptographic library. This allows one to easily change
or upgrade crypto implementations without even needing to recompile the
application!
%package devel
Summary: Qt Cryptographic Architecture development files
2022-09-08 13:35:53 +08:00
# qca2 renamed qca
2022-01-19 10:22:39 +08:00
Obsoletes: qca2-devel < 2.1.0
Provides: qca2-devel = %{version}-%{release}
Provides: qca2-devel%{?_isa} = %{version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
This packages contains the development files for QCA.
%package doc
Summary: QCA API documentation
BuildArch: noarch
%description doc
This package includes QCA API documentation in HTML
2022-09-08 13:35:53 +08:00
%if 0%{?botan}
2022-01-19 10:22:39 +08:00
%package botan
Summary: Botan plugin for the Qt Cryptographic Architecture
2022-09-08 13:35:53 +08:00
BuildRequires: pkgconfig(botan-2)
2022-01-19 10:22:39 +08:00
Requires: %{name}%{?_isa} = %{version}-%{release}
%description botan
%{summary}.
2022-09-08 13:35:53 +08:00
%endif
2022-01-19 10:22:39 +08:00
%package cyrus-sasl
Summary: Cyrus-SASL plugin for the Qt Cryptographic Architecture
Requires: %{name}%{?_isa} = %{version}-%{release}
%description cyrus-sasl
%{summary}.
%package gcrypt
Summary: Gcrypt plugin for the Qt Cryptographic Architecture
Requires: %{name}%{?_isa} = %{version}-%{release}
%description gcrypt
%{summary}.
%package gnupg
Summary: Gnupg plugin for the Qt Cryptographic Architecture
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: gnupg
%description gnupg
%{summary}.
%package logger
Summary: Logger plugin for the Qt Cryptographic Architecture
Requires: %{name}%{?_isa} = %{version}-%{release}
%description logger
%{summary}.
%package nss
Summary: Nss plugin for the Qt Cryptographic Architecture
Requires: %{name}%{?_isa} = %{version}-%{release}
%description nss
%{summary}.
%package ossl
Summary: Openssl plugin for the Qt Cryptographic Architecture
Requires: %{name}%{?_isa} = %{version}-%{release}
%description ossl
%{summary}.
%package pkcs11
Summary: Pkcs11 plugin for the Qt Cryptographic Architecture
Requires: %{name}%{?_isa} = %{version}-%{release}
%description pkcs11
%{summary}.
%package softstore
Summary: Pkcs11 plugin for the Qt Cryptographic Architecture
Requires: %{name}%{?_isa} = %{version}-%{release}
%description softstore
%{summary}.
%package qt5
Summary: Qt5 Cryptographic Architecture
2022-09-08 13:35:53 +08:00
# most runtime consumers seem to assume the ossl plugin be present
2022-01-19 10:22:39 +08:00
Recommends: %{name}-qt5-ossl%{?_isa}
%description qt5
Taking a hint from the similarly-named Java Cryptography Architecture,
QCA aims to provide a straightforward and cross-platform crypto API,
using Qt datatypes and conventions. QCA separates the API from the
implementation, using plugins known as Providers. The advantage of this
model is to allow applications to avoid linking to or explicitly depending
on any particular cryptographic library. This allows one to easily change
or upgrade crypto implementations without even needing to recompile the
application!
%package qt5-devel
Summary: Qt5 Cryptographic Architecture development files
Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
%description qt5-devel
%{summary}.
2022-09-08 13:35:53 +08:00
%if 0%{?botan}
2022-01-19 10:22:39 +08:00
%package qt5-botan
Summary: Botan plugin for the Qt5 Cryptographic Architecture
2022-09-08 13:35:53 +08:00
BuildRequires: pkgconfig(botan-2)
2022-01-19 10:22:39 +08:00
Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
%description qt5-botan
%{summary}.
2022-09-08 13:35:53 +08:00
%endif
2022-01-19 10:22:39 +08:00
%package qt5-cyrus-sasl
Summary: Cyrus-SASL plugin for the Qt5 Cryptographic Architecture
Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
%description qt5-cyrus-sasl
%{summary}.
%package qt5-gcrypt
Summary: Gcrypt plugin for the Qt5 Cryptographic Architecture
Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
%description qt5-gcrypt
%{summary}.
%package qt5-gnupg
Summary: Gnupg plugin for the Qt Cryptographic Architecture
Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
Requires: gnupg
%description qt5-gnupg
%{summary}.
%package qt5-logger
Summary: Logger plugin for the Qt5 Cryptographic Architecture
Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
%description qt5-logger
%{summary}.
%package qt5-nss
Summary: Nss plugin for the Qt5 Cryptographic Architecture
Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
%description qt5-nss
%{summary}.
%package qt5-ossl
Summary: Openssl plugin for the Qt5 Cryptographic Architecture
Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
%description qt5-ossl
%{summary}.
%package qt5-pkcs11
Summary: Pkcs11 plugin for the Qt5 Cryptographic Architecture
Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
%description qt5-pkcs11
%{summary}.
%package qt5-softstore
Summary: Pkcs11 plugin for the Qt5 Cryptographic Architecture
Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
%description qt5-softstore
%{summary}.
%prep
%autosetup -p1
%build
2022-09-08 13:35:53 +08:00
mkdir build
pushd build
%cmake .. \
-Wno-dev \
-DBUILD_TESTS:BOOL=%{?tests:ON}%{!?tests:OFF} \
2022-01-19 10:22:39 +08:00
-DQCA_INCLUDE_INSTALL_DIR:PATH=%{_qt5_headerdir} \
2022-09-08 13:35:53 +08:00
-DQCA_INSTALL_IN_QT_PREFIX:BOOL=ON \
-DQCA_BINARY_INSTALL_DIR:STRING=%{_bindir} \
-DQCA_MAN_INSTALL_DIR:PATH=%{_mandir} \
2022-01-19 10:22:39 +08:00
-DQCA_PRIVATE_INCLUDE_INSTALL_DIR:PATH=%{_qt5_headerdir} \
2022-09-08 13:35:53 +08:00
-DWITH_botan_PLUGIN:BOOL=%{?botan:ON}%{?!botan:OFF}
# -DQCA_FEATURE_INSTALL_DIR:PATH=%{_qt5_archdatadir}/mkspecs/features \
# -DQCA_LIBRARY_INSTALL_DIR:PATH=%{_qt5_libdir} \
# -DQCA_PLUGINS_INSTALL_DIR:PATH=%{_qt5_plugindir} \
%make_build
%if 0%{?doc}
%make_build --target doc
2022-01-19 10:22:39 +08:00
%endif
popd
%install
2022-09-08 13:35:53 +08:00
pushd build
%make_install
%if 0%{?doc}
2022-01-19 10:22:39 +08:00
# no make install target for docs yet
mkdir -p %{buildroot}%{_docdir}/qca
cp -a %{_target_platform}/apidocs/html/ \
%{buildroot}%{_docdir}/qca/
%endif
2022-09-08 13:35:53 +08:00
popd
2022-01-19 10:22:39 +08:00
%check
2022-09-08 13:35:53 +08:00
%if 0%{?test}
2022-01-19 10:22:39 +08:00
export CTEST_OUTPUT_ON_FAILURE=1
export PKG_CONFIG_PATH=%{buildroot}%{_libdir}/pkgconfig
2022-09-08 13:35:53 +08:00
# skip slow archs
2022-01-19 10:22:39 +08:00
%ifnarch %{arm} ppc64 s390x
test "$(pkg-config --modversion qca2-qt5)" = "%{version}"
2022-09-08 13:35:53 +08:00
%ctest --timeout 180
2022-01-19 10:22:39 +08:00
%endif
%endif
2022-09-08 13:35:53 +08:00
%if 0%{?doc}
2022-01-19 10:22:39 +08:00
%files doc
%{_docdir}/qca/html/
%endif
%ldconfig_scriptlets qt5
%files qt5
%doc README TODO
%license COPYING
%{_bindir}/mozcerts-qt5
%{_bindir}/qcatool-qt5
%{_mandir}/man1/qcatool-qt5.1*
%{_qt5_libdir}/libqca-qt5.so.2*
%dir %{_qt5_plugindir}/crypto/
%files qt5-devel
%{_qt5_headerdir}/QtCrypto
%{_qt5_libdir}/libqca-qt5.so
%{_libdir}/pkgconfig/qca2-qt5.pc
%{_libdir}/cmake/Qca-qt5/
%{_qt5_archdatadir}/mkspecs/features/crypto.prf
2022-09-08 13:35:53 +08:00
%if 0%{?botan}
2022-01-19 10:22:39 +08:00
%files qt5-botan
%doc plugins/qca-botan/README
%{_qt5_plugindir}/crypto/libqca-botan.so
2022-09-08 13:35:53 +08:00
%endif
2022-01-19 10:22:39 +08:00
%files qt5-cyrus-sasl
%doc plugins/qca-gcrypt/README
%{_qt5_plugindir}/crypto/libqca-cyrus-sasl.so
%files qt5-gcrypt
%{_qt5_plugindir}/crypto/libqca-gcrypt.so
%files qt5-gnupg
%doc plugins/qca-cyrus-sasl/README
%{_qt5_plugindir}/crypto/libqca-gnupg.so
%files qt5-logger
%doc plugins/qca-logger/README
%{_qt5_plugindir}/crypto/libqca-logger.so
%files qt5-nss
%doc plugins/qca-nss/README
%{_qt5_plugindir}/crypto/libqca-nss.so
%files qt5-ossl
%doc plugins/qca-ossl/README
%{_qt5_plugindir}/crypto/libqca-ossl.so
%files qt5-pkcs11
%doc plugins/qca-pkcs11/README
%{_qt5_plugindir}/crypto/libqca-pkcs11.so
%files qt5-softstore
%doc plugins/qca-softstore/README
%{_qt5_plugindir}/crypto/libqca-softstore.so
%changelog
2024-01-02 17:14:21 +08:00
* Tue Jan 2 2024 zhangxingrong <zhangxingrong@uniontech.com> - 2.3.7-1
- upgrade to 2.3.7-1
2022-09-08 13:35:53 +08:00
* Thu Sep 08 2022 liweiganga <liweiganga@uniontech.com> - 2.3.4-1
- update to upstream version 2.3.4
2022-01-19 10:22:39 +08:00
* Fri Feb 18 2022 tanyulong <tanyulong@kylinos.cn> - 2.2.1-1
- init packages for openEuler