Blob Blame History Raw
%bcond_without autostart

%if %{with autostart}
# Till Fedora 23, we use polkit-gnome instead and disable autostart to avoid any conflicts.
%if 0%{?fedora} >= 24
%global autostart_desktop 1
%endif
%if 0%{?rhel} >= 7
%global autostart_desktop 1
%endif
%endif

Name:           xfce-polkit
Version:        0.2
Release:        12%{?dist}
Summary:        Simple PolicyKit authentication agent for Xfce

License:        GPLv2+
URL:            https://github.com/ncopa/%{name}
Source0:        %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# desktop file, https://github.com/ncopa/xfce-polkit/issues/2
Patch0:         https://github.com/ncopa/xfce-polkit/commit/fabc2f7756cfb1a9cccfcc675d0857b3d3e98f84.patch

BuildRequires:  automake
BuildRequires:  libxfce4ui-devel polkit-devel
BuildRequires:  desktop-file-utils

Provides: PolicyKit-authentication-agent

Requires: polkit >= 0.97

%description
%{summary}.


%prep
%autosetup
autoreconf -fi

%build
%configure
%make_build

%install
%make_install
desktop-file-edit --remove-key=NotShowIn --add-only-show-in=XFCE \
 %{buildroot}%{_sysconfdir}/xdg/autostart/%{name}.desktop


%files
%license LICENSE
%doc AUTHORS README.md
# do not distribute empty documentation files
#doc ChangeLog NEWS
%{_libexecdir}/%{name}
%if 0%{?autostart_desktop}
%{_sysconfdir}/xdg/autostart/%{name}.desktop
%else
%exclude %{_sysconfdir}/xdg/autostart/%{name}.desktop
%endif


%changelog
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Thu Jul 07 2016 Raphael Groner <projects.rg@smart.ms> - 0.2-8
- autostart in xfce only, rhbz#1350775
- use autoreconf

* Sat Jun 18 2016 Raphael Groner <projects.rg@smart.ms> - 0.2-7
- enable autostart in epel7, rhbz#1343772

* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Mon Dec 21 2015 Raphael Groner <projects.rg@smart.ms> - 0.2-5
- add build conditional for inclusion of desktop file for autostart
  (rhbz#1281464)

* Sat Dec 19 2015 Raphael Groner <projects.rg@smart.ms> - 0.2-4
- disable desktop file in Fedora 23 and prior (in favor of gnome-polkit)

* Sat Dec 19 2015 Raphael Groner <projects.rg@smart.ms> - 0.2-3
- show name in xfce4-session, rhbz#1281464

* Sun Nov 08 2015 Kevin Fenzi <kevin@scrye.com> - 0.2-2
- Enable desktop file.

* Sat Sep 26 2015 Raphael Groner <projects.rg@smart.ms> - 0.2-1
- new version 0.2, rhbz#1266689
- disable default autostart for now to avoid conflict with xfce4-session

* Sat Sep 26 2015 Raphael Groner <projects.rg@smart.ms> - 0.1-1
- official upstream version 0.1

* Sat Sep 26 2015 Raphael Groner <projects.rg@smart.ms> - 0-0.2.20150924git05568a1
- fix segfault with glib-2.45 (upstream), rhbz#1264590

* Mon Jul 27 2015 Raphael Groner <projects.rg@smart.ms> - 0-0.1.20130717gitbe888ee
- initial