yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #07143
[Branch ~yade-dev/yade/trunk] Rev 2756: 1. RPM-spec file update
------------------------------------------------------------
revno: 2756
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
branch nick: yade
timestamp: Tue 2011-02-22 23:50:51 +0100
message:
1. RPM-spec file update
2. Old yade.spec was moved from the root directory to scripts/RPM_packaging
renamed:
yade.spec => scripts/RPM_packaging/yade_old.spec
modified:
scripts/RPM_packaging/yade.spec
--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'scripts/RPM_packaging/yade.spec'
--- scripts/RPM_packaging/yade.spec 2011-02-17 20:20:54 +0000
+++ scripts/RPM_packaging/yade.spec 2011-02-22 22:50:51 +0000
@@ -11,7 +11,7 @@
patch1: disable-info.patch
BuildRoot: %{_tmppath}/%{name}-%{version}
-BuildRequires: scons, freeglut-devel, boost-devel >= 1.35, boost-date-time >= 1.35, boost-filesystem >= 1.35, boost-thread >= 1.35, boost-regex >= 1.35, fakeroot, gcc, gcc-c++ > 4.0, boost-iostreams >= 1.35, log4cxx, log4cxx-devel, python-devel, boost-python >= 1.35, ipython, python-matplotlib, sqlite-devel, python-numeric, graphviz-python, vtk-devel, ScientificPython, bzr, eigen2-devel, libQGLViewer-devel, loki-lib-devel, python-xlib, PyQt4, PyQt4-devel, ScientificPython-tk, gnuplot, doxygen, gts-devel
+BuildRequires: scons, freeglut-devel, boost-devel >= 1.35, boost-date-time >= 1.35, boost-filesystem >= 1.35, boost-thread >= 1.35, boost-regex >= 1.35, fakeroot, gcc, gcc-c++ > 4.0, boost-iostreams >= 1.35, log4cxx, log4cxx-devel, python-devel, boost-python >= 1.35, ipython, python-matplotlib, sqlite-devel, python-numeric, graphviz-python, vtk-devel, ScientificPython, bzr, eigen2-devel, libQGLViewer-devel, loki-lib-devel, python-xlib, PyQt4, PyQt4-devel, ScientificPython-tk, gnuplot, doxygen, gts-devel, texlive-xetex, texlive-latex
Requires: ScientificPython, python-numeric, ipython, ScientificPython-tk, PyQt4, gnuplot
%description
@@ -30,6 +30,11 @@
%description dbg
This package contains debug-libraries for yade
+%package doc
+Summary: Documentation for Yade
+%description doc
+This package contains examples, test scripts and documentation.
+
%prep
%setup -q
%patch1
@@ -39,14 +44,34 @@
%install
rm -f scons.profile-rpm
rm -rf %{buildroot}/*
-
+
+#Compile and install optimized version
scons profile=rpm PREFIX=%{buildroot}/usr runtimePREFIX=/usr buildPrefix=rpm march= brief=0 chunkSize=5 jobs=1 version=0.60 features=vtk,gts,opengl,openmp,qt4 optimize=1 debug=0 variant=''
+#Compile and install debug version
scons profile=rpm brief=0 chunkSize=5 jobs=1 optimize=0 debug=1 variant='' %{buildroot}%_libdir
+#Copy a library "by hand" (not sure, why the symling is not working in RPMs)
rm %{buildroot}%_libdir/%{name}/lib/lib_gts__python-module.so
cp %{buildroot}%_libdir/%{name}/py/gts/_gts.so %{buildroot}%_libdir/%{name}/lib/lib_gts__python-module.so
+#Generate documentation
+cd %_builddir/%{name}-%{version}/doc/sphinx
+PYTHONPATH=. YADE_PREFIX=%{buildroot}/usr %{buildroot}/usr/bin/%{name} yadeSphinx.py
+cd _build/latex; xelatex Yade.tex; xelatex Yade.tex; xelatex Yade.tex;
+
+YADE_PREFIX=%{buildroot}/usr %{buildroot}/usr/bin/%{name} --generate-manpage yade-%{version}.1
+YADE_PREFIX=%{buildroot}/usr %{buildroot}/usr/bin/%{name}-batch --generate-manpage yade-%{version}-batch.1
+cd ../..;
+
+mkdir -p %{buildroot}%{_docdir}/%{name}
+mkdir -p %{buildroot}%{_mandir}
+mv %_builddir/%{name}-%{version}/doc/sphinx/_build/html %{buildroot}%{_docdir}/%{name}
+mv %_builddir/%{name}-%{version}/doc/sphinx/_build/latex/Yade.pdf %{buildroot}%{_docdir}/%{name}
+mv %_builddir/%{name}-%{version}/examples %{buildroot}%{_docdir}/%{name}
+mv %_builddir/%{name}-%{version}/doc/sphinx/_build/latex/yade-%{version}.1 %{buildroot}%{_mandir}
+mv %_builddir/%{name}-%{version}/doc/sphinx/_build/latex/yade-%{version}-batch.1 %{buildroot}%{_mandir}
+
%clean
rm -rf %{buildroot}
rm -rf %{_builddir}/*
@@ -59,10 +84,20 @@
%{_libdir}/%{name}/lib/*
%{_libdir}/%{name}/plugins/*
%{_libdir}/%{name}/py/*
+%{_mandir}/yade-%{version}.1
+%{_mandir}/yade-%{version}-batch.1
%files dbg
%defattr(-,root,root,-)
%{_libdir}/%{name}/dbg/*
+%files doc
+%defattr(-,root,root,-)
+%{_docdir}/%{name}/*
+
+%check
+YADE_PREFIX=%{buildroot}/usr %{buildroot}/usr/bin/%{name} --test
+YADE_PREFIX=%{buildroot}/usr %{buildroot}/usr/bin/%{name} --debug --test
+
%changelog
=== renamed file 'yade.spec' => 'scripts/RPM_packaging/yade_old.spec'