%if 0%{?fedora} >= 24
%global qt5_ver 5.6
%global qt5_ver_minor 0
%else
%global qt5_ver 5.6
%global qt5_ver_minor 0
%endif
%global qt5_version %{qt5_ver}.%{qt5_ver_minor}
Name: qgnomeplatform
Version: 0.1
Release: 5%{?dist}
Summary: Qt Platform Theme aimed to accommodate Gnome settings
License: LGPLv2+
URL: https://github.com/MartinBriza/QGnomePlatform
Source0: https://github.com/MartinBriza/QGnomePlatform/archive/0.1.tar.gz#/QGnomePlatform-%{version}.tar.gz
# Upstream patches
Patch0: upstream-fixes.patch
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(udev)
BuildRequires: pkgconfig(xkbcommon)
BuildRequires: libinput-devel
BuildRequires: libXrender-devel
BuildRequires: qt5-qtbase-devel >= %{qt5_ver}.0 qt5-qtbase-devel <= %{qt5_ver}.100
BuildRequires: qt5-qtbase-static
Requires: gdm
Requires: qt5-qtbase%{?_isa} = %{qt5_version}
%description
QGnomePlatform is a Qt Platform Theme aimed to accommodate as much of
GNOME settings as possibleand utilize them in Qt applications without
modifying them - making them fit into the environment as well as possible.
%prep
%autosetup -p1 -n QGnomePlatform-%{version}
%build
mkdir %{_target_platform}
pushd %{_target_platform}
%{qmake_qt5} ..
popd
make %{?_smp_mflags} -C %{_target_platform}
%install
make install INSTALL_ROOT=%{buildroot} -C %{_target_platform}
%files
%doc README.md
%license LICENSE
%{_qt5_libdir}/qt5/plugins/platformthemes/libqgnomeplatform.so
%changelog
* Wed Apr 20 2016 Jan Grulich <jgrulich@redhat.com> - 0.1-5
- Pull in upstream changes
* Wed Mar 16 2016 Jan Grulich <jgrulich@redhat.com> - 0.1-4
- Improve font size
* Thu Feb 25 2016 Jan Grulich <jgrulich@redhat.com> - 0.1-3
- Revert usage of qgnomeplatform.env in GDM
* Thu Feb 25 2016 Jan Grulich <jgrulich@redhat.com> - 0.1-2
- Install qgnomeplatform.env to gdm to automatically use it after we log in
* Tue Feb 16 2016 Jan Grulich <jgrulich@redhat.com> - 0.1-1
- First version