c343ab4
# TODO:
c343ab4
# fix jemboss and enable it
6bd6b47
# This would involve packaging jalview (specifically, the Applet)
6bd6b47
# The jalview code has a LOT of bundled pre-built jars.
6bd6b47
6bd6b47
6bd6b47
#jemboss is disabled by default due to the fact it bundles a few .jar files which are not built from source.
6bd6b47
%bcond_with jemboss
6bd6b47
6bd6b47
#use --with sunjava if sun's jre is used
6bd6b47
%bcond_with sunjava
6bd6b47
6bd6b47
%if %{with sunjava}
6bd6b47
%define _java /usr/java/default
6bd6b47
%endif
c343ab4
c343ab4
%define emhome %{_datadir}/EMBOSS
c343ab4
c343ab4
Name:           EMBOSS
6bd6b47
Version:        6.2.0
7f1f10a
Release:        3%{?dist}
c343ab4
Summary:        The European Molecular Biology Open Software Suite
c343ab4
c343ab4
Group:          Applications/Engineering
6bd6b47
# Files under jemboss/, ajax/ensembl/ are LGPLv2+
6bd6b47
#
6bd6b47
# There are some other files which are included in the source tarball 
6bd6b47
# but not used, specifically:
6bd6b47
# Files under ajax/pcre/ are BSD
6bd6b47
# Files under ajax/zlib/ are zlib/libpng
6bd6b47
# Because they are not used (they're deleted in %%prep), 
6bd6b47
# we do not include them in the license tag.
6bd6b47
License:        GPLv2+ and LGPLv2+
c343ab4
URL:            http://emboss.sf.net/
c343ab4
Source0:        ftp://emboss.open-bio.org/pub/EMBOSS/%{name}-%{version}.tar.gz
7f1f10a
Source1:        ftp://emboss.open-bio.org/pub/EMBOSS/fixes/README.fixes
6bd6b47
%if %{with jemboss}
e49cb73
Source2:        jemboss.desktop
6bd6b47
%endif
6bd6b47
# Upstream patch
7f1f10a
Patch0:         ftp://emboss.open-bio.org/pub/EMBOSS/fixes/patches/patch-1-18.gz
6bd6b47
# Use system-wide pcre. Sent upstream.
6bd6b47
Patch1:         EMBOSS-6.2.0-system-pcre.patch
6bd6b47
# Use system-wide zlib.
6bd6b47
Patch2:		EMBOSS-6.2.0-system-zlib.patch 
6bd6b47
# Use system-wide plplot
6bd6b47
Patch3:		EMBOSS-6.2.0-system-plplot.patch
6bd6b47
# Use system-wide expat
6bd6b47
Patch4:		EMBOSS-6.2.0-system-expat.patch
6bd6b47
c343ab4
#Fedora-specific. Not sent upstream.
6bd6b47
Patch5:         %{name}-fedora.patch
c343ab4
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
c343ab4
6bd6b47
BuildRequires:  gd-devel
6bd6b47
BuildRequires:  pam-devel
6bd6b47
BuildRequires:  pcre-devel
6bd6b47
BuildRequires:	zlib-devel
6bd6b47
BuildRequires:	plplot-devel
6bd6b47
BuildRequires:	expat-devel
6bd6b47
%if %{with jemboss}
e49cb73
BuildRequires:  ant
e49cb73
BuildRequires:  desktop-file-utils
e49cb73
BuildRequires:  java-devel >= 1:1.6.0
e49cb73
BuildRequires:  jpackage-utils
6bd6b47
BuildRequires:  axis classpathx-mail jaf jakarta-commons-discovery jakarta-commons-logging
e49cb73
BuildRequires:  log4j regexp servlet xerces-j2 wsdl4j
6bd6b47
%endif
6bd6b47
6bd6b47
%if %{with sunjava}
6bd6b47
Requires:       jdk = 2000:1.6.0_17-fcs
6bd6b47
%endif
c343ab4
c343ab4
%description
c343ab4
EMBOSS is a new, free Open Source software analysis package specially
c343ab4
developed for the needs of the molecular biology (e.g. EMBnet) user community.
c343ab4
The software automatically copes with data in a variety of formats and even
c343ab4
allows transparent retrieval of sequence data from the web. Also, as extensive
c343ab4
libraries are provided with the package, it is a platform to allow other
c343ab4
scientists to develop and release software in true open source spirit.
c343ab4
EMBOSS also integrates a range of currently available packages and tools for
c343ab4
sequence analysis into a seamless whole.
c343ab4
c343ab4
Reference for EMBOSS: Rice,P. Longden,I. and Bleasby,A.
c343ab4
"EMBOSS: The European Molecular Biology Open Software Suite"
c343ab4
Trends in Genetics June 2000, vol 16, No 6. pp.276-277
c343ab4
c343ab4
c343ab4
%package devel
c343ab4
Summary:        Development tools for programs which will use the %{name} library
c343ab4
Group:          Development/Libraries
c343ab4
Requires:       %{name}-libs = %{version}-%{release}
c343ab4
c343ab4
%description devel
c343ab4
The %{name}-devel package includes the header files and static libraries
c343ab4
necessary for developing programs which will use the %{name} library.
c343ab4
c343ab4
c343ab4
%package libs
c343ab4
Summary:        Shared libraries for %{name}
c343ab4
Group:          System Environment/Libraries
c343ab4
c343ab4
%description libs
c343ab4
The %{name}-libs package includes the dynamic libraries
c343ab4
necessary for %{name}.
c343ab4
6bd6b47
%if %{with jemboss}
6bd6b47
%package -n jemboss
6bd6b47
Summary:        Java interface to %{name}
6bd6b47
Group:          Applications/Engineering
6bd6b47
Requires:       %{name} = %{version}-%{release}
6bd6b47
Requires:       java >= 1:1.6.0
6bd6b47
Requires:       jpackage-utils    
6bd6b47
Requires:       axis jaf javamail jakarta-commons-discovery jakarta-commons-logging
6bd6b47
Requires:       log4j regexp servlet xerces-j2 wsdl4j
6bd6b47
6bd6b47
%description -n jemboss
6bd6b47
Jemboss is a Java interface to EMBOSS, developed at
6bd6b47
the HGMP-RC and in close collaboration with the EMBOSS
6bd6b47
development team. It is distributed as part of the EMBOSS
6bd6b47
software.
6bd6b47
6bd6b47
Documentation on Jemboss can be found at:
6bd6b47
http://www.hgmp.mrc.ac.uk/Software/EMBOSS/Jemboss/
6bd6b47
%endif
c343ab4
c343ab4
c343ab4
%prep
c343ab4
%setup -q
7f1f10a
%patch0 -p1
6bd6b47
%patch1 -p1 -b .system-pcre
6bd6b47
%patch2 -p1 -b .system-zlib
6bd6b47
%patch3 -p1 -b .system-plplot
6bd6b47
%patch4 -p1 -b .system-expat
6bd6b47
%patch5 -p0 -b .fedora
6bd6b47
6bd6b47
# Remove bundled plplot, expat, pcre and zlib to make sure that system versions are used
6bd6b47
rm -rf plplot/
6bd6b47
rm -rf ajax/{expat,pcre,zlib}
c343ab4
c343ab4
#install the patch readme
6bd6b47
#install -pm 644 %{SOURCE1} README.fixes
c343ab4
c343ab4
#these files were executable for some reason
c343ab4
chmod 644 emboss/prettyplot.c emboss/polydot.c emboss/supermatcher.c
c343ab4
6bd6b47
%if %{with jemboss}
e49cb73
#use newer log4j version
e49cb73
sed -i "s@log4j-1.2.8@log4j-1.2.14@" \
e49cb73
    jemboss/lib/axis/Makefile.am \
