Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 47a9721a0fd05f908a8f42efb147f55d > files > 2

CRK-2.1.0-53.2mdk.src.rpm

%define name	CRK
%define version	2.1.0
%define buildv	53
%define release %buildv.2mdk

Name: 	 	%{name}
Summary: 	Computational chemistry suite
Version: 	%{version}
Release: 	%{release}

Source:		%{name}Source-%{version}-%{buildv}.tar.bz2
Source1: 	Xykron48.png
Source2: 	Xykron32.png
Source3: 	Xykron16.png
Patch0:		CRK-mpqc.patch.bz2
URL:		http://crk.sourceforge.net
License:	GPL
Group:		Sciences/Chemistry
BuildRoot:	%{_tmppath}/%{name}-buildroot
BuildRequires:	libqt3-devel XFree86-devel ncurses-devel flex
BuildRequires:	libSC-devel gcc-g77 libblas-devel liblapack-devel

%description
The Chemical Resource Kit is several interdependent application packages,
which collectively combine to form an integrated tool to assist with certain
chemical information problems.

Xykron: graphical frontend
Xentark: computational engine
Xortoth: data storage and web interface
Xulu: scheduling and clustering daemon

%package -n Xykron
Summary:	CRK graphical frontend
Group:		Sciences/Chemistry
Requires:	Xentark

%description -n Xykron
The Chemical Resource Kit is several interdependent application packages,
which collectively combine to form an integrated tool to assist with certain
chemical information problems.

Xykron is the graphical front-end to the whole Chemical Resource Kit. It is
monolithic in nature, and provides the primary gateway to the whole package.
Seemless interfaces are provided to two types of so-called Realms: direct
access to local files, and online access to repositories, managed through the
Xortoth 3-tier mechanism.

NOTE: To install examples and templates, execute: 
$ install-CRK-demos

%package -n Xentark
Summary:	CRK computational engine
Group:		Sciences/Chemistry

%description -n Xentark
The Chemical Resource Kit is several interdependent application packages,
which collectively combine to form an integrated tool to assist with certain
chemical information problems.

Xentark is the computational arm of the Chemical Resource Kit. It has no
graphical interface, and is usually spawned by using Xykron to setup the
parameters then launch the calculation. Nonetheless, it is a standalone
application, and may be run from the command line.

%package -n Xortoth
Summary:	CRK dataserver and web interface
Group:		Sciences/Chemistry
Requires:	webserver mysqlserver php php-mysql mod_php

%description -n Xortoth
The Chemical Resource Kit is several interdependent application packages,
which collectively combine to form an integrated tool to assist with certain
chemical information problems.

Xortoth sets up a SQL database and a web interface at:
http://localhost/CRK

%package -n Xuru
Summary:	CRK scheduling and clustering daemon
Group:		Sciences/Chemistry
Requires:	Xentark

%description -n Xuru
The Chemical Resource Kit is several interdependent application packages,
which collectively combine to form an integrated tool to assist with certain
chemical information problems.

Xuru is a daemon which controls scheduling and clusters for CRK calculations.

%prep
%setup -q -c CRK
# fix mpqc location and build dynamically
%patch0
# fix qt location
perl -p -i -e 's/usr\/local\/qt3/usr\/lib\/qt3/g' `find -name Makefile`
# use some proper C++
perl -p -i -e 's/strstream.h/strstream/g' Xentark/Xentark.h

%build
cd Xykron
%make FLAGS="$RPM_OPT_FLAGS -DUNIX -DQT_THREAD_SUPPORT -DQT_NO_STL -DOPENGL -DLIMITED_STYLES"
cd ../Xentark
%make FLAGS="$RPM_OPT_FLAGS -DUNIX -DQT_THREAD_SUPPORT -DQT_NO_STL -DOPENGL -DLIMITED_STYLES"
cd ../Xuru
%make FLAGS="$RPM_OPT_FLAGS -DUNIX -DQT_THREAD_SUPPORT -DQT_NO_STL -DOPENGL -DLIMITED_STYLES"
cd ../Tools
%make FLAGS="$RPM_OPT_FLAGS -DUNIX -DQT_THREAD_SUPPORT -DQT_NO_STL -DOPENGL -DLIMITED_STYLES"

