Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > f83905975864795cfcd87e49f6c29fb6 > files > 3

ecell-3.1.104-0.20050303.1mdk.src.rpm

%define name 		ecell
%define version 	3.1.104

#when compiling CVS: complete this,
#change line 32, do not comment lines 110, 111
%define snap		20050303
%define rel             0.%{snap}.1

#if compiling stable version
#define rel		1

%define release 	%{rel}mdk

%define major		2
%define libname		%mklibname %{name}%{major}

%define build_doc 	0

%{?_with_doc: %{expand: %%global build_doc 1}}


# Macros for in the menu-file.
%define section Applications/Sciences/Biology
%define title   E-cell
%define Summary	A software suite for modeling, simulation, and analysis of biological cells

Summary:	%{Summary}
Name:		%{name}
Version:	%{version}
Release:	%{release}
#if stable use %{name}-%{version}.tar.bz2
Source0:	%{name}-%{version}-%{snap}.tar.bz2
Source1:	%{name}-icons.tar.bz2
License:	GPL
Group:		Sciences/Biology
Url:		http://ecell.sourceforge.net/
BuildRoot:	%{_tmppath}/%{name}-buildroot
Prefix:		%{_prefix}
Obsoletes:	ecell3 <= 1.0.103
Buildrequires:	python-numeric-devel gnome-python-canvas libboost-devel libgsl0-devel
Requires:	gnome-python gnome-python-canvas pygtk2.0-libglade python-numeric libsbml
Requires:	%{libname} = %{version}-%{release}

# We need XFree86-Xvfb to be able to import gnome.ui python module during compilation
BuildRequires:	XFree86-Xvfb pygtk2.0-libglade

%if %build_doc
BuildRequires:	graphviz
%endif

%description
E-Cell Project is an international research project aiming to model and
reconstruct biological phenomena in silico, and developing necessary
theoretical supports, technologies and software platforms to allow precise
whole cell simulation.
E-Cell System is an object-oriented software suite for modeling, simulation,
and analysis of large scale complex systems such as biological cells. The
first version of E-Cell Simulation Environment (E-Cell SE) was released
in 1999, after which the development of its Windows version, E-Cell
version 2, had started and recently released. Software development has
since shifted to developing version 3, restructuring the system with
an aim to provide the cell simulation community a common, highly
flexible and high performance software environment.

%if 0 
# actually don't work
NB: Some documentations need graphiz package, to build the extra doc package,
add --with doc to rpm command line at build.
%endif

%package -n %{libname}
Summary:	Libraries from Ecell3
Group:		System/Libraries
Provides:	%{libname} = %{version}-%{release}
Obsoletes:	libecell3_%{major} <= 1.0.103
Requires:	libsbml

%description -n %{libname}
This package provides the libraries and includes files from Ecell3.
Note that development libraries and headers are also included in this
package because they may be required to create new biological processes
or to run the included examples.

# Note : do not create a libecell3-devel package
# (see Note in %{libname} description)

%if %build_doc
%package doc
Summary:    Ecell3 extras documentations
Release:    %{rel}%{doc_rel}
Group:      Development/C++

%description doc
E-Cell Project is an international research project aiming to model and
reconstruct biological phenomena in silico, and developing necessary
theoretical supports, technologies and software platforms to allow precise
whole cell simulation.

This package contains extra documentation built only by graphviz.
%endif

%prep

%setup -q -n %{name}
%setup -q -n %{name} -T -D -a1 #icons

%build

#cvs version
find . -type d -a -name CVS | xargs rm -rf
./autogen.sh
#

# needed for import gnome.ui
XDISPLAY=$(i=2; while [ -f /tmp/.X$i-lock ]; do i=$(($i+1)); done; echo $i)
%{_prefix}/X11R6/bin/Xvfb :$XDISPLAY &
export DISPLAY=:$XDISPLAY
# without it, it will not work ( EE was randomly chosen )
xauth add $DISPLAY . EE

%configure
%make

kill $(cat /tmp/.X$XDISPLAY-lock)

%install

rm -rf %{buildroot}
%makeinstall
%multiarch_includes $RPM_BUILD_ROOT%{_includedir}/ecell/config.h

# Menu
mkdir -p %{buildroot}/%{_menudir}
cat > %{buildroot}/%{_menudir}/%{name} << EOF
?package(%{name}): \
command="%{_bindir}/gecell" \
needs="X11" \
icon="%name.png" \
section="%section" \
title="%{title}-session-monitor" \
longtitle="%{Summary}"
?package(%{name}): \
command="%{_bindir}/ecell3-model-editor" \
needs="X11" \
icon="%name.png" \
section="%section" \
title="%{title}-model-editor" \
longtitle="%{Summary}"
EOF

