File xlockmore.spec of Package xlockmore

# spec file for package xlockmore
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           xlockmore
Version:        5.43
Release:        0
Summary:        Screen Saver and Locker for the X Window System
License:        GPL-2.0+ and MIT
Group:          System/X11/Utilities
Source:         %{name}-%{version}.tar.bz2
Source1:        xlock.pamd
Source2:        xlock-wrapper
Source3:        xlock-wrapper_xorg6
Source4:        %{name}-%{version}.tar.bz2.asc
Source5:        %{name}.keyring
# apply even patches when < 7.0 else apply odd patches
Patch1:         %{name}-bitmaps.patch
Patch3:         xlockmore-ttf_dir.patch
# end of related patches
Patch7:         xlockmore-strict-aliasing.patch
# feel free to improve it and please upstream it
Patch8:         xlockmore-no-copy-dt-needed-entries.patch
# PATCH-FIX-UPSTREAM xlockmore-extend-freetype-include-search.patch -- search only for freetype.h, not the half path. Also,
# extended list of directories where could freetype be found
Patch9:         xlockmore-extend-freetype-include-search.patch
BuildRequires:  automake
BuildRequires:  bc
BuildRequires:  esound-devel
BuildRequires:  fdupes
BuildRequires:  freeglut-devel
BuildRequires:  freetype2-devel
BuildRequires:  ftgl-devel
BuildRequires:  gcc-c++
BuildRequires:  gpg-offline
BuildRequires:  libXdmcp-devel
BuildRequires:  libXt-devel
BuildRequires:  libdrm-devel
BuildRequires:  pkg-config
Requires:       pam-modules
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

The xlock utility locks your X Window System session and runs a screen
saver until a password is entered.

%define _xorg7libs %{_lib}
%define _xorg7libs32 lib
%define _xorg7bin bin
%define _xorg7_mandir %{_mandir}
%define _xorg7pixmaps include
%define _xorg7libshare share
%define _xorg7_xkb /usr/share/X11/xkb
%define _xorg7_termcap /usr/lib/X11/etc
%define _xorg7_serverincl /usr/include/xorg
%define _xorg7_fonts /usr/share/fonts
%define _xorg7_prefix /usr

%gpg_verify %{S:4}
%setup -q
chmod -x README docs/Revisions
%patch8 -p1
%patch9 -p1

export CPPFLAGS="-I/usr/include/FTGL $(freetype-config --cflags)"
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
./configure \
make %{?_smp_mflags}

install -d -m 755 %{buildroot}%{_sysconfdir}/pam.d
install -d -m 755 %{buildroot}%{_prefix}/%{_xorg7bin}/
install -d -m 755 %{buildroot}%{_prefix}/%{_xorg7libshare}/X11/app-defaults/
install -d -m 755 %{buildroot}%{_xorg7_mandir}/man1/
install -d -m 755 %{buildroot}%{_prefix}/%{_xorg7libs32}/xlock
install -m 755 xlock/xlock %{buildroot}%{_prefix}/%{_xorg7libs32}/xlock/xlock
install -m 644 xlock/ %{buildroot}%{_prefix}/%{_xorg7libshare}/X11/app-defaults/XLock
install -m 644 xlock/ %{buildroot}%{_xorg7_mandir}/man1/xlock.1x
install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/pam.d/xlock
%if "%(pkg-config --variable prefix x11 || echo /usr/X11R6)" == "/usr"
install -m 755 %{SOURCE2} %{buildroot}%{_prefix}/%{_xorg7bin}/xlock
install -m 755 %{SOURCE3} %{buildroot}%{_prefix}/%{_xorg7bin}/xlock
%fdupes %{buildroot}/usr

rm -rf %{buildroot}

%defattr(-, root, root)
%doc %{_xorg7_mandir}/man1/xlock.1x.gz
%doc README docs/3d.howto docs/Purify docs/Revisions docs/TODO docs/cell_automata
%config %{_sysconfdir}/pam.d/xlock

openSUSE Build Service is sponsored by