File adwaita-qt.spec of Package adwaita-qt

# spec file for package adwaita-qt
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2015 Bjørn Lie, Bryne, Norway.
# 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

%if (0%{?is_opensuse} && 0%{?suse_version} < 1500) || 0%{?is_backports}
%bcond_without qt4
%bcond_with qt4
Name:           adwaita-qt
Version:        1.1.0
Release:        0
Summary:        Adwaita theme for Qt-based applications
License:        GPL-2.0-or-later AND LGPL-2.1-or-later
Group:          System/GUI/GNOME
Source0:        %{url}/archive/%{version}.tar.gz
# PATCH-FIX-UPSTREAM adwaita-qt-upstream-fixes.patch -- Pull in latest fixes from upstream
Patch0:         adwaita-qt-upstream-fixes.patch

BuildRequires:  cmake
BuildRequires:  fdupes
BuildRequires:  libqt5-qtbase-devel
%if %{with qt4}
BuildRequires:  libqt4-devel

Theme to let Qt applications fit nicely into GNOME desktop.

%package -n adwaita-qt4
Summary:        Adwaita Qt4 theme
Group:          System/GUI/GNOME
Supplements:    packageand(libqt4:gnome-session)

%description -n adwaita-qt4
Adwaita theme variant for applications utilizing Qt4

%package -n adwaita-qt5
Summary:        Adwaita Qt5 theme
Group:          System/GUI/GNOME
Supplements:    packageand(libQt5Core5:gnome-session)

%description -n adwaita-qt5
Adwaita theme variant for applications utilizing Qt5

%autosetup -p1

%if %{with qt4}
# Qt4 build and install
%cmake -DUSE_QT4=ON
make %{?_smp_mflags}
cd ..

# Qt5 build
rm -rf build
%cmake -DUSE_QT4=OFF
make %{?_smp_mflags}

# Qt5 install

%if %{with qt4}
%files -n adwaita-qt4
%license LICENSE.LGPL2
%dir %{_libdir}/qt4/plugins/styles

%files -n adwaita-qt5
%license LICENSE.LGPL2
%dir %{_libdir}/qt5/plugins/styles

openSUSE Build Service is sponsored by