e49cb73
    jemboss/lib/axis/Makefile.in \
e49cb73
    jemboss/utils/makeFileManagerJNLP.sh \
e49cb73
    jemboss/utils/makeJNLP.sh
e49cb73
c343ab4
#use system java libraries
6bd6b47
rm jemboss/lib/{activation,jakarta-regexp-1.2,jemboss,mail,xerces}.jar
e49cb73
build-jar-repository -s -p jemboss/lib activation regexp javamail xerces-j2
e49cb73
mv jemboss/lib/regexp.jar jemboss/lib/jakarta-regexp-1.2.jar
e49cb73
mv jemboss/lib/javamail.jar jemboss/lib/mail.jar
e49cb73
mv jemboss/lib/xerces-j2.jar jemboss/lib/xerces.jar
e49cb73
rm jemboss/lib/axis/*.jar
e49cb73
build-jar-repository -s -p jemboss/lib/axis axis/axis-ant axis/axis axis/jaxrpc axis/saaj commons-discovery commons-logging log4j-1.2.14 servlet wsdl4j
e49cb73
for i in axis axis-ant jaxrpc saaj;
e49cb73
do
e49cb73
mv jemboss/lib/axis/axis_$i.jar jemboss/lib/axis/$i.jar;
e49cb73
done
6bd6b47
%endif
c343ab4
c343ab4
c343ab4
%build
6bd6b47
%if %{with sunjava}
6bd6b47
export PATH=$PATH:%{_java}/bin/
6bd6b47
%endif
6bd6b47
c343ab4
%configure \
c343ab4
  --disable-static \
c343ab4
  --with-x \
c343ab4
  --with-auth \
c343ab4
  --with-thread \
c343ab4
  --includedir=%{_includedir}/EMBOSS \
c343ab4
%ifarch ppc64 sparc64 x86_64
c343ab4
  --enable-64 \
c343ab4
%endif
6bd6b47
%if %{with jemboss}
e49cb73
  --with-java=/usr/lib/jvm/java/include \
6bd6b47
  --with-javaos=/usr/lib/jvm/java/include/linux
6bd6b47
%endif
6bd6b47
%if %{with sunjava}
6bd6b47
  --with-java=%{_java}/include
6bd6b47
  --with-javaos=%{_java}/include/linux
6bd6b47
%endif
e49cb73
c343ab4
c343ab4
%{__make} %{?_smp_mflags}
c343ab4
c343ab4
c343ab4
%install
6bd6b47
%if %{with sunjava}
6bd6b47
export PATH=$PATH:%{_java}/bin/
6bd6b47
%endif
6bd6b47
c343ab4
rm -rf $RPM_BUILD_ROOT
c343ab4
c343ab4
%{__make} install DESTDIR=$RPM_BUILD_ROOT
c343ab4
c343ab4
install -m 755 -d $RPM_BUILD_ROOT/%{_sysconfdir}/profile.d
c343ab4
cat << __EOF__ >> $RPM_BUILD_ROOT/%{_sysconfdir}/profile.d/emboss.sh
c343ab4
export PLPLOT_LIB=%{emhome}
c343ab4
export EMBOSS_ACDROOT=%{emhome}/acd
c343ab4
export EMBOSS_DOCROOT=%{emhome}/doc
c343ab4
export EMBOSS_DATABASE_DIR=%{emhome}/data
c343ab4
export EMBOSS_DATA=%{emhome}/data
c343ab4
__EOF__
c343ab4
c343ab4
cat << __EOF__ >> $RPM_BUILD_ROOT/%{_sysconfdir}/profile.d/emboss.csh
c343ab4
setenv PLPLOT_LIB %{emhome}
c343ab4
setenv EMBOSS_ACDROOT %{emhome}/acd
c343ab4
setenv EMBOSS_DOCROOT %{emhome}/doc
c343ab4
setenv EMBOSS_DATABASE_DIR %{emhome}/data
c343ab4
setenv EMBOSS_DATA %{emhome}/data
c343ab4
__EOF__
c343ab4
c343ab4
rm $RPM_BUILD_ROOT%{_libdir}/*.la
c343ab4
c343ab4
#this file has zero length, so kill it
c343ab4
rm $RPM_BUILD_ROOT%{_datadir}/EMBOSS/test/data/dna.aln
c343ab4
c343ab4
#fix executable permissions
c343ab4
pushd $RPM_BUILD_ROOT%{_datadir}/EMBOSS/jemboss/utils
c343ab4
chmod +x install-jemboss-server.sh keys.sh makeFileManagerJNLP.sh makeJar.csh \
c343ab4
     makeJNLP.sh
c343ab4
popd
c343ab4
pushd $RPM_BUILD_ROOT%{_datadir}/EMBOSS/jemboss/api
c343ab4
chmod +x getClasses.pl makeDocs.csh
c343ab4
popd
c343ab4
c343ab4
#rename conflicting binaries
c343ab4
mv $RPM_BUILD_ROOT%{_bindir}/chaos $RPM_BUILD_ROOT%{_bindir}/em_chaos
c343ab4
6bd6b47
%if %{with jemboss}
e49cb73
#install the desktop file
6bd6b47
desktop-file-install                                    \
6bd6b47
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications         \
6bd6b47
%{SOURCE2}
6bd6b47
%endif
e49cb73
c343ab4
c343ab4
%clean
c343ab4
rm -rf $RPM_BUILD_ROOT
c343ab4
c343ab4
c343ab4
%post libs -p /sbin/ldconfig
c343ab4
c343ab4
c343ab4
%postun libs -p /sbin/ldconfig
c343ab4
c343ab4
c343ab4
%files
c343ab4
%defattr(-,root,root,-)
6bd6b47
%doc AUTHORS ChangeLog COPYING FAQ INSTALL LICENSE NEWS README THANKS
c343ab4
%{_bindir}/*
c343ab4
%exclude %{_bindir}/runJemboss.csh
c343ab4
%exclude %{_bindir}/jembossctl
c343ab4
%{_datadir}/EMBOSS
c343ab4
%exclude %{_datadir}/EMBOSS/jemboss
c343ab4
%config %{_sysconfdir}/profile.d/*
c343ab4
c343ab4
c343ab4
%files devel
c343ab4
%defattr(-,root,root,-)
c343ab4
%{_libdir}/*.so
c343ab4
%{_includedir}/EMBOSS
c343ab4
8634e7a
c343ab4
%files libs
c343ab4
%defattr(-,root,root,-)
c343ab4
%{_libdir}/*.so.*
c343ab4
c343ab4
6bd6b47
%if 0%{?with_jemboss} || 0%{?with_sunjava}
6bd6b47
%files -n jemboss
6bd6b47
%defattr(-,root,root,-)
6bd6b47
%doc jemboss/README jemboss/resources jemboss/api
6bd6b47
%{_bindir}/runJemboss.csh
6bd6b47
%{_bindir}/jembossctl
6bd6b47
%{_datadir}/applications/jemboss.desktop
6bd6b47
%{_datadir}/EMBOSS/jemboss
6bd6b47
%endif
c343ab4
c343ab4
c343ab4
%changelog
7f1f10a
* Wed Apr 07 2010 Julian Sikorski <belegdol@fedoraproject.org> - 6.2.0-3
7f1f10a
- Added upstream 1-18 patch
7f1f10a
6bd6b47
* Wed Apr  7 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 6.2.0-2
6bd6b47
- fix pcre patch, use system pcre
6bd6b47
- add patch to use system zlib
6bd6b47
- add patch to use system plplot
6bd6b47
- add patch to use system expat
6bd6b47
6bd6b47
* Wed Feb 24 2010 Julian Sikorski <belegdol@fedoraproject.org> - 6.2.0-1
6bd6b47
- Updated to 6.2.0
6bd6b47
- jemboss can be built using --with jemboss
6bd6b47
- Disabled the pcre patch
6bd6b47
- Made the licensing information more detailed
6bd6b47
- --with sunjava allows building against Sun's JVM
6bd6b47
e49cb73
* Sun Dec 13 2009 Julian Sikorski <belegdol@fedoraproject.org> - 6.1.0-6
e49cb73
- Added the upstream 1-3 patch
e49cb73
- Fixed bogus Patch3 description
e49cb73
- Jemboss is still disabled, but some improvements have been made
e49cb73
  - Backported patch enabling jemboss rebuild from CVS
e49cb73
  - Added ant and jpackage-utils to BuildRequires
e49cb73
  - Made java-devel dependency versioned
e49cb73
  - Switched to build-jar-repository to fill the dependencies
e49cb73
  - Replaced versioned log4j calls with latest version
e49cb73
  - Renamed EMBOSS-java to jemboss
e49cb73
  - Added a desktop entry for jemboss from Debian
e49cb73
c343ab4
* Sat Oct 17 2009 Julian Sikorski <belegdol@fedoraproject.org> - 6.1.0-5
c343ab4
- Added comments explaining the purpose of each patch
c343ab4
c343ab4
* Mon Oct 05 2009 Julian Sikorski <belegdol@fedoraproject.org> - 6.1.0-4
c343ab4
- Renamed conflicting binaries
c343ab4
- Disabled jemboss
c343ab4
c343ab4
* Tue Sep 29 2009 Julian Sikorski <belegdol@fedoraproject.org> - 6.1.0-3
c343ab4
- Re-enabled system pcre usage
c343ab4
- Initial attempt at using system-wide .jar files
c343ab4
c343ab4
* Tue Sep 22 2009 Julian Sikorski <belegdol@fedoraproject.org> - 6.1.0-2
c343ab4
- Added the upstream 1-2 patch
c343ab4
c343ab4
* Wed Jul 29 2009 Julian Sikorski <belegdol@fedoraproject.org> - 6.1.0-1
c343ab4
- Updated to 6.1.0
c343ab4
- Dropped pcre-devel from BuildRequires for the time being
c343ab4
- Ditto --with-java and --with-javaos
c343ab4
- Patched jemboss/Makefile.am not to include DESTDIR in runJemboss.sh
c343ab4
- Install the header files in EMBOSS subdir
c343ab4
- Added the missing executable bits
c343ab4
c343ab4
* Fri Jun 12 2009 Julian Sikorski <belegdol@fedoraproject.org> - 6.0.1-3
c343ab4
- Updated the upstream patch to 1-12
c343ab4
- Added the patch readme to %%doc
c343ab4
c343ab4
* Thu Apr 16 2009 Julian Sikorski <belegdol@fedoraproject.org> - 6.0.1-2
c343ab4
- Own %%{_datadir}/EMBOSS
c343ab4
- Don't use %%{name} macro in %%files
c343ab4
- Updated the upstream patch to 1-7
c343ab4
- Use dist instead of dist_tag
c343ab4
- Adjusted whitespaces
c343ab4
- Added pcre-devel to BuildRequires
c343ab4
- Fixed spurious executable permissions
c343ab4
- Removed the empty dna.aln file
c343ab4
- Patched jemboss.properties to include the paths this package uses
c343ab4
- Made the -java package require the main one
c343ab4
c343ab4
* Mon Sep 29 2008 Dominik Mierzejewski <rpm@greysector.net> 6.0.1-1
c343ab4
- updated to 6.0.1
c343ab4
- applied upstream patch 1-1
c343ab4
- patched to use system pcre
c343ab4
c343ab4
* Tue Jan 08 2008 Dominik Mierzejewski <rpm@greysector.net> 5.0.0-1
c343ab4
- Cleaned up BioRPMs' spec
c343ab4
- Updated to 5.0.0
c343ab4
c343ab4
* Thu Mar 17 2005 Bent Terp <Bent.Terp@biosci.ki.se>
c343ab4
- Upped to 2.10.0
c343ab4
c343ab4
* Fri Jul 16 2004 Bent Terp <Bent.Terp@biosci.ki.se>
c343ab4
- Had forgotten the emboss_database_dir env var
c343ab4
c343ab4
* Wed Feb 18 2004 Bent Terp <Bent.Terp@biosci.ki.se>
c343ab4
- Tried to make the building more dynamic. Added Requires and BuildRequires
c343ab4
c343ab4
* Thu Dec 04 2003 Luc Ducazu <luc@biolinux.org>
c343ab4
- Build for EMBOSS 2.8.0
c343ab4
- subpackage jemboss
c343ab4
c343ab4
* Wed Jun 11 2003 Luc Ducazu <luc@biolinux.org>
c343ab4
- Build for EMBOSS 2.7.1
c343ab4
c343ab4
* Tue Jan 28 2003 Luc Ducazu <luc@biolinux.org>
c343ab4
- Build for EMBOSS 2.6.0
c343ab4
- Programs moved to /usr/local/bin
c343ab4
- Adopted many ideas from Guillaume Rousse <g.rousse@linux-mandrake.com>
c343ab4
c343ab4
* Wed Nov 27 2002 Luc Ducazu <luc@biolinux.org>
c343ab4
- Initial build for EMBOSS 2.5.1