109 lines
3.0 KiB
RPMSpec
109 lines
3.0 KiB
RPMSpec
|
|
%global qt_module qtgrpc
|
||
|
|
|
||
|
|
%global examples 0
|
||
|
|
|
||
|
|
%define short_version 6.5
|
||
|
|
|
||
|
|
Summary: gRPC and Protobuf generator and bindings for Qt framework
|
||
|
|
Name: qt6-%{qt_module}
|
||
|
|
Version: 6.5.1
|
||
|
|
Release: 1
|
||
|
|
License: LGPLv3 or GPLv2+
|
||
|
|
URL: https://www.qt.io
|
||
|
|
Source0: https://download.qt.io/official_releases/qt/%{short_version}/%{version}/submodules/%{qt_module}-everywhere-src-%{version}.tar.xz
|
||
|
|
|
||
|
|
# PATCH-FIX-UPSTREAM
|
||
|
|
Patch0: 0001-Fix-include-of-std-set.patch
|
||
|
|
Patch1: 0002-Remove-protobuf-logging.h-include.patch
|
||
|
|
Patch2: 0003-Add-missing-memory-include.patch
|
||
|
|
|
||
|
|
BuildRequires: cmake
|
||
|
|
BuildRequires: grpc
|
||
|
|
BuildRequires: gcc-c++
|
||
|
|
BuildRequires: protobuf
|
||
|
|
BuildRequires: ninja-build
|
||
|
|
BuildRequires: qt6-qtbase-devel >= %{version}
|
||
|
|
BuildRequires: qt6-qtbase-private-devel
|
||
|
|
%{?_qt6:Requires: %{_qt6}%{?_isa} = %{_qt6_version}}
|
||
|
|
|
||
|
|
%description
|
||
|
|
gRPC and Protobuf generator and bindings for Qt framework.
|
||
|
|
|
||
|
|
%package devel
|
||
|
|
Summary: Development files for %{name}
|
||
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||
|
|
Requires: qt6-qtbase-devel%{?_isa}
|
||
|
|
%description devel
|
||
|
|
%{summary}.
|
||
|
|
|
||
|
|
%if 0%{?examples}
|
||
|
|
%package examples
|
||
|
|
Summary: Programming examples for %{name}
|
||
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||
|
|
%description examples
|
||
|
|
%{summary}.
|
||
|
|
%endif
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%autosetup -n %{qt_module}-everywhere-src-%{version} -p1
|
||
|
|
|
||
|
|
|
||
|
|
%build
|
||
|
|
%cmake_qt6 -DQT_BUILD_EXAMPLES:BOOL=%{?examples:ON}%{!?examples:OFF}
|
||
|
|
|
||
|
|
cmake --build . %{?_smp_mflags} --verbose
|
||
|
|
|
||
|
|
|
||
|
|
%install
|
||
|
|
DESTDIR="%{buildroot}" cmake --install .
|
||
|
|
|
||
|
|
## .prl/.la file love
|
||
|
|
# nuke .prl reference(s) to %%buildroot, excessive (.la-like) libs
|
||
|
|
pushd %{buildroot}%{_qt6_libdir}
|
||
|
|
for prl_file in libQt6*.prl ; do
|
||
|
|
sed -i -e "/^QMAKE_PRL_BUILD_DIR/d" ${prl_file}
|
||
|
|
if [ -f "$(basename ${prl_file} .prl).so" ]; then
|
||
|
|
rm -fv "$(basename ${prl_file} .prl).la"
|
||
|
|
sed -i -e "/^QMAKE_PRL_LIBS/d" ${prl_file}
|
||
|
|
fi
|
||
|
|
done
|
||
|
|
popd
|
||
|
|
|
||
|
|
%files
|
||
|
|
%license LICENSES/*
|
||
|
|
%{_qt6_libdir}/libQt6Grpc.so.6*
|
||
|
|
%{_qt6_libdir}/libQt6Protobuf.so.6*
|
||
|
|
|
||
|
|
%files devel
|
||
|
|
%{_qt6_libdir}/cmake/Qt6Grpc/
|
||
|
|
%{_qt6_libdir}/cmake/Qt6Protobuf/
|
||
|
|
%{_qt6_libdir}/cmake/Qt6/FindWrapgRPC.cmake
|
||
|
|
%{_qt6_libdir}/cmake/Qt6/FindWrapgRPCPlugin.cmake
|
||
|
|
%{_qt6_libdir}/cmake/Qt6/FindWrapProtobuf.cmake
|
||
|
|
%{_qt6_libdir}/cmake/Qt6/FindWrapProtoc.cmake
|
||
|
|
%{_qt6_libdir}/cmake/Qt6BuildInternals/StandaloneTests/QtGrpcTestsConfig.cmake
|
||
|
|
%{_qt6_archdatadir}/modules/Grpc.json
|
||
|
|
%{_qt6_archdatadir}/modules/Protobuf.json
|
||
|
|
%{_qt6_archdatadir}/metatypes/qt6grpc_*_metatypes.json
|
||
|
|
%{_qt6_archdatadir}/metatypes/qt6protobuf_*_metatypes.json
|
||
|
|
%{_qt6_includedir}/QtGrpc/
|
||
|
|
%{_qt6_includedir}/QtProtobuf/
|
||
|
|
%{_qt6_libdir}/libQt6Grpc.prl
|
||
|
|
%{_qt6_libdir}/libQt6Grpc.so
|
||
|
|
%{_qt6_mkspecsdir}/modules/qt_lib_grpc.pri
|
||
|
|
%{_qt6_mkspecsdir}/modules/qt_lib_grpc_private.pri
|
||
|
|
%{_qt6_mkspecsdir}/modules/qt_lib_protobuf.pri
|
||
|
|
%{_qt6_mkspecsdir}/modules/qt_lib_protobuf_private.pri
|
||
|
|
%{_qt6_libdir}/libQt6Protobuf.prl
|
||
|
|
%{_qt6_libdir}/libQt6Protobuf.so
|
||
|
|
%{_qt6_libdir}/pkgconfig/Qt6Grpc.pc
|
||
|
|
%{_qt6_libdir}/pkgconfig/Qt6Protobuf.pc
|
||
|
|
|
||
|
|
%if 0%{?examples}
|
||
|
|
%files examples
|
||
|
|
%{_qt6_examplesdir}/
|
||
|
|
%endif
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Fri Aug 18 2023 EastDong <xudong23@iscas.ac.cn> - 6.5.1-1
|
||
|
|
- Init package
|