File mingw-qt6pdwidgets2.spec of Package mingw-qt6pdwidgets2
#----------------------------------------------------------------------------
#
# $Id: QtPdWidgets.spec,v 2f71dcf9b977 2013/01/22 14:42:19 fp $
#
# Copyright (C) 2009 Florian Pose <fp@igh-essen.com>
#
# 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 pkgname QtPdWidgets2
%define libname Qt6PdWidgets2
%{?mingw_package_header}
Name: mingw-%{libname}
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: %{pkgname}-%{version}.tar.gz
BuildRequires: mingw32-filesystem >= 96
BuildRequires: mingw32-gcc-c++
BuildRequires: mingw32-libpdcom5-devel
BuildRequires: mingw32-Qt6PdCom1-devel
BuildRequires: mingw32-qt6-qt5compat
BuildRequires: mingw32-qt6-qtbase
BuildRequires: mingw32-qt6-qttools
BuildRequires: mingw32-qt6-qtsvg
BuildRequires: mingw64-filesystem >= 96
BuildRequires: mingw64-gcc-c++
BuildRequires: mingw64-libpdcom5-devel
BuildRequires: mingw64-Qt6PdCom1-devel
BuildRequires: mingw64-qt6-qt5compat
BuildRequires: mingw64-qt6-qtbase
BuildRequires: mingw64-qt6-qttools
BuildRequires: mingw64-qt6-qtsvg
BuildRequires: fdupes
BuildRequires: cmake
BuildArch: noarch
#----------------------------------------------------------------------------
# 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.
%{?mingw_debug_package}
%package -n mingw32-%{libname}
Summary: Process data widgets for Qt
%description -n mingw32-%{libname}
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.
%package -n mingw64-%{libname}
Summary: Process data widgets for Qt
%description -n mingw64-%{libname}
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 mingw32-%{libname}-devel
Summary: Development files for Applications using %{name}
Group: Development/Libraries/C and C++
Requires: mingw32-%{libname} = %version
Requires: mingw32-%{pkgname}-headers = %version
Requires: mingw32-libpdcom5-devel
Requires: mingw32-Qt6PdCom1-devel
%description -n mingw32-%{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.
%package -n mingw64-%{libname}-devel
Summary: Development files for Applications using %{name}
Group: Development/Libraries/C and C++
Requires: mingw64-%{libname} = %version
Requires: mingw64-libpdcom5-devel
Requires: mingw64-Qt6PdCom1-devel
%description -n mingw64-%{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 %{pkgname}-%version
#----------------------------------------------------------------------------
%build
%if 0%{?fedora} > 38
export MINGW32_CXXFLAGS="%{mingw32_cflags} -msse2"
export MINGW64_CXXFLAGS="%{mingw64_cflags} -msse2"
%endif
%mingw_cmake \
-DVERSION_HASH=%{version} \
-DUSE_QT6=1 \
-DPUT_QT_MAJOR_INTO_LIBNAME=1 \
-DDESIGNER_PLUGIN=0
%mingw_make %{_smp_mflags}
#----------------------------------------------------------------------------
%install
%mingw_make install DESTDIR=$RPM_BUILD_ROOT
%fdupes %{buildroot}/%mingw32_libdir
%fdupes %{buildroot}/%mingw64_libdir
# included in -headers package from Qt5 QtPdWidgets
rm -r %buildroot/%mingw32_includedir/%{pkgname}
rm %buildroot/%mingw32_includedir/%{pkgname}.h
rm -r %buildroot/%mingw64_includedir/%{pkgname}
rm %buildroot/%mingw64_includedir/%{pkgname}.h
#----------------------------------------------------------------------------
%files -n mingw32-%{libname}
%defattr(-,root,root)
%doc AUTHORS COPYING NEWS.md README.md TODO
%mingw32_bindir/lib%{libname}.dll
%files -n mingw64-%{libname}
%defattr(-,root,root)
%doc AUTHORS COPYING NEWS.md README.md TODO
%mingw64_bindir/lib%{libname}.dll
%files -n mingw32-%{libname}-devel
%defattr(-,root,root)
%mingw32_libdir/lib%{libname}.dll.a
%mingw32_libdir/cmake/%{libname}
%files -n mingw64-%{libname}-devel
%defattr(-,root,root)
%mingw64_libdir/lib%{libname}.dll.a
%mingw64_libdir/cmake/%{libname}
#----------------------------------------------------------------------------
%changelog
* Wed Nov 30 2011 Bjarne von Horn
- Ported to QtPdCom1
* Thu Nov 28 2019 Florian Pose
- Exclude qt4 in newer versions
* Thu Feb 8 2018 Florian Pose
- Added qt4 subpackage
#----------------------------------------------------------------------------