Blob Blame History Raw
Name:           light-locker
Version:        1.6.0
Release:        2%{?dist}
Summary:        A simple session-locker for lightdm 

# unclear license: https://github.com/the-cavalry/light-locker/issues/33
License:        GPLv2+
URL:            https://github.com/the-cavalry/%{name}
Source0:        %{url}/releases/download/v%{version}/%{name}-%{version}.tar.bz2
# Queue a resize of all windows on monitor change
Patch0:         %{url}/commit/b638e6c8f49a46b832d0135069b2c2c1dd7246e8.patch
# Fix typo in .desktop file (issue #55)
Patch1:         %{url}/commit/7c5f159ed5db6c765688a2cdcce2a3cd88bf233d.patch

#BuildRequires:  gtk2-devel
BuildRequires:  gtk3-devel
BuildRequires:  libXScrnSaver-devel
# xorg-x11-proto provides "mit-ext"
BuildRequires:  xorg-x11-proto-devel
BuildRequires:  systemd-devel
BuildRequires:  dbus-glib-devel
BuildRequires:  intltool
BuildRequires:  desktop-file-utils

# functional runtime
Requires:       lightdm


%description
%{name} is a simple locker (forked from gnome-screensaver)
that aims to have simple, sane, secure defaults and be well
integrated with the desktop while not carrying any desktop-
specific dependencies.
It relies on lightdm for locking and unlocking your session.


%prep
%setup -q
%patch0 -p1
# desktop-file-validate does not like NotShowIn values
%patch1 -p1
sed -i '/NotShowIn/d' src/*.desktop.in

%build
# FIXME build also gtk2? ( --with-gtk2 )
%configure --disable-silent-rules --with-gtk3 
make %{?_smp_mflags} V=1

%install
%make_install
%find_lang %{name}

%check
desktop-file-validate %{buildroot}%{_sysconfdir}/xdg/autostart/*.desktop


%postun
if [ $1 -eq 0 ] ; then
    /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
fi

%posttrans
    /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :


%files -f %{name}.lang
%license COPYING COPYING.LIB
# ignore empty file HACKING
%doc AUTHORS ChangeLog NEWS README
%{_bindir}/%{name}*
 %{_sysconfdir}/xdg/autostart/*.desktop
# glib2 owns %{datadir}/glib-2.0/schemas
%{_datadir}/glib-2.0/schemas/apps.*.xml
%{_mandir}/man1/%{name}*.1*


%changelog
* Fri Jun 26 2015 Raphael Groner <projects.rg@smart.ms> - 1.6.0-2
- fix license, enhance build options, add gsettings schema scriplets

* Tue May 26 2015 Raphael Groner <projects.rg@smart.ms> - 1.6.0-1
- initial