Blob Blame History Raw
%global gtk3_version           2.99.3
%global dbus_version           0.90
%global dbus_glib_version      0.74
%global redhat_menus_version   5.0.1
%global gnome_desktop3_version 3.1.91
%global libgnomekbd_version    2.91.1

Summary: Cinnamon Screensaver
Name:    cinnamon-screensaver
Version: 1.8.0
Release: 3%{?dist}
License: GPLv2+ and LGPLv2+
URL:     http://cinnamon.linuxmint.com

#Because linuxmint upstream refuses to host pristine upstream tarballs
#wget https://github.com/linuxmint/cinnamon-screensaver/archive/%{version}.tar.gz -O %{name}-%{version}.tar.gz
Source0: http://leigh123linux.fedorapeople.org/pub/cinnamon-screensaver/source/%{name}-%{version}.tar.gz

Patch0:  cinnamon-screensaver-2.20.0-selinux-permit.patch


BuildRequires: gtk3-devel => %{gtk3_version}
BuildRequires: dbus-devel >= %{dbus_version}
BuildRequires: dbus-glib-devel >= %{dbus_glib_version}
BuildRequires: gnome-desktop3-devel >= %{gnome_desktop3_version}
BuildRequires: pam-devel
BuildRequires: nss-devel
BuildRequires: libX11-devel, libXScrnSaver-devel, libXext-devel
BuildRequires: libXinerama-devel libXmu-devel
BuildRequires: libgnomekbd-devel >= %{libgnomekbd_version}
# this is here because the configure tests look for protocol headers
BuildRequires: xorg-x11-proto-devel
BuildRequires: intltool
BuildRequires: gnome-common
BuildRequires: libXxf86misc-devel
BuildRequires: libXxf86vm-devel
BuildRequires: libXtst-devel
BuildRequires: desktop-file-utils
BuildRequires: systemd-devel

Requires: gsettings-desktop-schemas >= 0.1.7
Requires: redhat-menus >= %{redhat_menus_version}
# since we use it, and pam spams the log if a module is missing
Requires: gnome-keyring-pam
Conflicts: xscreensaver < 1:5.00-19

# I have no idea why this is required, but for now, just get things to build
BuildRequires:  libxklavier-devel

%description
cinnamon-screensaver is a screen saver and locker.

%prep
%setup -q
%patch0 -p1
echo "ACLOCAL_AMFLAGS = -I m4" >> Makefile.am
echo "AC_CONFIG_MACRO_DIR([m4])" >> configure.ac

NOCONFIGURE=1 ./autogen.sh

%build
%configure --with-mit-ext=no
make V=1 %{?_smp_mflags}

%install
make install DESTDIR=$RPM_BUILD_ROOT

desktop-file-install                                     \
  --delete-original                                      \
  --remove-only-show-in=Xfce                             \
  --dir $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart          \
  $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/cinnamon-screensaver.desktop


%find_lang %{name}

%files -f %{name}.lang
%doc AUTHORS NEWS README COPYING
%{_bindir}/cinnamon-screensaver*
# remove conflicting files
%exclude %{_bindir}/gnome-screensaver*
%{_datadir}/dbus-1/services/org.cinnamon.ScreenSaver.service
%{_libexecdir}/*
%config %{_sysconfdir}/pam.d/*
%{_sysconfdir}/xdg/autostart/cinnamon-screensaver.desktop
%doc %{_mandir}/man1/*.1.gz

%changelog
* Mon Jul 22 2013 Leigh Scott <leigh123linux@googlemail.com> - 1.8.0-3
- fix prep warnings

* Mon Jul 22 2013 Leigh Scott <leigh123linux@googlemail.com> - 1.8.0-2
- fix prep warnings

* Thu Jan 24 2013 Leigh Scott <leigh123linux@googlemail.com> - 1.8.0-1
- Initial build