Blob Blame History Raw
Name:		appmenu-qt5
Version:	0.3.0+16.10.20160628.1
Release:	1%{?dist}
Summary:	Support for global DBus-exported application menu in Qt5

License:	LGPLv3
URL:		https://launchpad.net/%{name}
Source0:	http://archive.ubuntu.com/ubuntu/pool/main/a/%{name}/%{name}_%{version}.orig.tar.gz

BuildRequires:	dbusmenu-qt5-devel
BuildRequires:	gtk2-devel
BuildRequires:	qt5-qtbase-devel
BuildRequires:	qt5-qtbase-static
BuildRequires:	systemd-devel

Requires:	qt5-qtbase-gui%{?_isa}

%description
This is a different, Qt5-compatible approach of the existing appmenu-qt
(https://launchpad.net/appmenu-qt).

%{name} 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=%{name}
in your environment or install the %{name}-profile.d package to
enable system-wide, see README.fedora *BEFORE* for further information.


%package profile.d
Summary:	Profile.d-config for %{name}

BuildArch:	noarch

Requires:	%{name}		== %{version}-%{release}
Requires:	setup

%description profile.d
This package contains profile.d-config-files for %{name}.


%prep
%autosetup -c
%{__mkdir} -p %{_target_platform}

# Set permissions on integration-file.
%{__chmod} 0644 data/%{name}.sh

# Create %%{name}.csh for profile.d.
%{__cat} << EOF > data/%{name}.csh
setenv QT_QPA_PLATFORMTHEME %{name}
EOF
%{_bindir}/touch -r data/%{name}.sh data/%{name}.csh

# Create README.fedora
%{__cat} << EOF > README.fedora
This package contains a script named %{name}.sh, which activates
the global menu for Qt5 applications.

To activate it globally for all users, install %{name}-profile.d.
This is not recommended, because it works currently only with plasma-
widget-menubar in KDE SC4, all other desktops are not affected. It
would cause that the menubar of Qt5 applications is not visible there.
Unfortunately %{name} is its own Qt5-"platform", which means
enabling it breaks all other platform integration in Qt 5.  There is
not much you can do about that, but not enabling it.

To activate it for a certain user, integrate the contenst of the same
file located in %%doc into the appropriate autostart.
EOF


%build
pushd %{_target_platform}
%{qmake_qt5} CONFIG+=enable-by-default ../appmenu.pro
%make_build
popd


%install
%make_install INSTALL_ROOT=%{buildroot} -C %{_target_platform}
%{__install} -pm 0644 data/%{name}.csh %{buildroot}%{_sysconfdir}/profile.d


%files
%license COPYING
%doc data/%{name}.csh data/%{name}.sh README README.fedora
%{_libdir}/qt5/plugins/platformthemes/lib%{name}.so

%files profile.d
%{_sysconfdir}/profile.d/%{name}.*


%changelog
* Fri Oct 07 2016 Björn Esser <fedora@besser82.io> - 0.3.0+16.10.20160628.1-1
- Update to new release v0.3.0+16.10.20160628.1
- Un-retirement (rhbz 1382811)
- Update to recent packaging-guidelines

* Fri Oct 07 2016 Björn Esser <fedora@besser82.io> - 0.3.0+16.10.20160628.1-0.1
- Re-review after retirement (rhbz 1382811)

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.r26-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.r26-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.r26-4
- Rebuilt for GCC 5 C++11 ABI change

* 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