File Qt6PdWidgets2.spec of Package QtPdWidgets2
#----------------------------------------------------------------------------
#
# Copyright (C) 2009-2023 Florian Pose <fp@igh.de>
#
# This file is part of the QtPdWidgets library.
#
# The QtPdWidgets library is free software: you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# The QtPdWidgets library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with the QtPdWidgets Library. If not, see
# <http://www.gnu.org/licenses/>.
#
# vim: tw=78
#
#----------------------------------------------------------------------------
%define libname Qt6PdWidgets2
%define packagename QtPdWidgets2
%define soversion 3
%define fixed_gcc (0%{?suse_version} > 0 && 0%{?suse_version} < 1600)
Name: lib%{libname}-%{soversion}
Version: 0
Release: 0
Summary: Process data widgets for Qt
License: LGPL-3.0+
Vendor: Ingenieurgemeinschaft IgH GmbH
Group: Productivity/Other
URL: http://etherlab.org/en/pdwidgets/index.php
Source: QtPdWidgets2-%{version}.tar.bz2
BuildRequires: fdupes
BuildRequires: libQt6PdCom1-devel
%if 0%{?suse_version}
%if %fixed_gcc
BuildRequires: gcc10-c++ gcc10
%endif
BuildRequires: qt6-core-devel
BuildRequires: qt6-designer-devel
BuildRequires: qt6-linguist-devel
BuildRequires: qt6-network-devel
BuildRequires: qt6-qt5compat-devel
BuildRequires: qt6-svg-devel
BuildRequires: qt6-tools-devel
BuildRequires: qt6-widgets-devel
BuildRequires: qt6-xml-devel
BuildRequires: python3 python3-PyYAML
%else
BuildRequires: qt6-qt5compat-devel
BuildRequires: qt6-qtbase-devel
BuildRequires: qt6-qtsvg-devel
BuildRequires: qt6-qttools-devel
BuildRequires: python3 python3-pyyaml
%endif
#----------------------------------------------------------------------------
# Main Package
#----------------------------------------------------------------------------
%description
This is a bundle of process data widgets for Qt6. It uses the PdCom library
(version 5) to access the actual process variables and it includes a plugin
for the Qt Designer. See http://etherlab.org/en/pdwidgets for more
information.
#----------------------------------------------------------------------------
# Development package
#----------------------------------------------------------------------------
%package -n lib%{libname}-devel
Summary: Development files for Applications using %{name}
Group: Development/Libraries/C and C++
Requires: libQtPdCom1-devel
Requires: lib%{libname}-%{soversion} = %{version}
Requires: lib%{packagename}-headers = %{version}
%description -n lib%{libname}-devel
This is a bundle of process data widgets for Qt6. It uses the PdCom library
(version 5) to access the actual process variables and it includes a plugin
for the Qt Designer. See http://etherlab.org/en/pdwidgets for more
information.
#----------------------------------------------------------------------------
%prep
%setup -q -n %{packagename}-%{version}
#----------------------------------------------------------------------------
%build
%if %fixed_gcc
export CC=gcc-10
export CXX=g++-10
%endif
%cmake \
-DVERSION_HASH=%{version} \
-DUSE_SYMBOL_VERSIONING=1 \
-DUSE_QT6=1 \
-DPUT_QT_MAJOR_INTO_LIBNAME=1
%cmake_build
#----------------------------------------------------------------------------
%install
%cmake_install
# Headers packaged in Qt5 flavour
rm -r %buildroot/%_includedir/%{packagename}
rm %buildroot/%_includedir/%{packagename}.h
#----------------------------------------------------------------------------
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc AUTHORS COPYING NEWS README.md TODO
%_libdir/lib%{libname}.so.*
%files -n lib%{libname}-devel
%defattr(-,root,root)
%_libdir/cmake/%{libname}
%_libdir/lib%{libname}.so
%dir %_libdir/qt6/plugins/designer
%_libdir/qt6/plugins/designer/lib%{libname}Plugin.so
#----------------------------------------------------------------------------
%changelog
* Fri Jan 6 2023 Bjarne von Horn
- Fedora support
* Thu Nov 24 2022 Bjarne von Horn
- Port to CMake and QtPdCom1
* Thu Nov 28 2019 Florian Pose
- Exclude qt4 in newer versions
* Thu Feb 8 2018 Florian Pose
- Added qt4 subpackage
#----------------------------------------------------------------------------