File mingw32-libdbusmenu-qt5.spec of Package mingw32-libdbusmenu-qt5

#
# spec file for package mingw32-libdbusmenu-qt5
#
# Copyright (c) 2017 SUSE LINUX 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 rname libdbusmenu-qt

%define _name   libdbusmenu-qt5
Name:           mingw32-%{_name}
Version:        0.9.3+16.04.20160218
Release:        0
Url:            https://launchpad.net/libdbusmenu-qt/
Summary:        A Qt implementation of the DBusMenu protocol
License:        LGPL-2.0-or-later
Group:          System/Libraries
Source:         http://archive.ubuntu.com/ubuntu/pool/main/libd/%{rname}/%{rname}_%{version}.orig.tar.gz
Patch3:         0001-mingw32-compile-fix.patch
#Needed for DISABLE_FIND_PACKAGE
BuildRequires:  mingw32-cross-cmake
BuildRequires:  mingw32-cross-gcc-c++
BuildRequires:  doxygen
BuildRequires:  mingw32-pkg-config
BuildRequires:  mingw32(pkg:Qt5Core)
BuildRequires:  mingw32(pkg:Qt5DBus)
BuildRequires:  mingw32(pkg:Qt5Widgets)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%_mingw32_package_header_debug
BuildArch:      noarch

%description
This library provides a Qt implementation of the DBusMenu protocol.

The DBusMenu protocol makes it possible for applications to export and import
their menus over DBus. Qt5 library

%package -n mingw32-libdbusmenu-qt5-2
Summary:        Development package for dbusmenu-qt5
Group:          System/Libraries

%description -n mingw32-libdbusmenu-qt5-2
This library provides a Qt implementation of the DBusMenu protocol.

The DBusMenu protocol makes it possible for applications to export and import
their menus over DBus. Qt5 library

%package -n mingw32-libdbusmenu-qt5-devel
Summary:        Development package for libdbusmenu-qt5
Group:          Development/Libraries/Other
Requires:       mingw32-libdbusmenu-qt5-2 = %{version}
Requires:       mingw32(pkg:Qt5Core)

%description -n mingw32-libdbusmenu-qt5-devel
This package contains development files for libdbusmenu-qt5.

%_mingw32_debug_package

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

# Remove build time references so build-compare can do its work
sed -i "s/HTML_TIMESTAMP         = YES/HTML_TIMESTAMP         = NO/" Doxyfile.in

%build
%_mingw32_cmake -DUSE_QT5=ON -DCMAKE_DISABLE_FIND_PACKAGE_QJSON=TRUE
make %{?_smp_mflags} VERBOSE=1

%install
%_mingw32_cmake_install

# Install the documentation in the correct location
mkdir -p %{buildroot}%{_mingw32_docdir}/libdbusmenu-qt5-devel
mv %{buildroot}%{_mingw32_datadir}/doc/libdbusmenu-qt5-doc/ %{buildroot}%{_mingw32_docdir}/libdbusmenu-qt5-devel/html/
# Install additional documentation
install -pm 0644 COPYING NEWS README %{buildroot}%{_mingw32_docdir}/libdbusmenu-qt5-devel/




%files -n mingw32-libdbusmenu-qt5-2
%defattr(-,root,root,-)
%if 0
%{_mingw32_bindir}/libdbusmenu-qt5*.dll
%endif

%files -n mingw32-libdbusmenu-qt5-devel
%defattr(-,root,root,-)
%doc %{_mingw32_docdir}/libdbusmenu-qt5-devel/
%if 0
%{_mingw32_libdir}/libdbusmenu-qt5.dll.a
%else
%{_mingw32_libdir}/libdbusmenu-qt5.a
%endif
%{_mingw32_includedir}/dbusmenu-qt5/
%{_mingw32_libdir}/pkgconfig/dbusmenu-qt5.pc
%{_mingw32_libdir}/cmake/dbusmenu-qt5/

%changelog
openSUSE Build Service is sponsored by