File mingw32-umbrello5.spec of Package mingw32-umbrello5

#
# spec file for package umbrello
#
# 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 _name   umbrello5
Name:           mingw32-%{_name}
Summary:        UML Modeller
License:        GPL-2.0 and GFDL-1.2
Group:          Development/Tools/Other
Url:            https://umbrello.kde.org
Version:        2.38.80
Release:        0
Source0:        umbrello-%{version}.tar.xz
Source1:        umbrello-apphelp-translations.tar.xz
BuildRequires:  kdevelop5-pg-qt
BuildRequires:  mingw32-cross-cmake
BuildRequires:  mingw32-cross-gcc-c++
BuildRequires:  mingw32-kdevelop5-pg-qt
BuildRequires:  mingw32-kdevplatform5-devel
BuildRequires:  mingw32(cmake:Qt5Svg)
BuildRequires:  mingw32(cmake:KF5Archive)
BuildRequires:  mingw32(cmake:KF5Completion)
BuildRequires:  mingw32(cmake:KF5Config)
BuildRequires:  mingw32(cmake:KF5CoreAddons)
BuildRequires:  mingw32(cmake:KF5Crash)
BuildRequires:  mingw32(cmake:KF5DocTools)
BuildRequires:  mingw32(cmake:KF5I18n)
BuildRequires:  mingw32(cmake:KF5IconThemes)
BuildRequires:  mingw32(cmake:KF5KIO)
BuildRequires:  mingw32(cmake:KF5SyntaxHighlighting)
BuildRequires:  mingw32(cmake:KF5TextEditor)
BuildRequires:  mingw32(cmake:KF5WidgetsAddons)
BuildRequires:  mingw32(cmake:KF5WindowSystem)
BuildRequires:  mingw32(cmake:KF5XmlGui)
BuildRequires:  mingw32-libxml2-devel
BuildRequires:  mingw32-libxslt-devel
BuildRequires:  mingw32-oxygen5-icon-theme
BuildRequires:  gettext-tools
#Requires:       mingw32-khelpcenter-online
Requires:       mingw32-oxygen5-icon-theme
%_mingw32_package_header_debug
BuildArch:      noarch

%description
Umbrello is a UML modelling application.

%lang_package

%_mingw32_debug_package

%prep
%autosetup -p1 -n umbrello-%{version}

# unpack apphelp translations
tar -xJf %{SOURCE1}
cat doc/CMakeLists.txt.append >> CMakeLists.txt

%build
  %_mingw32_cmake_kf5 -d build -- -DKDEVPGQT_EXECUTABLE=/usr/bin/kdev-pg-qt -DBUILD_PARSER_ONLY=TRUE -Wno-dev -DGETTEXT_FOUND=1 -DBUILD_KF5=1
  %_mingw32_cmake_build

%install
  %_mingw32_kf5_makeinstall -C build
  %_mingw32_kf5_post_install
  %_mingw32_find_lang %{_name} %{_name}.lang --all-name || true
  #%suse_update_desktop_file    umbrello       Development Design
  # kde uses oxygen theme as default, installing icons in 

  chmod a-x %{buildroot}/%{_mingw32_kf5_applicationsdir}/org.kde.umbrello.desktop

  # fix bug that meinproc5 does not create compressed files for unknown reason
  for i in $(find %{buildroot}%{_mingw32_kf5_htmldir} -name index.cache.bz2); do
      o=$(echo $i | sed 's,\.bz2,,g')
      mv $i $o
      bzip2 $o
  done

%files
%defattr(-,root,root)

%doc COPYING COPYING.DOC README
%{_mingw32_kf5_bindir}/umbrello5.exe
%{_mingw32_kf5_bindir}/po2xmi5.exe
%{_mingw32_kf5_bindir}/xmi2pot5.exe
%dir %{_mingw32_kf5_appsdir}
%{_mingw32_kf5_appsdir}/umbrello5/
%{_mingw32_kf5_applicationsdir}/org.kde.umbrello.desktop
%{_mingw32_kf5_appstreamdir}/org.kde.umbrello.appdata.xml
%dir %{_mingw32_datadir}/icons
%{_mingw32_datadir}/icons/
%{_mingw32_kf5_htmldir}/en

%files lang -f %{_name}.lang
%defattr(-,root,root,-)
%{_mingw32_kf5_htmldir}
%exclude %{_mingw32_kf5_htmldir}/en

%changelog
openSUSE Build Service is sponsored by