File mingw64-libqt5-qtenginio.spec of Package mingw64-libqt5-qtenginio

#
# spec file for package mingw64-qt5-qtwinextras
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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 qt5_snapshot 1
%global qt_module qtenginio
#%%global pre beta1
%global source_folder %{qt_module}-everywhere-src-%{version}%{?pre:-%pre}
Name:           mingw64-libqt5-%{qt_module}
Version:        5.6.2+kde10
Release:        0
Summary:        Qt5 for Windows - Qt Cloud Services API component
License:        GPL-3.0-only or SUSE-LGPL-2.1-with-digia-exception-1.1
Group:          Development/Libraries
Url:            http://qt-project.org/
Source0:        %{source_folder}.tar.xz
Patch0:         qtenginio-5.6.2-fix-building.patch
BuildRequires:  mingw64-libqt5-qtbase-devel
BuildRequires:  mingw64-pcre-devel
BuildRequires:  xz
BuildArch:      noarch
%_mingw64_package_header_debug

%description
This package contains the Qt software toolkit for developing
cross-platform applications.

This is the Windows version of Qt, for use in conjunction with the
openSUSE Windows cross-compiler.

%package devel
Summary:        Qt5 for Windows - QtWinExtras component (development)
Group:          Development/Libraries

%description devel
This package contains the Qt software toolkit for developing
cross-platform applications.

This is the Windows version of Qt, for use in conjunction with the
openSUSE Windows cross-compiler.

%_mingw64_debug_package

%prep
%autosetup -p1 -n %{source_folder}

%build
%if %{qt5_snapshot}
#force the configure script to generate the forwarding headers (it checks whether .git directory exists)
mkdir .git
%endif
mkdir build
cd build
mingw64-qmake-qt5 ../%{qt_module}.pro

# fix missing include dirs
p=$PWD
mkdir -p include/Enginio/private
cd include/Enginio
find  ../../../src/enginio_client/ -name '*.h' -exec  ln -s {} \;
cd private
find  ../../../../src/enginio_client/ -name '*.h' -exec  ln -s {} \;
cd $p

%{_mingw64_make} %{?_smp_mflags}

%install
cd build
# fix mingw64-libqt5-qtenginio-devel.noarch: W: zero-length /usr/x86_64-w64-mingw64/sys-root/mingw/lib/pkgconfig/Enginio.pc
#     sed: can't read ../../build/lib/pkgconfig/Enginio.pc: No such file or directory
sed -i 's,../../build/lib/pkgconfig/Enginio.pc,../../../build/lib/pkgconfig/Enginio.pc,g' src/enginio_client/Makefile.Release

%{_mingw64_make} install INSTALL_ROOT=%{buildroot}

# .prl files aren't interesting for us
find %{buildroot} -name "*.prl" -delete

# Win32

%files
%defattr(-, root, root)
%{_mingw64_bindir}/libEnginio.dll

%files devel
%defattr(-, root, root)
%{_mingw64_includedir}/qt5/Enginio/
%{_mingw64_libdir}/libEnginio.dll.a
%{_mingw64_libdir}/pkgconfig/Enginio.pc
%{_mingw64_libdir}/cmake/Qt5Enginio/
%{_mingw64_datadir}/qt5/mkspecs/modules/qt_lib_enginio.pri
%{_mingw64_datadir}/qt5/mkspecs/modules/qt_lib_enginio_private.pri

%changelog
openSUSE Build Service is sponsored by