File rasmol.spec of Package rasmol

#
# spec file for package rasmol (Version 2.7.4.2)
#
# Copyright (c) 2008 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:           rasmol
BuildRequires:  xorg-x11 xorg-x11-devel
Url:            http://www.bernstein-plus-sons.com/software/rasmol/
License:        Public Domain, Freeware
Group:          Productivity/Scientific/Chemistry
Provides:       RasMol 
AutoReqProv:    on
Version:        2.7.4.2
Release:        1
Summary:        Molecular Graphics Visualization Tool
Source:         RasMol_2.7.4.2.tar.bz2
Source1:        README_FIRST
Source2:        CBFlib_0.7.9.1.tar.bz2
Patch1:         RasMol_%{version}.patch
#This one is unneeded
#Patch2:         RasMol_%{version}-array.patch
Patch2:         RasMol_%{version}-decrement_var.patch
# this patch ommit downloading CBFlib tarball which is copied from source2
Patch3:         RasMol_%{version}-no_wget_CBFlib.patch
Patch4:         RasMol_%{version}-CBFlib_rpmoptflags.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
RasMol is an X Window System tool intended for the visualization of
proteins and nucleic acids. It reads Brookhaven Protein Database (PDB)
files and interactively renders them in a variety of formats on either
an 8-bit or 24/32-bit color display.

Examples are in /usr/lib/rasmol.



Authors:
--------
    Herbert J. Bernstein <yaya@bernstein-plus-sons.com>

%if "%(xft-config --prefix)" == "/usr"
%define _xorg7libs %_lib
%define _xorg7bin bin
%define _xorg7_mandir %_mandir
%else 
%define _xorg7libs X11R6/%_lib
%define _xorg7bin X11R6/bin
%define _xorg7_mandir /usr/X11R6/man
%endif

%prep
%setup -n RasMol_2.7.4.2_23Mar08 -a2
%patch1
%patch2
%patch3
%patch4
cp %{S:1} .
# it is needed to remove some links in tarball
## these thing were done manualy when repacking the 2.7.4 tarball
## may be reused in future
# fixing executable flag 
#find . -type f -perm -111|xargs chmod -x 
#find . -name *.csh|xargs chmod +x 
# removing forgotten manpage link
#rm -f src/rasmol.man

%build
# export CFLAGS=$RPM_OPT_FLAGS have to be set in Makefile (patch 0 and 5)
cd src
xmkmf -a
make
#make %{?jobs:-j%jobs}

%install
make -C src "DESTDIR=$RPM_BUILD_ROOT" "PIXELDEPTH=16" install
make -C src "DESTDIR=$RPM_BUILD_ROOT" install.man 
rm -rf doc/RCS 
cp -a data $RPM_BUILD_ROOT/usr/%{_xorg7libs}/rasmol

