diff --git a/.gitignore b/.gitignore index e69de29..4a406bf 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,4 @@ +*~ +*.rpm +*.tar* +results_*/ diff --git a/lightdm-settings.spec b/lightdm-settings.spec new file mode 100644 index 0000000..fdd617a --- /dev/null +++ b/lightdm-settings.spec @@ -0,0 +1,128 @@ +Name: lightdm-settings +Version: 1.0.2 +Release: 1%{?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-gobject +Requires: slick-greeter + +%description +This tool currently lets users configure slick-greeter. + + +%prep +%autosetup + +# 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 + +# We use pkexec instead of gksu and /bin/sh instead of /bin/bash. +f=.%{_bindir}/%{name} +%{__sed} -e 's~#![ \t]*/bin/bash~#!/bin/sh~g' \ + -e 's!gksu!%{_bindir}/pkexec!g' < ${f} > ${f}.new +/bin/touch -r ${f} ${f}.new +%{__mv} -f ${f}.new ${f} + +# Create polkit policy configuration for lightdm-settings. +%{__cat} << EOF > org.freedesktop.policykit.exec.%{name}.policy + + + + + Fedora + http://fedoraproject.org/ + + + Run %{name} with elevated privileges + Authentication is required to run %{name} as root + %{name} + + no + no + auth_admin_keep + + %{_prefix}/lib/%{name}/%{name} + true + + + +EOF + + +%build +%make_build + + +%install +# No install-target in Makefile. +%{__cp} -prv .%{_prefix} %{buildroot} + +# Install polkit policy configuration for lightdm-settings. +%{__install} -Dpm 0644 org.freedesktop.policykit.exec.%{name}.policy \ + %{buildroot}%{_datadir}/polkit-1/actions/org.freedesktop.policykit.exec.%{name}.policy + +# 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 +#%%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.freedesktop.policykit.exec.%{name}.policy + + +%changelog +* Fri Apr 07 2017 Björn Esser - 1.0.2-1 +- Initial import (rhbz#1440240) + +* Fri Apr 07 2017 Björn Esser - 1.0.2-0.1 +- Initial rpm-release (rhbz#1440240) diff --git a/sources b/sources index e69de29..aeb2b31 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +SHA512 (lightdm-settings-1.0.2.tar.gz) = f44c28caeba50411fcdbee22984c9a1e2526ad8b5cd934b9fcb9dd3e6f65efd8d1b31d517d4bd0f0689d0736823e6299b1b2a3f15d7527007972085617582992