diff --git a/.gitignore b/.gitignore index e69de29..dbd15f1 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/lightdm-gtk-greeter-settings-1.2.0.tar.gz diff --git a/lightdm-gtk-greeter-settings.spec b/lightdm-gtk-greeter-settings.spec new file mode 100644 index 0000000..7ed26c4 --- /dev/null +++ b/lightdm-gtk-greeter-settings.spec @@ -0,0 +1,84 @@ +%global debug_package %{nil} + +Name: lightdm-gtk-greeter-settings +Version: 1.2.0 +Release: 1%{?dist} +Summary: Settings editor for LightDM GTK+ Greeter +License: GPLv3 +URL: https://launchpad.net/lightdm-gtk-greeter-settings +Source0: https://launchpad.net/%{name}/1.2/%{version}/+download/%{name}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-distutils-extra +BuildRequires: intltool +BuildRequires: desktop-file-utils + +Requires: lightdm-gtk +Requires: pygobject3 + + + +%description +Just a small dialog to make it easier for users to modify the settings +of lightdm-gtk-greeter. + +%prep +%setup -q + +# Rename the ubuntu references to fedora +sed -i -e 's@com.ubuntu.pkexec@com.fedora.pkexec@g' com.ubuntu.pkexec.lightdm-gtk-greeter-settings.policy.in \ + po/* +mv com.ubuntu.pkexec.lightdm-gtk-greeter-settings.policy.in com.fedora.pkexec.lightdm-gtk-greeter-settings.policy.in + +rm PKG-INFO + +%build +%{__python3} setup.py build + +%install +%{__python3} setup.py install --root=$RPM_BUILD_ROOT --optimize=1 + +# Remove shebang from files +for lib in $RPM_BUILD_ROOT%{python3_sitelib}/lightdm_gtk_greeter_settings/*.py; do + sed '1{\@^#!/usr/bin/env python@d}' $lib > $lib.new && + touch -r $lib $lib.new && + mv $lib.new $lib +done + +desktop-file-install \ + --delete-original \ + --dir $RPM_BUILD_ROOT/%{_datadir}/applications \ + $RPM_BUILD_ROOT/%{_datadir}/applications/%{name}.desktop + +%find_lang %{name} + +%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 + /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi + +%posttrans +/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + +%files -f %{name}.lang +%doc NEWS README +%license COPYING +%{_bindir}/lightdm-gtk-greeter-settings +%{_bindir}/lightdm-gtk-greeter-settings-pkexec +%{python3_sitelib}/lightdm_gtk_greeter_settings-%{version}-py*.egg-info +%{python3_sitelib}/lightdm_gtk_greeter_settings/ +%{_datadir}/applications/%{name}.desktop +%{_datadir}/icons/hicolor/*/apps/lightdm-gtk-greeter-settings* +%{_datadir}/lightdm-gtk-greeter-settings/ +%{_datadir}/polkit-1/actions/com.fedora.pkexec.lightdm-gtk-greeter-settings.policy + +%changelog +* Sat Jul 04 2015 Leigh Scott - 1.2.0-1 +- Initial build + diff --git a/sources b/sources index e69de29..09a5cf4 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +99f054012e722d8c42f4c17db7a209a8 lightdm-gtk-greeter-settings-1.2.0.tar.gz