File mingw64-qwt6-qt5.spec of Package mingw64-qwt6-qt5

#
# spec file for package mingw64-qwt6-qt5
#
# Copyright (c) 2015-2024, Martin Hauke <mardnh@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

%define realname qwt6-qt5
Name:           mingw64-%{realname}
Version:        6.1.2
Release:        0
Summary:        Qt5 Widgets for Technical Applications
License:        SUSE-QWT-1.0
Group:          Development/Libraries/C and C++
Url:            http://qwt.sourceforge.net/
Source:         http://downloads.sourceforge.net/qwt/qwt-%{version}.tar.bz2
BuildRequires:  mingw64-cross-binutils
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-cross-cmake
BuildRequires:  mingw64-cross-gcc-c++
BuildRequires:  mingw64-cross-pkg-config
BuildRequires:  mingw64-filesystem
BuildRequires:  mingw64-libpng-devel
BuildRequires:  mingw64-freetype-devel
BuildRequires:  mingw64-libqt5-qtsvg-devel
BuildRequires:  mingw64-cross-libqt5-qmake
# Needed otherwise: Cannot open include file: 'GLES2/gl2.h': No such file or directory
BuildRequires:  mingw64-angleproject-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
%{_mingw64_package_header_debug}
%{_mingw64_debug_package}

%description
The Qwt(Qt5) library contains GUI Components and utility classes which are
primarily useful for programs with a technical background. Beside a 2D
plot widget it provides scales, sliders, dials, compasses, thermometers,
wheels and knobs to control or display values, arrays, or ranges of type
double.

%package devel
Summary:        Include headers and Qt Designer plugin for Qwt(Qt5)
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}

%description devel
This package contains the header files of Qwt and its Qt designer plugin
in order to create Qt applications using the Qwt(Qt5) widgets.

%prep
%setup -q -n qwt-%{version}

# Build release only
sed -i 's|+= debug_and_release|+= release|' qwtbuild.pri
sed -i '/+= build_all/d' qwtbuild.pri
# No designer plugin:
sed -i 's|+= QwtDesigner|-= QwtDesigner|' qwtconfig.pri

%build
export PATH=%{_mingw64_libdir}/qt5/bin/:$PATH

mingw64-qmake-qt5 \
	QMAKE_STRIP="" \
	QWT_INSTALL_PREFIX=%{_mingw64_prefix} \
	CONFIG+=QwtDll -after \
	QMAKE_CXXFLAGS="%{optflags}" \
	target.path=%{_mingw64_libdir} \
	headers.path=%{_mingw64_includedir}/%{realname} \
	qwtspec.path=%{_mingw64_datadir}/%{realname}/features \
	qwtmathmlspec.path=%{_mingw64_datadir}/%{realname}/features \
        doc.path=%{_docdir}/%{name}-devel-doc

%{_mingw64_make} VERBOSE=1 %{?_smp_mflags}

%install
make VERBOSE=1 DESTDIR=%{buildroot} install INSTALL_ROOT=%{buildroot}

# No Documentation
rm -rf %{buildroot}/%{_docdir}/%{name}-devel-doc

%files
%{_mingw64_libdir}/libqwt.dll

%files devel
%{_mingw64_libdir}/libqwt.dll.a
%{_mingw64_includedir}/qwt6-qt5/
%dir %{_mingw64_datadir}/qwt6-qt5/
%{_mingw64_datadir}/qwt6-qt5/features/

%changelog
openSUSE Build Service is sponsored by