%define name viewmol %define version 2.4.1 %define release %mkrel 5 Summary: Molecule viewer and editor Name: %name Version: %version Release: %release License: GPL Group: Sciences/Chemistry URL: http://viewmol.sourceforge.net BuildRoot: %_tmppath/%name-%version-buildroot Source: %name-%version.src.tar.bz2 BuildRequires: libtiff-devel libMesaGLU-devel libpython-devel BuildRequires: libx11-devel x11-proto-devel libxt-devel libxi-devel libxmu-devel BuildRequires: lesstif-devel libpng-devel %description Viewmol is a graphical front end for computational chemistry programs. It is able to graphically aid in the generation of molecular structures for computations and to visualize their results. At present Viewmol includes input filters for Discover, DMol, Gamess, Gaussian 9x, Gulp, Mopac, and Turbomole outputs as well as for PDB files. %prep %setup -q -n %name-%version cd source #tar xfj %{SOURCE} perl -p -i -e 's!usr/local/lib!%_libdir!g' getrc.c perl -p -i -e 's!lib/viewmol!%_lib/viewmol!g' install %build cd source mkdir Linux echo "LIBTIFF = -L%_libdir" > .config.Linux echo "TIFFINCLUDE = /usr/include" >> .config.Linux echo "MESALIB = -L/usr/%_lib" >> .config.Linux echo "MESAINCLUDE = /usr/include/GL" >> .config.Linux #echo "PYTHONVERSION = %pythonver" >> .config.Linux echo "PYTHONINCLUDE = /usr/include/python%pyver" >> .config.Linux echo "LIBPYTHON = -L%_libdir/python%pyver" >> .config.Linux cd Linux cat ../.config.Linux > makefile echo 'COMPILER = gcc' >> makefile echo 'OPT=${RPM_OPT_FLAGS}' >> makefile echo 'CFLAGS=-Wall -I/usr/include -DLINUX' >> makefile echo 'LDFLAGS=' >> makefile echo 'SCANDIR=' >> makefile echo 'INCLUDE=$(MESAINCLUDE) -I$(TIFFINCLUDE) -I$(PYTHONINCLUDE)' >> makefile echo 'LIBRARY=$(MESALIB) $(LIBPYTHON)' >> makefile echo 'LIBS=-L/usr/%_lib -lpython%pyver -ltiff -lGLU -lGL -lpng -lXm -lXmu -lXt -lX11 -lXi' >> makefile cat ../Makefile >> makefile make viewmol_ make tm_ make bio_ make readgamess_ make readgauss_ make readmopac_ make readpdb_ %install rm -Rf $RPM_BUILD_ROOT cd source ./install $RPM_BUILD_ROOT%_prefix mkdir -p $RPM_BUILD_ROOT%_docdir mkdir -p $RPM_BUILD_ROOT%_docdir/%name-%version mv $RPM_BUILD_ROOT/%_libdir/viewmol/doc/* $RPM_BUILD_ROOT%_docdir/%name-%version rmdir $RPM_BUILD_ROOT/%_libdir/viewmol/doc chmod 755 $RPM_BUILD_ROOT/%_libdir/viewmol/Linux/* chmod 755 $RPM_BUILD_ROOT/%_bindir/* # menu install -d $RPM_BUILD_ROOT%{_menudir} cat << EOF > $RPM_BUILD_ROOT%{_menudir}/%{name} ?package(%{name}):command="viewmol"\ needs="x11"\ section="Applications/Sciences/Chemistry"\ title="ViewMol"\ icon="chemistry_section.png"\ longtitle="GUI Interface for Chemistry Software" EOF %post %update_menus %postun %clean_menus %clean rm -fr %buildroot %files %defattr(-,root,root,0755) %doc %_docdir/%name-%version %_bindir/%name %_libdir/%name %_menudir/%name %changelog * Thu Dec 21 2006 Crispin Boylan <crisb@mandriva.org> 2.4.1-5mdv2007.0 + Revision: 101000 - Try again to build - New revision - Fix build on x86_64 - Install in /usr/bin - Add BuildReq on libXm - Clean spec file, remove unnecessary deps - Import viewmol * Tue Dec 07 2004 Michael Scherer <misc@mandrake.org> 2.4.1-2mdk - Rebuild for new python * Wed Nov 17 2004 Lenny Cartier <lenny@mandrakesoft.com> 2.4.1-1mdk - 2.4.1 * Sat Dec 20 2003 Olivier Thauvin <thauvin@aerov.jussieu.fr> 2.4-1mdk - 2.4 * Tue Aug 26 2003 Austin Acton <aacton@yorku.ca> 2.3.20021215-3mdk - python 2.3 * Tue May 06 2003 Lenny Cartier <lenny@mandrakesoft.com> 2.3.20021215-2mdk - buildrequires * Fri Jan 03 2003 Lenny Cartier <lenny@mandrakesoft.com> 2.3.20021215-1mdk - from Austin Acton <aacton@yorku.ca> : - bump to latest snapshot - point executable to /usr/lib/viewmol for rc file * Sat Nov 23 2002 Austin Acton <aacton@yorku.ca> 2.3-1mdk - package creation for Mandrake 9.0