%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %define svnver 2286 #Need to fix this package. The latest spec is in koji... # http://koji.fedoraproject.org/koji/taskinfo?taskID=1672945 #Upstream has been notified of exit() calls. #https://sourceforge.net/tracker/?func=detail&aid=2842844&group_id=67094&atid=516866 #Upstream has been notified of licencing issues #https://sourceforge.net/tracker/?func=detail&aid=2842854&group_id=67094&atid=516866 #Upstream has been notfied of unit test problems #https://sourceforge.net/tracker/?func=detail&aid=2842847&group_id=67094&atid=516867 Name: ghmm Version: 0.7 Release: 4.svn%{svnver}%{?dist} Summary: A library with data structures and algorithms for Hidden Markov Models Group: Development/Libraries License: LGPLv2+ URL: http://ghmm.sourceforge.net/ # The source for this package was pulled from upstream's vcs. Use the # following commands to generate the tarball: # export LANG=en_US.utf8; export TZ=+0000; # svn export -r2286 https://ghmm.svn.sourceforge.net/svnroot/ghmm/trunk/ghmm ghmm # tar -cjf ghmm.tar.bz2 ghmm/ # MD5 sum should be : 24d1829f2562d04115b7f028e0399f0f ghmm.tar.bz2 Source0: %{name}.tar.bz2 #Disable single broken test Patch0: %{name}-make-check.patch #Fix ghmm-config output Patch1: %{name}-config.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gsl-devel BuildRequires: libtool BuildRequires: libxml2-devel BuildRequires: pkgconfig BuildRequires: python-devel BuildRequires: swig BuildRequires: atlas-devel Requires: tkinter %description The General Hidden Markov Model library (GHMM) is a freely available LGPL-ed C library implementing efficient data structures and algorithms for basic and extended HMMs. It is developed by the Algorithmics group at the Max Planck Institute for Molecular Genetics. Features: * Discrete and continuous emissions * Mixtures of PDFs for continuous emissions * Non-homogenous Markov chains * Pair HMMs (contributed by Genoscope) * Clustering and mixture modelling for HMMs * Graphical Editor HMMEd * Python bindings * XML-based file format %package static Summary: Static libraries for %{name} Group: Development/Libraries Requires: %{name}-devel = %{version}-%{release} %description static Static libraries for developing with %{name}. %package devel Summary: Development headers and libraries for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel Headers and libraries for developing with %{name}. %prep %setup -q -n %{name} sed -i \ -e 's|$(PYTHON) setup.py install.*$|$(PYTHON) setup.py install -O1 --skip-build --root ${RPM_BUILD_ROOT}|' \ ghmmwrapper/Makefile.am HMMEd/Makefile.am sed -i -e '1,1d' \ ghmmwrapper/ghmm_gato/{xmlutil,HMMEd,EditObjectAttributesDialog}.py \ ghmmwrapper/ghmm.py HMMEd/{HMMEditor,ObjectHMM,HMMEditingContext}.py find . -type f -name '*.c' | xargs chmod -x find . -type f -name '*.h' | xargs chmod -x find . -type f -name '*.txt' | xargs chmod -x #convert to UTF-8 chmod 644 AUTHORS for i in AUTHORS do iconv -f iso8859-1 -t utf-8 $i > $i.new && \ touch -r $i $i.new && \ mv $i.new $i done \ %patch0 %patch1 %build # Docs aren't build because Fedora doesn't have doc++ ./autogen.sh export CFLAGS="${CFLAGS} -I/usr/include/atlas" %configure --enable-gsl --enable-experimental --enable-unsupported --enable-atlas make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT rm -f $RPM_BUILD_ROOT%{_libdir}/*.la pushd $RPM_BUILD_ROOT%{_bindir} for bin in cluster probdist scluster smix_hmm smo2xml; do mv ${bin} %{name}-${bin} done popd %check pushd ghmmwrapper # Currently their unit tests fail. # make check popd %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc COPYRIGHT.txt LGPL.txt AUTHORS %if "%{python_sitearch}" != "%{python_sitelib}" %{python_sitearch}/* %endif %{python_sitelib}/* %{_libdir}/lib%{name}.so.* %{_bindir}/HMMEd %{_bindir}/%{name}-* %exclude %{_bindir}/%{name}-config %{_datadir}/%{name} %files static %defattr(-,root,root,-) %{_libdir}/lib%{name}.a %files devel %defattr(-,root,root,-) %{_includedir}/ghmm %{_libdir}/lib%{name}.so %{_bindir}/%{name}-config %changelog * Sat Oct 24 2009 D Haley - 0.7-4.svn2286 - Modify CFLAGS again - Fix permissions on AUTHORS file * Sat Oct 24 2009 D Haley - 0.7-3.svn2286 - Enabled atlas build - Use CFLAGS export * Sat Oct 10 2009 D Haley - 0.7-2.svn2286 - Remove GSL Requires (should be found by RPM) - Patched non-executing make check, but test results indicate a few fails. Upstream notified - Fixed -config script output via patch * Sat Mar 21 2009 Conrad Meyer - 0.7-1.svn2251 - Initial package.