Name: appmenu-qt5
Version: 0.r26
Release: 3%{?dist}
Summary: Support for global DBus-exported application menu in Qt5
License: LGPLv3
URL: https://launchpad.net/%{name}
# The source tarball can be created with the following commands:
# bzr branch -r 26 lp:appmenu-qt5
# mv -f appmenu-qt5 appmenu-qt5-0.r26
# tar -zcvf appmenu-qt5-0.r26.tar.gz appmenu-qt5-0.r26
Source0: %{name}-0.r26.tar.gz
Source1: %{name}-README.fedora
BuildRequires: dbusmenu-qt5-devel
BuildRequires: gtk2-devel
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qtbase-static
BuildRequires: systemd-devel
Requires: qt5-qtbase-gui
%description
This is a different, Qt5-compatible approach of the existing appmenu-qt
(https://launchpad.net/appmenu-qt).
appmenu-qt5 is a Qt5 QPA theme plugin that adds support for application
menus to Qt5 applications. This only works for Qt5 versions >= 5.2
currently. To enable the support, set QT_QPA_PLATFORMTHEME=appmenu-qt5
in your environment.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q %{name}
%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{qmake_qt5} CONFIG+=enable-by-default ../appmenu.pro
make %{?_smp_mflags}
popd
%install
make install INSTALL_ROOT=%{buildroot} -C %{_target_platform}
mkdir -p %{buildroot}%{_docdir}/%{name}
mv -f %{buildroot}%{_sysconfdir}/profile.d/appmenu-qt5.sh %{buildroot}%{_docdir}/%{name}
chmod -x %{buildroot}%{_docdir}/%{name}/appmenu-qt5.sh
install -p -m 644 %{SOURCE1} %{buildroot}%{_docdir}/%{name}/README.fedora
%files
%doc README
%license COPYING
%{_docdir}/%{name}/%{name}.sh
%{_docdir}/%{name}/README.fedora
%{_libdir}/qt5/plugins/platformthemes/libappmenu-qt5.so
%files devel
%{_libdir}/cmake/Qt5Gui/Qt5Gui_AppMenuPlatformThemePlugin.cmake
%changelog
* Tue Feb 17 2015 Mario Blättermann <mario.blaettermann@gmail.com> - 0.r26-3
- %%changelog cleanup
- Move the .cmake file to a -devel subpackage
* Sun Jan 25 2015 Mario Blättermann <mario.blaettermann@gmail.com> - 0.r26-2
- Dropped non-existent version number
- Use the script as example, move it to %%doc
- Add README.fedora
* Wed Dec 17 2014 Mario Blättermann <mario.blaettermann@gmail.com> - 0.r26-1
- Initial package