From 9d40a4782e72d69e82f593bbcf3656d7b8672e7a Mon Sep 17 00:00:00 2001 From: Christian Iseli Date: Feb 22 2007 16:22:31 +0000 Subject: Import elph.spec elph-chris.patch. --- diff --git a/.cvsignore b/.cvsignore index e69de29..ed4c607 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +ELPH-1.0.1.tar.gz diff --git a/elph-chris.patch b/elph-chris.patch new file mode 100644 index 0000000..d35de48 --- /dev/null +++ b/elph-chris.patch @@ -0,0 +1,37 @@ +--- ELPH/sources/elph.cc.chris 2007-02-09 23:29:11.000000000 +0100 ++++ ELPH/sources/elph.cc 2007-02-09 23:29:26.000000000 +0100 +@@ -43,7 +43,7 @@ + default = 500\n\ + SGFNO=n : n = no of iterations to compute significance of motif;\n\ + default = 1000\n\ +- " ++" + + /* I am eliminating the following option from help file because it has no effect because I am never shuffling the file + -z : when using the makov chain file generation, don't exhaust\n\ +--- ELPH/sources/GBase.h.chris 2006-09-28 19:07:25.000000000 +0200 ++++ ELPH/sources/GBase.h 2007-02-09 23:21:52.000000000 +0100 +@@ -61,13 +61,16 @@ + typedef void GFreeProc(pointer item); //usually just delete, + //but may also support structures with embedded dynamic members + +-#define GMALLOC(ptr,size) if (!GMalloc((pointer*)(&ptr),size)) \ +- GError(ERR_ALLOC) +-#define GCALLOC(ptr,size) if (!GCalloc((pointer*)(&ptr),size)) \ +- GError(ERR_ALLOC) +-#define GREALLOC(ptr,size) if (!GRealloc((pointer*)(&ptr),size)) \ +- GError(ERR_ALLOC) +-#define GFREE(ptr) GFree((pointer*)(&ptr)) ++#define GMALLOC(ptr,size) \ ++ if ((ptr = static_cast(malloc(size))) == NULL) \ ++ GError(ERR_ALLOC) ++#define GCALLOC(ptr,size) \ ++ if ((ptr = static_cast(calloc(size, 1))) == NULL) \ ++ GError(ERR_ALLOC) ++#define GREALLOC(ptr,size) \ ++ if ((ptr = static_cast(realloc(ptr,size))) == NULL && size != 0) \ ++ GError(ERR_ALLOC) ++#define GFREE(ptr) free(ptr) + + + diff --git a/elph.spec b/elph.spec new file mode 100644 index 0000000..cfd7919 --- /dev/null +++ b/elph.spec @@ -0,0 +1,55 @@ +Name: elph +Version: 1.0.1 +Release: 1%{?dist} +Summary: Tool to find motifs in a set of DNA or protein sequences + +Group: Applications/Engineering +License: Artistic +URL: http://www.cbcb.umd.edu/software/ELPH/ +Source0: ftp://ftp.cbcb.umd.edu/pub/software/elph/ELPH-1.0.1.tar.gz +Patch0: %{name}-chris.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%description +ELPH is a general-purpose Gibbs sampler for finding motifs in a set of +DNA or protein sequences. The program takes as input a set containing +anywhere from a few dozen to thousands of sequences, and searches +through them for the most common motif, assuming that each sequence +contains one copy of the motif. + + +%prep +%setup -q -n ELPH +%patch0 -p 1 -b .chris + + +%build +make -C sources %{?_smp_mflags} \ + CFLAGS="$RPM_OPT_FLAGS -fno-exceptions -fno-rtti -D_REENTRANT" + + +%check + + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT%{_bindir} +install -m 755 sources/elph $RPM_BUILD_ROOT/%{_bindir} + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc COPYRIGHT LICENSE README Readme.ELPH VERSION +%{_bindir}/elph + + +%changelog +* Thu Feb 22 2007 Christian Iseli 1.0.1-1 + - Import in FC-6. + +* Fri Feb 9 2007 Christian Iseli 1.0.1-0 + - Create spec file. diff --git a/sources b/sources index e69de29..6439180 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +eb96b4dde3ab12ba1f31a4230a829ff3 ELPH-1.0.1.tar.gz