File the.spec of Package the

#
# spec file for package the (Version 3.1)
#
# 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:           the
BuildRequires:  flex ncurses-devel regina
Url:            http://hessling-editor.sourceforge.net/
Version:        3.1
Release:        385
Summary:        The Hessling Editor (VM/CMS xedit clone)
License:        GFDL v1.1 ; GPL v2 or later
Group:          Productivity/Editors/Other
#Autoreqprov: off
Source0:        THE-3.1.tar.bz2
Source1:        THE-3.1-a4.pdf
Patch0:         THE-3.1-DESTDIR.diff
Patch1:         THE-3.1-nostrictaliasing.diff
Patch2:         THE-3.1-same-variable-used-twice.patch
Patch3:         THE-3.1-open.diff
Patch64:        THE-3.1-lib64.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
THE is a text editor that uses both command line commands and key
bindings to operate. It is intended to be similar to the VM/CMS System
Product Editor, XEDIT, and to Mansfield Software's, KEDIT.



Authors:
--------
    Mark Hessling <M.Hessling@qut.edu.au>

%prep
%setup -q -n THE-3.1
%{suse_update_config}
%patch0 -p 1
if [ %_lib == lib64 ]; then
%patch64 -p1 -b .lib64
fi
%patch1 -p1
%patch2 -p1
%patch3 -p0

%build
./configure \
	--prefix=/usr \
	--mandir=%{_mandir} \
	--with-ncurses \
	--with-rexx=regina
make CFLAGS="$RPM_OPT_FLAGS" 

%install
test -z "$RPM_BUILD_ROOT" || rm -rf $RPM_BUILD_ROOT
make install DESTDIR=${RPM_BUILD_ROOT}
cp -a %{S:1} .

%files
%defattr(-,root,root)
%doc FAQ INSTALL README THE_Help.txt
%doc TODO COPYING HISTORY the.man THE-3.1-a4.pdf
%doc app*.htm*
%doc appendix.*
%doc doc/*
/usr/bin/the
/usr/share/THE/
%{_mandir}/man1/the.1.gz

%changelog