File xless.spec of Package xless

#
# spec file for package xless (Version 1.7)
#
# Copyright (c) 2009 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 http://bugs.opensuse.org/
#

# norootforbuild


Name:           xless
BuildRequires:  xorg-x11 xorg-x11-devel
License:        Any permissive
Group:          Productivity/Text/Utilities
Provides:       xless17 
AutoReqProv:    on
Version:        1.7
Release:        1233
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
* 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
openSUSE Build Service is sponsored by