A new user interface for you! Read more...

File QtPdWidgets.spec of Package QtPdWidgets

#----------------------------------------------------------------------------
#
# $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
#
#----------------------------------------------------------------------------

Name: QtPdWidgets
Version: 1.3.7
Release: 1

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/QtPdWidgets-%{version}.tar.bz2

BuildRequires: fdupes
BuildRequires: libpdcom1-devel
BuildRequires: libqt4-devel
BuildRequires: libqt5-qttools-devel

%if 0%{?suse_version} == 1310
BuildRequires: libqt5-qtbase-devel
%else
BuildRequires: libqt5-qtbase-common-devel
BuildRequires: libQt5Core-devel
BuildRequires: libQt5Network-devel
BuildRequires: libQt5Widgets-devel
BuildRequires: libqt5-qtsvg-devel
%endif

#----------------------------------------------------------------------------
# Main Package
#----------------------------------------------------------------------------

%description
This is a bundle of process data widgets for Qt4/5. It uses the PdCom library
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 devel

Summary: Development files for Applications using %{name}
Group: Development/Libraries/C and C++

%description devel
This is a bundle of process data widgets for Qt4/5. It uses the PdCom library to
access the actual process variables and it includes a plugin for the Qt
Designer. See http://etherlab.org/en/pdwidgets for more information.

#----------------------------------------------------------------------------
# Qt4 Package
#----------------------------------------------------------------------------

%package qt4

Summary: %{name} for Qt4
Group: Productivity/Other

%description qt4
This is a bundle of process data widgets for Qt4. It uses the PdCom library 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

#----------------------------------------------------------------------------

%build

mkdir build-qt4
cd build-qt4
qmake PREFIX=%_prefix LIBDIR=%_libdir PDCOMPREFIX=%_prefix \
	EXPATPREFIX=%_prefix QMAKE_DEFAULT_INCDIRS= ../QtPdWidgets.pro
make %{_smp_mflags}
cd ..

mkdir build-qt5
cd build-qt5
qmake-qt5 PREFIX=%_prefix LIBDIR=%_libdir PDCOMPREFIX=%_prefix \
	EXPATPREFIX=%_prefix QMAKE_DEFAULT_INCDIRS= ../QtPdWidgets.pro

make %{_smp_mflags}
cd ..

#----------------------------------------------------------------------------

%install

cd build-qt4
qmake PREFIX=%_prefix LIBDIR=%_libdir PDCOMPREFIX=%_prefix \
	EXPATPREFIX=%_prefix QMAKE_DEFAULT_INCDIRS= ../QtPdWidgets.pro
make INSTALL_ROOT=%buildroot install
cd ..
mv %buildroot/%_libdir/libQtPdWidgets.so \
    %buildroot/%_libdir/libQtPdWidgets-qt4.so

cd build-qt5
qmake-qt5 PREFIX=%_prefix LIBDIR=%_libdir PDCOMPREFIX=%_prefix \
	EXPATPREFIX=%_prefix QMAKE_DEFAULT_INCDIRS= ../QtPdWidgets.pro
make INSTALL_ROOT=%buildroot install
cd ..

%fdupes %buildroot/%_prefix

#----------------------------------------------------------------------------

%clean

rm -rf %buildroot

#----------------------------------------------------------------------------

%files

%defattr(-,root,root)
%doc AUTHORS COPYING NEWS README TODO
%_libdir/libQtPdWidgets.so
%_libdir/qt5/plugins/designer/libQtPdWidgets.so

%files qt4

%defattr(-,root,root)
%_libdir/libQtPdWidgets-qt4.so
%_libdir/qt4/plugins/designer/libQtPdWidgets.so

%files devel

%defattr(-,root,root)
%_includedir/QtPdWidgets

#----------------------------------------------------------------------------

%changelog
* Thu Feb  8 2018 Florian Pose
- Added qt4 subpackage

#----------------------------------------------------------------------------