%{!?python_sitelib: %define 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)")} Name: ghmm Version: 0.7 Release: 1.svn2251%{?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: (pulled from r2251) # svn export https://ghmm.svn.sourceforge.net/svnroot/ghmm/trunk/ghmm ghmm # tar -cjf ghmm.tar.bz2 ghmm/ Source0: ghmm.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gsl-devel BuildRequires: libtool BuildRequires: libxml2-devel BuildRequires: pkgconfig BuildRequires: python-devel BuildRequires: swig Requires: gsl 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 build|CFLAGS="${RPM_OPT_FLAGS}" $(PYTHON) setup.py build|' \ -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 %build # Docs aren't build because Fedora doesn't have doc++ ./autogen.sh %configure --enable-gsl --enable-experimental --enable-unsupported 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 # Commented out because it seems broken #pushd ghmmwrapper # 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 %{python_sitearch}/* %{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 Mar 21 2009 Conrad Meyer - 0.7-1.svn2251 - Initial package.