File mingw64-cross-kdewin-tools.spec of Package mingw64-cross-kdewin-tools

#
# spec file for package mingw64-cross-kdewin-tools
#
# Copyright (c) 2014 Ralf Habacker
#
# 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/
#
Name:           mingw64-cross-kdewin-tools
Version:        0.6.0
Release:        0
Source0:        kdewin-tools-%{version}.tar.xz
BuildRequires:  automoc4
BuildRequires:  binutils
BuildRequires:  cmake
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  libqt4-devel
# _mingw64 variables
BuildRequires:  mingw64-filesystem
BuildRequires:  xz

Url:            https://phabricator.kde.org/source/kdewin-tools/
Summary:        KDE on Windows cross support tools
License:        GPL-2.0-or-later
Group:          Development/Libraries/C and C++

%description
KDE on Windows Tooling provides supplementary tools which are required for compiling KDE applications on Windows.

%prep
%setup -q -n kdewin-tools-%{version}

%build
%cmake -DBUILD_PNG2ICO=1 ..
%cmake_build

%install
%cmake_install
mkdir -p %{buildroot}%{_prefix}/%{_mingw64_target}/bin
mv %{buildroot}%{_bindir}/png2ico %{buildroot}%{_prefix}/%{_mingw64_target}/bin
mv %{buildroot}%{_bindir}/svg2multipng %{buildroot}%{_prefix}/%{_mingw64_target}/bin
ln -s ../%{_mingw64_target}/bin/png2ico %{buildroot}%{_bindir}/%{_mingw64_target}-png2ico 
ln -s ../%{_mingw64_target}/bin/svg2multipng %{buildroot}%{_bindir}/%{_mingw64_target}-svg2multipng
mkdir -p %{buildroot}%{_prefix}/share/doc/packages/mingw64-cross-kdewin-tools-%{version}
mv %{buildroot}%{_prefix}/share/doc/kdewin-tools-*/readme.txt %{buildroot}%{_prefix}/share/doc/packages/mingw64-cross-kdewin-tools-%{version}
rm -rf %{buildroot}%{_prefix}/share/doc/kdewin-tools-*
rm -rf %{buildroot}%{_libdir}/cmake
# todo restore native debug package build
rm -rf %{buildroot}/usr/src/debug

%clean
rm -rf %{buildroot}

%files
%{_bindir}/*
%{_prefix}/%{_mingw64_target}/bin
%dir %{_prefix}/share/doc/packages/mingw64-cross-kdewin-tools-%{version}
%{_prefix}/share/doc/packages/mingw64-cross-kdewin-tools-%{version}/readme.txt

%changelog
openSUSE Build Service is sponsored by