File light-locker.spec of Package light-locker

Name:           light-locker
Version:        1.6.0
Release:        4%{?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 some typos in desktop file > commits: 7c5f159, 1c23309, be2c892
Source1:         https://raw.githubusercontent.com/cwickert/%{name}/master/src/%{name}.desktop.in

#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
# FIXME remove forked desktop file when upstream merged it
cp -p %{SOURCE1} src


%build
# FIXME build also gtk2? ( --with-gtk2 )
# enforce lock on suspend as RedHat Security Response Team requests (see rhbz#614608 and 632978)
%configure --enable-lock-on-suspend=on --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
* Sun Jul 05 2015 Raphael Groner <projects.rg@smart.ms> - 1.6.0-4
- enforce lock on suspend

* Sun Jul 05 2015 Raphael Groner <projects.rg@smart.ms> - 1.6.0-3
- fix NotShowIn desktop file entry

* 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
openSUSE Build Service is sponsored by