File QtPdWidgets2.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 QtPdWidgets2
%define soversion 3
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: http://etherlab.org/download/pdwidgets/QtPdWidgets2-%{version}.tar.bz2
BuildRequires: fdupes
BuildRequires: libQtPdCom1-devel
%if 0%{?suse_version}
BuildRequires: libqt5-qttools-devel
BuildRequires: libqt5-qtbase-common-devel
BuildRequires: libQt5Core-devel
BuildRequires: libQt5Network-devel
BuildRequires: libQt5Widgets-devel
BuildRequires: libqt5-qtsvg-devel
BuildRequires: libqt5-qtdeclarative-devel
BuildRequires: python3 python3-PyYAML
%else
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qtsvg-devel
BuildRequires: qt5-qttools-devel
BuildRequires: python3 python3-pyyaml
%endif
#----------------------------------------------------------------------------
# Main Package
#----------------------------------------------------------------------------
%description
This is a bundle of process data widgets for Qt5. 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%{libname}-headers = %{version}
%description -n lib%{libname}-devel
This is a bundle of process data widgets for Qt5. 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.
#----------------------------------------------------------------------------
# Header package
#----------------------------------------------------------------------------
%package -n lib%{libname}-headers
Summary: Headers for Applications using %{name}
Group: Development/Libraries/C and C++
BuildArch: noarch
%description -n lib%{libname}-headers
This is a bundle of process data widgets for Qt5. 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
%cmake -DVERSION_HASH=%{version} -DUSE_SYMBOL_VERSIONING=1
%cmake_build
#----------------------------------------------------------------------------
%install
%cmake_install
#----------------------------------------------------------------------------
%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}-headers
%defattr(-,root,root)
%_includedir/%{libname}
%_includedir/%{libname}.h
%files -n lib%{libname}-devel
%defattr(-,root,root)
%_libdir/cmake/%{libname}
%_libdir/lib%{libname}.so
%dir %_libdir/qt5/plugins/designer
%_libdir/qt5/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
#----------------------------------------------------------------------------