File xless.spec of Package xless

#
# spec file for package xless (Version 1.7)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

Name:           xless
BuildRequires:  xorg-x11 xorg-x11-devel
License:        FSR
Group:          Productivity/Text/Utilities
Provides:       xless17 
Autoreqprov:    on
Version:        1.7
Release:        1035
Summary:        Text browser
URL:            http://freeware.sgi.com/source/xless/
Source:         xless-1.7.tar.bz2
Patch0:         xless-1.7.diff
Patch1:         xless-1.7-fonts.diff
Patch2:         xless-1.7-bindir.diff
Patch3:         xless-1.7-exit.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if "%(xft-config --prefix)" == "/usr"
%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_config /usr/share/X11/config #use libshare macro
%define _xorg7_prefix /usr
%else
%define _xorg7libs X11R6/%_lib
%define _xorg7libs32 X11R6/lib
%define _xorg7bin X11R6/bin
%define _xorg7_mandir /usr/X11R6/man
%define _xorg7pixmaps X11R6/include
%define _xorg7libshare X11R6/lib/
%define _xorg7_xkb /etc/X11/xkb
%define _xorg7_termcap /usr/X11R6/lib/X11/etc
%define _xorg7_serverincl /usr/X11R6/lib/Server/include
%define _xorg7_fonts /usr/X11R6/lib/X11/fonts
#%define _xorg7_config /usr/X11R6/lib/X11/config #use libshare macro
%define _xorg7_prefix /usr/X11R6
%endif

%description
xless 1.7 -- the well-known text browser. Necessary for displaying the
various HOWTOs.



Authors:
--------
    Dave Glowacki <dglo@cs.berkeley.edu>

%prep
%setup -q
%patch0
%patch1
%patch2
%patch3

%build
xmkmf -a
make CCOPTIONS="$RPM_OPT_FLAGS"

%install
install -d -m 755 ${RPM_BUILD_ROOT}/usr/%{_xorg7bin}/
install -d -m 755 ${RPM_BUILD_ROOT}/%{_xorg7_mandir}/man1
install -d -m 755 ${RPM_BUILD_ROOT}/usr/%{_xorg7libshare}/X11/app-defaults
install -m 755 xless ${RPM_BUILD_ROOT}/usr/%{_xorg7bin}/
install -m 644 xless.help ${RPM_BUILD_ROOT}/usr/%{_xorg7libshare}/X11/
install -m 644 XLess.ad  ${RPM_BUILD_ROOT}/usr/%{_xorg7libshare}/X11/app-defaults/XLess
install -m 644 XLess-co.ad ${RPM_BUILD_ROOT}/usr/%{_xorg7libshare}/X11/app-defaults/XLess-color
install -m 644 xless.man ${RPM_BUILD_ROOT}/%{_xorg7_mandir}/man1/xless.1x

%clean
rm -rf ${RPM_BUILD_ROOT}

%files
%defattr(-,root,root)
%docdir %{_xorg7_mandir}
%docdir /usr/openwin/man
/usr/%{_xorg7bin}/xless
%config /usr/%{_xorg7libshare}/X11/app-defaults/XLess
%config /usr/%{_xorg7libshare}/X11/app-defaults/XLess-color
%doc /usr/%{_xorg7libshare}/X11/xless.help
%doc %{_xorg7_mandir}/man1/xless.1x.gz

%changelog -n xless
* Thu Aug 03 2006 - lmichnovic@suse.cz
- fixed wrong install directory for pixmaps
- fixed implicit declaration of exit function (exit.diff)
- don't use icecream, build fails in most cases
* Wed Aug 02 2006 - lmichnovic@suse.cz
- fixing defines where to find binary vi and lpr (bindir.diff)
* Wed Aug 02 2006 - lmichnovic@suse.cz
- builds also with new X.org 7.x, detecting prefix in X.org
- building with icecream
- using RPM_OPT_FLAGS
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Jun 02 2004 - ro@suse.de
- remove xmore symlink (file present in xorg-x11 now)
* Fri May 07 2004 - hmacht@suse.de
- added # norootforbuild in specfile
* Fri Jun 13 2003 - mmj@suse.de
- /usr/X11R6/lib/X11/app-defaults is part of the filesystem
* Thu Mar 27 2003 - pmladek@suse.cz
- fixed to use iso8859-2 fonts for related locales (fonts.diff)
- bzipped sources
* Wed Sep 18 2002 - ro@suse.de
- removed bogus self-provides
* Wed Jun 07 2000 - nadvornik@suse.cz
- sorted
* Tue Apr 25 2000 - smid@suse.cz
- buildroot added
* Mon Sep 13 1999 - bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Wed Mar 03 1999 - ro@suse.de
- don't redeclare strchr
* Fri Sep 04 1998 - ro@suse.de
- catch macro strncpy for glibc
* Sun Feb 16 1997 - bs@suse.de
- add symlink xmore