# icons
%__install -D -m 644 %{name}48.png %{buildroot}/%{_liconsdir}/%{name}.png
%__install -D -m 644 %{name}32.png %{buildroot}/%{_iconsdir}/%{name}.png
%__install -D -m 644 %{name}16.png %{buildroot}/%{_miconsdir}/%{name}.png

# compiling the PDF documentation needs graphviz
# however I can copy the samples and the xml version of the manual
rm -Rf $RPM_BUILD_ROOT/usr/share/doc/ecell-3.1.104/

%clean
%__rm -rf %{buildroot}

%post
%{update_menus}

%postun
%{clean_menus}

%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig


%files -n %{name}
%defattr(0755,root,root,0755)
%{_bindir}/*
%defattr(-,root,root)

# here I copy the samples and the xml version of the manual (see above)
%doc doc/sample/ doc/users-manual/ 
%doc AUTHORS COPYING NEWS README
%{_datadir}/ecell
%{_menudir}/*
%{_iconsdir}/%{name}.png
%{_liconsdir}/%{name}.png
%{_miconsdir}/%{name}.png

%files -n %{libname}
%defattr(-,root,root)
%doc COPYING INSTALL
%{_libdir}/osogo
%{_libdir}/modeleditor
%{_libdir}/toollauncher
%{_libdir}/ecell
%{_libdir}/*.so.*
%{_libdir}/python%pyver/site-packages/ecell
# Note: leave dev libraries and includes files in %{libname}
# (see %{libname} description), they are needed for the examples (samples)
%{_libdir}/*.so
%{_libdir}/*.la
%{_includedir}/*

%if %build_doc
%files doc
%defattr(-,root,root)
%doc COPYING INSTALL
%endif

%changelog
* Thu Mar 03 2005 Eric Fernandez <zeb@zebulon.org.uk> 3.1.104-0.20050303.1mdk
- New snapshot, CVS version 3.1.104
- multiarch policy

* Wed Jan 19 2005 Eric Fernandez <zeb@zebulon.org.uk> 3.1.103-0.20050118.1mdk
- New snapshot
- removed --with-plf since graphviz has now a free license and is available in main
- rename ecell3 to ecell, obsoletes ecell3, libecell3
- Happy new year :)

* Mon Dec 20 2004  Eric Fernandez <zeb@zebulon.org.uk> 1.0.103-0.20041219.1mdk
- New snapshot
- libecell3 now requires libsbml

* Thu Dec 09 2004  Eric Fernandez <zeb@zebulon.org.uk> 1.0.103-0.20041208.1mdk
- New snapshot
- some spec comments to clarify the status of documentation and some dev libs

* Sun Dec 05 2004 Michael Scherer <misc@mandrake.org> 1.0.103-0.20040930.3mdk
- Rebuild for new  python

* Thu Oct 28 2004 Olivier Thauvin <thauvin@aerov.jussieu.fr> 1.0.103-0.20040930.2mdk
- Requires lib == version (thx Eric Fernandez <zeb@zebulon.org.uk>)

* Sat Oct 02 2004 Olivier Thauvin <thauvin@aerov.jussieu.fr> 1.0.103-0.20040930.1mdk
- Eric Fernandez <zeb@zebulon.org.uk>
  - spec file cleaning, split package
  - New snapshot, fix script use in GUI (osogo)
- add -with doc and --with plf for documantation

* Tue Sep 21 2004 Michael Scherer <misc@mandrake.org> 1.0.103-0.20040914.1mdk 
- spec files cleaning, and fixing
- from Eric Fernandez <zeb@zebulon.org.uk>
  - New snapshot, various fixes

* Mon Sep 13 2004 Eric Fernandez <zeb@zebulon.org.uk> 1.0.103-0.20040913.1mdk
- New snapshot, fix script use in GUI (osogo)

* Thu Sep 09 2004 Eric Fernandez <zeb@zebulon.org.uk> 1.0.103-0.20040909.1mdk
- New snapshot, various bugfixes

* Wed Sep 08 2004 Eric Fernandez <zeb@zebulon.org.uk> 1.0.103-0.20040908.1mdk
- New snapshot, added LocalSimulatorImplementation

* Tue Aug 31 2004 Eric Fernandez <zeb@zebulon.org.uk> 1.0.103-0.20040830-1mdk
- New snapshot (new model editor and tutorial)

* Thu Aug 26 2004 Eric Fernandez <zeb@zebulon.org.uk> 1.0.103-0.20040825-1mdk
- First mdk release