%install
rm -fr %buildroot
mkdir -p %buildroot/%_bindir
mkdir -p %buildroot/%_datadir/Xykron
cp Xykron/Xykron %buildroot/%_bindir
cp -r Xykron/{demo,templates} %buildroot/%_datadir/Xykron
echo '#!/bin/bash' > %buildroot/%_bindir/install-CRK-demos
echo 'mkdir -p ~/.Xykron/data' >> %buildroot/%_bindir/install-CRK-demos
echo 'cp /usr/share/%name/demo /usr/share/%name/templates ~/.Xykron/data/ && echo "success"' >> %buildroot/%_bindir/install-CRK-demos
chmod ugo+x %buildroot/%_bindir/install-CRK-demos
cp Xentark/Xentark %buildroot/%_bindir
mkdir -p %buildroot//var/www/html/CRK
cp Xortoth/*.php %buildroot//var/www/html/CRK
cp Xuru/Xuru %buildroot/%_bindir
cp Tools/CRKConsole Tools/DrawMol %buildroot/%_bindir

#menu
mkdir -p $RPM_BUILD_ROOT%{_menudir}
cat << EOF > $RPM_BUILD_ROOT%{_menudir}/Xykron
?package(Xykron): command="Xykron" icon="Xykron.png" needs="x11" title="Xykron" longtitle="CRK Computational Chemistry" section="Applications/Sciences/Chemistry"
?package(Xykron): command="DrawMol" icon="Xykron.png" needs="x11" title="DrawMol" longtitle="CRK 3D Molecule Editor" section="Applications/Sciences/Chemistry"
EOF

#icons
mkdir -p $RPM_BUILD_ROOT/%_liconsdir
cat %SOURCE1 > $RPM_BUILD_ROOT/%_liconsdir/Xykron.png
mkdir -p $RPM_BUILD_ROOT/%_iconsdir
cat %SOURCE2 > $RPM_BUILD_ROOT/%_iconsdir/Xykron.png
mkdir -p $RPM_BUILD_ROOT/%_miconsdir
cat %SOURCE3 > $RPM_BUILD_ROOT/%_miconsdir/Xykron.png

%post
%update_menus
		
%postun
%clean_menus

%post -n Xykron
%update_menus
		
%postun -n Xykron
%clean_menus

%clean
rm -rf $RPM_BUILD_ROOT

%files -n Xykron
%defattr(-,root,root)
%doc Xykron/README Xykron/XyCHANGES
%{_bindir}/Xykron
%{_bindir}/DrawMol
%{_bindir}/install-CRK-demos
%{_datadir}/Xykron
%{_menudir}/Xykron
%{_liconsdir}/Xykron.png
%{_iconsdir}/Xykron.png
%{_miconsdir}/Xykron.png

%files -n Xentark
%defattr(-,root,root)
%doc Xentark/README Xentark/XeCHANGES
%{_bindir}/Xentark

%files -n Xortoth
%defattr(-,root,root)
%doc Xortoth/INSTALL Xortoth/README Xortoth/XoCHANGES
%{_bindir}/CRKConsole
/var/www/html/CRK

%files -n Xuru
%defattr(-,root,root)
%doc Xuru/README Xuru/XuCHANGES
%{_bindir}/Xuru

%changelog
* Mon Aug 25 2003 Austin Acton <aacton@yorku.ca. 2.1.0-53.2mdk
- include Xortoth install instructions

* Mon Aug 25 2003 Austin Acton <aacton@yorku.ca> 2.1.0-53.1mdk
- 2.1.0-53
- drop qt patch, add strstream fix

* Fri Apr 25 2003 Austin Acton <aacton@yorku.ca> 2.0.5-44.2mdk
- buildrequires flex

* Tue Apr 22 2003 Austin Acton <aacton@yorku.ca> 2.0.5-44.1mdk
- initial package