Name: ballview Version: 1.3 Release: 1%{?dist} Summary: Molecule and protein visualisation and analysis software Group: Applications/Engineering #Not all source files are marked with LGPL header. Upstream has been notified #http://ball-trac.bioinf.uni-sb.de/ticket/220 License: LGPL URL: http://www.ballview.org/ Source0: http://www.ballview.org/Downloads/v%{version}/BALL-%{version}-RC1.tar.gz #Patch to include awk shebang Patch0: %{name}-charm2ini.patch #Patch to prevent configure from trying to link against .a files Patch1: %{name}-%{version}-no-a-configure.patch #Patch to prevent libtool prepending X to command, which causes build failure Patch2: %{name}-libtool.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel BuildRequires: doxygen BuildRequires: bison BuildRequires: flex BuildRequires: doxygen BuildRequires: glew-devel BuildRequires: qt4-devel BuildRequires: libXmu-devel #Requires: python #Requires for Optional components BuildRequires: gsl-devel BuildRequires: fftw-devel BuildRequires: sip-devel #Requires: sip %description BALLView is a free molecular modeling and molecular graphics tool. It provides fast OpenGL-based visualization of molecular structures, molecular mechanics methods (minimization, MD simulation using the AMBER, CHARMM, and MMFF94 force fields), molecular editing, as well as calculation and visualization of electrostatic properties (FDPB). %package devel Group: Development/Libraries Summary: Provides development files for %{name} applications Requires: %{name} = %{version}-%{release} %description devel Development files required for building %{name} programs. %package doc Group: Documentation Summary: HTML documentation and tutorial for the %{name} applications %if 0%{?fedora} > 10 BuildArch: noarch %endif # Latex requires texlive for 10 and up %if 0%{?fedora} >= 10 BuildRequires: texlive-latex %endif %if 0%{?fedora} < 10 BuildRequires: tetex-latex %endif %{?el5:BuildRequires: tetex-latex} BuildRequires: graphviz, ghostscript %description doc This package contains the documentation in the HTML format of the %{name} package. %prep %setup -q -c -n %{name}-%{version} %patch0 %patch1 #Fix permissions find ./data/ -name \*.data -exec chmod 644 {} \; chmod 644 ./data/structures/test.btf \ ./source/STRUCTURE/smartsParserParser.y \ ./source/STRUCTURE/smartsParserLexer.l find ./ -name \*.h -executable -exec chmod 644 {} \; find ./ -name \*.C -executable -exec chmod 644 {} \; #Fix UTF8 for FILE in doxygen/latex/classBALL_1_1CreateSpectrumProcessor.tex doxygen/latex/classBALL_1_1RotationalEntropyLoss.tex do iconv -f iso8859-1 -t utf-8 $FILE > ${FILE}.conv && mv -f ${FILE}.conv ${FILE}.txt done #fix libtool prepend X (version conflict?) pushd source ./bootstrap sed -i 's!${FFTW_LIB_F}/libfftw3f.a!-lfftw3f!' configure sed -i 's!${FFTW_LIB_D}/libfftw3.a!-lfftw3!' configure sed -i 's!${FFTW_LIB_D}/libfftw3l.a!-lfftw3l!' configure sed -i 's!libgsl.a!libgsl.so!' configure sed -i 's!libgslcblas.a!libgslcblas.so!' configure popd %build cd source export QTDIR=%{_libdir} #Note configure is used directly. The package provides an #interactive script which cannot be used in an automated build %configure --with-moc=`which moc-qt4` --with-uic=`which uic-qt4` --with-rcc=`which rcc` --enable-fftw --enable-gsl --enable-python --with-fftw3=%{_libdir} --with-qt-libs=%{_libdir} --enable-libtool --disable-static --enable-shared #Default target builds libs #parallel make is not safe #make %{?_smp_mflags} make #Temporarily hack up LIBRARY_PATH #so test programs can run export LIBRARY_PATH=$LIBRARY_PATH:`pwd` #Build and run test programs- These are quite extensive #DISABLED: One of the tests hangs in the test file, rather than in the actual code #Their test system is heavily preprocessor based, making it hard to work with #make %{?_smp_mflags} test #Memory useage by test target is v. high. To limit swapping, do not #use SMP #make test #Build app make BALLView # Build documentation (with Doxygen) pushd . cd ../doc doxygen doxygen.cfg popd %install rm -rf %{buildroot} #Package does not provide a normal autoconf install target #Install application mkdir -p %{buildroot}%{_bindir}/ install -p -D -m 0755 ./source/APPLICATIONS/BALLVIEW/BALLView %{buildroot}%{_bindir}/%{name} #Install support data mkdir -p %{buildroot}%{_datadir}/%{name}/ cp -Rp data %{buildroot}%{_datadir}/%{name}/ #install headers #Remove header documentation files find ./include/ -name \*.doc -exec rm {} \; mkdir -p %{buildroot}%{_includedir}/%{name} cp -Rp include/BALL/* %{buildroot}%{_includedir}/%{name} #Install desktop file using included debian .desktop file mkdir -p %{buildroot}%{_datadir}/applications desktop-file-install \ --dir %{buildroot}%{_datadir}/applications \ ./debian-upstream/ballview.desktop #install shared libs mkdir -p %{buildroot}%{_libdir} export BALLSO=`find ./ -name libBALL.so` export VIEWSO=`find ./ -name libVIEW.so` install -p -D -m 0755 $BALLSO %{buildroot}%{_libdir}/libBALL.so.%{version} install -p -D -m 0755 $VIEWSO %{buildroot}%{_libdir}/libVIEW.so.%{version} pushd . cd %{buildroot}%{_libdir} #Soversioning by upstream has been requested #http://ball-trac.bioinf.uni-sb.de/ticket/246 for LIB in libBALL.so libVIEW.so do #link libSONAME.so.MAJOR to libSONAME.so.MAJOR.MINOR.MICRO ln -s $LIB.%{version} $LIB.1 #link libSONAME.so to libSONAME.so.MAJOR ln -s $LIB.1 $LIB done popd %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc source/LICENSE source/README source/COPYRIGHT source/ChangeLog %{_libdir}/libBALL.so.* %{_libdir}/libVIEW.so.* %{_bindir}/%{name} %{_datadir}/%{name} %{_datadir}/applications/ballview.desktop %files devel %defattr(-,root,root,-) %{_includedir}/%{name}/ %{_libdir}/libBALL.so %{_libdir}/libVIEW.so %files doc %defattr(-,root,root,-) %doc doc/BALLVIEW doc/doxygen %{_docdir}/%{name}/ %changelog * Sat Aug 11 2009 1.2-2 - Move documentation to doc section of -doc subpackage * Sat Jun 13 2009 1.2-1 - Removed duplicate doxygen buildrequire - Initial spec file