File adwaita-qt.spec of Package adwaita-qt

# spec file for package adwaita-qt
# Copyright (c) 2016 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

Name:           adwaita-qt
Version:        0.97
Release:        0
Summary:        Adwaita theme for Qt-based applications
License:        GPL-2.0+ and LGPL-2.1+
Group:          System/GUI/GNOME
BuildRequires:  cmake
BuildRequires:  fdupes
BuildRequires:  libqt4-devel
BuildRequires:  libqt5-qtbase-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Theme to let Qt applications fit nicely into GNOME desktop.

%package -n adwaita-qt4
Summary:        Adwaita Qt4 theme
Supplements:    packageand(libqt4:gnome-session)

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

%package -n adwaita-qt5
Summary:        Adwaita Qt5 theme
Supplements:    packageand(libQt5Core5:gnome-session)

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

%setup -q

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

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

# Qt5 install

%fdupes -s %{buildroot}%{_datadir}/qt5/plugins/styles/

%files -n adwaita-qt4
%dir %{_libdir}/qt4/plugins/styles

%files -n adwaita-qt5
%dir %{_libdir}/qt5/plugins/styles