Blob Blame Raw
Name:		lightdm-settings
Version:	1.0.7
Release:	2%{?dist}
Summary:	Configuration tool for the LightDM display manager

License:	GPLv3+
URL:		https://github.com/linuxmint/%{name}
Source0:	%{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz

BuildArch:	noarch

BuildRequires:	desktop-file-utils
BuildRequires:	gettext

Requires:	filesystem
Requires:	hicolor-icon-theme
Requires:	polkit
Requires:	python3-xapp
Requires:	python3-gobject
Requires:	python3-setproctitle
Requires:	slick-greeter

%description
This tool currently lets users configure slick-greeter.


%prep
%autosetup -p 1

# Clean she-bangs.
for f in .%{_prefix}/lib/%{name}/*.py ; do
	%{__sed} -e '/^#!.*/d' < ${f} > ${f}.new
	/bin/touch -r ${f} ${f}.new
	%{__mv} -f ${f}.new ${f}
done

# Use pkexec.
f=".%{_bindir}/%{name}"
%{__sed} -e 's!support_pkexec=False!support_pkexec=True!g'		\
	< ${f} > ${f}.new
/bin/touch -r ${f} ${f}.new
%{__mv} -f ${f}.new ${f}


%build
%make_build


%install
# No install-target in Makefile.
%{__cp} -prv .%{_prefix} %{buildroot}

# Set exec-permissions where needed.
%{__chmod} -c 0755 %{buildroot}%{_bindir}/%{name}			\
	 %{buildroot}%{_prefix}/lib/%{name}/%{name}

# Find localizations and build manifest.
%find_lang %{name}


%check
%{_bindir}/desktop-file-validate					\
	%{buildroot}%{_datadir}/applications/*.desktop


%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :


%postun
if [ $1 -eq 0 ] ; then
	/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
	%{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor	\
		&>/dev/null || :
fi


%posttrans
%{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor		\
	&>/dev/null || :


%files -f %%{name}.lang
%license debian/copyright COPYING
%doc debian/changelog README.md
%{_bindir}/%{name}
%{_prefix}/lib/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.*
%{_datadir}/polkit-1/actions/org.x.%{name}.policy


%changelog
* Thu May 18 2017 Björn Esser <besser82@fedoraproject.org> - 1.0.7-2
- Activate support for pkexec

* Wed May 17 2017 Björn Esser <besser82@fedoraproject.org> - 1.0.7-1
- Update to 1.0.7 release (rhbz#1451532)

* Mon May 15 2017 Björn Esser <besser82@fedoraproject.org> - 1.0.5-1
- Update to 1.0.5 release (rhbz#1450706)

* Sun May 07 2017 Björn Esser <besser82@fedoraproject.org> - 1.0.4-1
- Update to 1.0.4 release (rhbz#1448705)
- Pick up installed locales

* Fri May 05 2017 Leigh Scott <leigh123linux@googlemail.com> - 1.0.3-1
- Update to 1.0.3 release
- Add requires python3-xapp

* Wed Apr 26 2017 Björn Esser <besser82@fedoraproject.org> - 1.0.2-4
- Add missing dependency on python3-setproctitle (rhbz#1444436)

* Sat Apr 08 2017 Björn Esser <besser82@fedoraproject.org> - 1.0.2-3
- Add more patches from upstream

* Fri Apr 07 2017 Björn Esser <besser82@fedoraproject.org> - 1.0.2-2
- Add patches from upstream

* Fri Apr 07 2017 Björn Esser <besser82@fedoraproject.org> - 1.0.2-1
- Initial import (rhbz#1440240)

* Fri Apr 07 2017 Björn Esser <besser82@fedoraproject.org> - 1.0.2-0.1
- Initial rpm-release (rhbz#1440240)