File texcad.spec of Package texcad

#
# spec file for package texcad (Version 2.4)
#
# 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:           texcad
BuildRequires:  flex xorg-x11 xorg-x11-devel
License:        Any Noncommercial
Group:          Productivity/Publishing/TeX/Utilities
Provides:       texcad12 xtexcad 
AutoReqProv:    on
Version:        2.4
Release:        1224
Summary:        Drawing program for LaTeX pictures
Source:         xtexcad-2.4.tar.gz
Patch:          xtexcad-2.4-flex.patch
Patch1:         xtexcad-2.4.diff
Patch2:         xtexcad-2.4-getcwd.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%{expand: %%global _exec_prefix %(type -p pkg-config &>/dev/null && pkg-config --variable prefix x11 || echo /usr/X11R6)}
%if "%_exec_prefix" == "/usr/X11R6"
%global _mandir     %{_exec_prefix}/man
%define _x11data    %{_exec_prefix}/lib/X11
%define _data       $(LIBDIR)
%define _appdefdir  %{_x11data}/app-defaults
%else
%define _x11data    %{_datadir}/X11
%define _data       $(SHAREDIR)
%define _appdefdir  %{_x11data}/app-defaults
%endif

%description
A really nice drawing program which is especially useful in cooperation
with LaTeX. Note the documentation and COPYRIGHT file in
/usr/share/doc/packages/texcad.



Authors:
--------
    Klaus Zitzmann <zitzmann@infko.uni-koblenz.de>
    J.K.Wight <J.K.Wight@newcastle.ac.uk>
    Byron  Rakitzis <byron@netapp.com>
    Johannes Sixt <Johannes.Sixt@eudaptics.co.at>
    Notker Amann <amann@isr.uni-stuttgart.de>

%prep
%setup -n xtexcad-2.4
%patch -p0
%patch1 -p1
%patch2 -p0

%build
touch resources.h
xmkmf -a
rm -f resources.h
make CCOPTIONS="$RPM_OPT_FLAGS"
`grog -Tdvi xtexcad.man` > XTeXcad.dvi

%install
rm -rf %{buildroot}
make install      DESTDIR=%{buildroot}
make install.man  DESTDIR=%{buildroot}
ln -sf xtexcad %{buildroot}%{_bindir}/texcad

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc COPYRIGHT HISTORY MANIFEST README XTeXcad.dvi
%{_bindir}/texcad
%{_bindir}/xtexcad
%config %{_appdefdir}//XTeXcad
%doc %{_mandir}/man1/xtexcad.1x.gz

%changelog
* Thu Mar 29 2007 rguenther@suse.de
- Add flex BuildRequires
* Fri Nov 10 2006 werner@suse.de
- Do not use cpp macro used in X11 header files (for ix86)
* Fri Nov 10 2006 werner@suse.de
- Use getcwd instead of getwd (bug #218882)
* Thu Aug 10 2006 werner@suse.de
- Make it build with X11R7
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Sep 19 2005 meissner@suse.de
- fixed implicit string warnings.
* Tue Jun 21 2005 meissner@suse.de
- use RPM_OPT_FLAGS.
* Thu Sep 09 2004 werner@suse.de
- Be ready for flex-2.5.31
* Mon Jan 12 2004 adrian@suse.de
- fix typo
* Sun Jan 11 2004 adrian@suse.de
- add %%defattr
* Fri May 23 2003 coolo@suse.de
- use BuildRoot
* Thu Dec 14 2000 werner@suse.de
- Group tag
* Wed Jun 07 2000 ro@suse.de
- specfile cleanup, doc relocation
* Mon Sep 13 1999 bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Wed May 14 1997 werner@suse.de
- New version, now included in S.u.S.E. Linux
openSUSE Build Service is sponsored by