File mingw-qtpdwidgets2.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 libname QtPdWidgets2
%{?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: %{libname}-%{version}.tar.gz
BuildRequires:  mingw32-filesystem >= 96
BuildRequires:  mingw32-gcc-c++
BuildRequires:  mingw32-libpdcom5-devel
BuildRequires:  mingw32-QtPdCom1-devel
BuildRequires:  mingw32-qt5-qmake
BuildRequires:  mingw32-qt5-qtbase-devel
BuildRequires:  mingw32-qt5-qttools
BuildRequires:  mingw32-qt5-qttools-tools
BuildRequires:  mingw32-qt5-qtsvg
BuildRequires:  mingw64-filesystem >= 96
BuildRequires:  mingw64-gcc-c++
BuildRequires:  mingw64-libpdcom5-devel
BuildRequires:  mingw64-QtPdCom1-devel
BuildRequires:  mingw64-qt5-qmake
BuildRequires:  mingw64-qt5-qtbase-devel
BuildRequires:  mingw64-qt5-qttools
BuildRequires:  mingw64-qt5-qttools-tools
BuildRequires:  mingw64-qt5-qtsvg
# choice fix for fedora 38
%if 0%{?fedora} == 38
BuildRequires:  glibc-langpack-en
%endif
BuildRequires:  qt5-linguist
BuildRequires:  fdupes
BuildRequires:  cmake
BuildArch:      noarch
#----------------------------------------------------------------------------
# Main Package
#----------------------------------------------------------------------------
%description
This is a bundle of process data widgets for Qt4/5. 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 Qt4/5. 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 Qt4/5. 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.
#----------------------------------------------------------------------------
# Headers package
#----------------------------------------------------------------------------
%package -n mingw32-%{libname}-headers
Summary: Headers for Applications using %{name}
Group: Development/Libraries/C and C++
Requires: mingw32-libpdcom5-devel
%description -n mingw32-%{libname}-headers
This is a bundle of process data widgets for Qt4/5. 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}-headers
Summary: Headers for Applications using %{name}
Group: Development/Libraries/C and C++
Requires: mingw64-libpdcom5-devel
%description -n mingw64-%{libname}-headers
This is a bundle of process data widgets for Qt4/5. 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-%{libname}-headers = %version
Requires: mingw32-QtPdCom1-devel
%description -n mingw32-%{libname}-devel
This is a bundle of process data widgets for Qt4/5. 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-%{libname}-headers = %version
Requires: mingw64-QtPdCom1-devel
%description -n mingw64-%{libname}-devel
This is a bundle of process data widgets for Qt4/5. 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 %{libname}-%version
#----------------------------------------------------------------------------
%build
%mingw_cmake -DVERSION_HASH=%{version}
%mingw_make %{_smp_mflags}
#----------------------------------------------------------------------------
%install
%mingw_make install DESTDIR=$RPM_BUILD_ROOT
# symlink for designer plugin
install -d %{buildroot}/%mingw32_libdir/qt5/plugins/designer
install -d %{buildroot}/%mingw64_libdir/qt5/plugins/designer
%fdupes %{buildroot}/%mingw32_libdir
%fdupes %{buildroot}/%mingw64_libdir
#----------------------------------------------------------------------------
%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}-headers
%defattr(-,root,root)
%mingw32_includedir/%{libname}
%mingw32_includedir/%{libname}.h
%files -n mingw64-%{libname}-headers
%defattr(-,root,root)
%mingw64_includedir/%{libname}
%mingw64_includedir/%{libname}.h
%files -n mingw32-%{libname}-devel
%defattr(-,root,root)
%dir %mingw32_libdir/qt5/plugins/designer
%mingw32_libdir/qt5/plugins/designer/lib%{libname}Plugin.dll
%mingw32_libdir/lib%{libname}.dll.a
%mingw32_libdir/cmake/%{libname}
%files -n mingw64-%{libname}-devel
%defattr(-,root,root)
%dir %mingw64_libdir/qt5/plugins/designer
%mingw64_libdir/qt5/plugins/designer/lib%{libname}Plugin.dll
%mingw64_libdir/lib%{libname}.dll.a
%mingw64_libdir/cmake/%{libname}
#----------------------------------------------------------------------------
%changelog
* Tue May 7 2024 Bjarne von Horn
- Split headers for Qt6 package
* Wed Nov 30 2021 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
#----------------------------------------------------------------------------