%files
%defattr(-,root,root)
%doc NOTICE PROJECTS TODO* README* README_FIRST ChangeLog.html history.html index.shtml html_graphics doc/{*.pdf.gz,N*,e*,r*.html,raswin.hlp}
%doc %{_xorg7_mandir}/man1/*
/usr/%{_xorg7libs}/rasmol
/usr/%{_xorg7bin}/rasmol

%clean
rm -rf $RPM_BUILD_ROOT

%changelog
* Sun Apr 13 2008 lmichnovic@suse.cz
- updated Rasmol to 2.7.4.2 and CBFlib to 0.7.9.1
  * Alignment of command line sizing and positioning options for
  Windows and X-Windows version. The command line options -height
  nnnn, -width nnnn, -xpos nnnn and -ypos nnnn may be used to set
  the size and position of the initial window.
  * Change of the encoding for Japanese messages and menus from SJIS
  to EUC-JP, and corrections to the fontset handling for Chinese
  and Japanese. Thanks to Mamoru Yamanishi for contributing the
  improved fontset logic.
  * Updates to the rasmol_install.sh and rasmol_run.sh scripts to
  support Chinese and Japanese using cxterm.
  * Optional use of GTK. Thanks to Teemu Ikonen.
- obsoletes array.patch, 64bit.patch, CBFlib_bigEndian.patch
* Thu Jan 10 2008 lmichnovic@suse.cz
- fixed function which checks the endianity of machine
  (*CBFlib_bigEndian.patch)
* Wed Jan 09 2008 lmichnovic@suse.cz
- update to version 2.7.4
- needs static CFBlib library for compilation
- *CBFlib_rpmoptflags.patch fixes use of RPM_OPT_FLAGS for CBFlib
- *no_wget_CBFlib.patch skips manual download from Internet
- fixed 64bit compilation problem (*ia64.patch)
- patch *ia64.patch renamed to *64bit.patch
* Mon Aug 06 2007 lmichnovic@suse.cz
- installing file README_FIRST
* Mon Aug 06 2007 lmichnovic@suse.cz
- update to version from 29 Dec 2006
  - includes all 7.3.1 upstream patches
  - added Russian language support
* Mon Apr 23 2007 lmichnovic@suse.cz
- fixed unwanted executable flag
* Mon Jan 29 2007 lmichnovic@suse.cz
- fixed array access beyond its range [#239491]
  (decrement_var.patch)
* Wed Nov 08 2006 lmichnovic@suse.cz
- fix for bug [#141227] rewritten (array.patch)
* Wed Jul 26 2006 lmichnovic@suse.cz
- builds also with new X.org 7.x, checks the version of X.org.
- renamed patches from upstream with prefix rasmol-upstream_*
* Fri Jun 16 2006 lmichnovic@suse.cz
- set up the version number
* Thu Jun 15 2006 lmichnovic@suse.cz
- added upstream patches and change the version to 2.7.3.1
  - mouserun2.patch - Correction to mouse handling to avoid run
  away rotation in the X-windows versions.
  - ztrl.patch - Correction to trailing bits of Z-coordinate when
  writing out PDB files.
  - distfix.patch - rection to handling of distance monitors for
  atoms more than 170 Ã…ngstroms apart.
  - version_2.7.3.1.patch - Patches the version in rasmol.h, etc.
* Mon Jan 30 2006 lmichnovic@suse.cz
- Fixed possible acces beyond the range of array. [#141227]
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Sep 15 2005 lmichnovic@suse.cz
- updated to version 2.7.3
* Fri Aug 20 2004 postadal@suse.cz
- updated to version 2.7.2.1.1
- removed obsoleted retval patch
- removed unused or reduntant docs
* Thu Jul 01 2004 bg@suse.de
- fix Imakefile for hppa
* Thu Apr 29 2004 ro@suse.de
- added missing return value
* Sat Jan 10 2004 adrian@suse.de
- build as user
* Mon Apr 08 2002 postadal@suse.cz
- used macro %%{_lib}
* Thu Jul 26 2001 cihlar@suse.cz
- update to version 2.7.2.1
* Mon Jun 11 2001 cihlar@suse.cz
- fixed to compile with new xmkmf
* Mon May 21 2001 cihlar@suse.cz
- fixed cast warnings on ia64
- fixed includes
- use RPM_OPT_FLAGS
* Tue Apr 10 2001 cihlar@suse.cz
- update to version 2.7.2
* Wed Nov 15 2000 cihlar@suse.cz
- bzipped sources
- fixed copyright tag
- fixed file list
* Wed May 17 2000 cihlar@suse.cz
- Group sorted
* Mon Mar 27 2000 cihlar@suse.cz
- added BuildRoot
* Fri Feb 18 2000 fehr@suse.de
- changed to new version 2.7.1
* Mon Sep 13 1999 bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Wed Oct 07 1998 ro@suse.de
- add proper includes for glibc
* Sat Nov 15 1997 fehr@suse.de
- "struct fd_set" is not avaliable in 2.0.32 kernels, use fd_set instead
* Wed Oct 08 1997 fehr@suse.de
- prepare for automatic build of package
openSUSE Build Service is sponsored by