From 582974b37422ceb6bc99fa24ad3d9da54b2d37a3 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Sun, 13 Feb 2011 08:32:34 -0700 Subject: [PATCH 1/3] Add note about bundled libs: arpack, gl2ps, others? --- octave.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/octave.spec b/octave.spec index ea5aebe..2542463 100644 --- a/octave.spec +++ b/octave.spec @@ -81,11 +81,14 @@ find -name *.cc -exec chmod 644 {} \; %build %global enable64 no export F77=gfortran +# TODO: arpack (and others?) appear to be bundled in libcruft.. +# --with-arpack is not an option anymore +# gl2ps.c is bundled. Anything else? %configure --enable-shared --disable-static --enable-64=%enable64 \ --with-blas="-L%{_libdir}/atlas -lf77blas -latlas" --with-qrupdate \ --with-lapack="-L%{_libdir}/atlas -llapack" \ --with-amd --with-umfpack --with-colamd --with-ccolamd --with-cholmod \ - --with-cxsparse --with-arpack + --with-cxsparse make %{?_smp_mflags} OCTAVE_RELEASE="Fedora %{version}-%{release}" %install From cf6b5f2a234c1b434e7a3fa8f3a90800c2af2841 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 14 Feb 2011 14:51:21 -0700 Subject: [PATCH 2/3] Add rpm macros Rebuild should pick up fixed suitesparse --- macros.octave | 28 ++++++++++++++++++++++++++++ octave.spec | 14 ++++++++++++-- 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 macros.octave diff --git a/macros.octave b/macros.octave new file mode 100644 index 0000000..660a50a --- /dev/null +++ b/macros.octave @@ -0,0 +1,28 @@ +%octave_api %(octave-config -p API_VERSION || echo 0)} +%_octshareprefix %{buildroot}%{_datadir}/octave +%_octprefix %{_octshareprefix}/packages +%_octarchprefix %{buildroot}%{_libexecdir}/octave/packages +%octave_cmd() octave -H -q --no-site-file --eval "%*"; +%octave_pkg_build %octave_cmd pkg build '-verbose' %{_tmppath}/%{name}-%{version}-%{release}.%{_arch} %SOURCE0 +%octave_pkg_install \ +mkdir -p %{_octprefix} \ +mkdir -p %{_octarchprefix} \ +%octave_cmd warning('off','all');pkg('prefix','%{_octprefix}','%{_octarchprefix}');pkg('global_list',fullfile('%{_octshareprefix}','octave_packages'));pkg('local_list',fullfile('%{_octshareprefix}','octave_packages'));pkg('install','-nodeps','-verbose','%{_tmppath}/%{name}-%{version}-%{release}.%{_arch}/%{octpkg}-%{version}.tar.gz');unlink(pkg('local_list'));unlink(pkg('global_list')); \ +if [ -e %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m ] \ +then \ + mv %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m.orig \ +fi \ +echo "function on_uninstall (desc)" > %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m \ +echo " error ('Can not uninstall %s installed by the redhat package manager', desc.name);" >> %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m \ +echo "endfunction" >> %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m \ +%{nil} +%_octave_pkg_preun \ +rm %{octpkgdir}/packinfo/on_uninstall.m \ +if [ -e %{octpkgdir}/packinfo/on_uninstall.m.orig ]; then \ + mv %{octpkgdir}/packinfo/on_uninstall.m.orig %{octpkgdir}/packinfo/on_uninstall.m \ + cd %{octpkgdir}/packinfo \ + %octave_cmd l=pkg('list');on_uninstall(l{cellfun(@(x)strcmp(x.name,'%{octpkg}'),l)}); \ +fi \ +%{nil} +%octpkgdir %{_datadir}/octave/packages/%{octpkg}-%{version} +%octpkglibdir %{_libexecdir}/octave/packages/%{octpkg}-%{version} diff --git a/octave.spec b/octave.spec index 2542463..3213836 100644 --- a/octave.spec +++ b/octave.spec @@ -3,12 +3,13 @@ Name: octave Version: 3.4.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A high-level language for numerical computations Epoch: 6 Group: Applications/Engineering License: GPLv3+ Source0: ftp://ftp.gnu.org/gnu/octave/octave-%{version}.tar.bz2 +Source1: macros.octave # Add missing cstddef for gcc 4.6 Patch0: octave-3.4.0-gcc46.patch URL: http://www.octave.org @@ -123,6 +124,10 @@ touch %{buildroot}%{_datadir}/%{name}/octave_packages install -d %{buildroot}%{_sysconfdir}/prelink.conf.d echo "-b %{_bindir}/octave-%{version}" > %{buildroot}%{_sysconfdir}/prelink.conf.d/octave.conf +# rpm macros +mkdir -p %{buildroot}%{_sysconfdir}/rpm +cp -p %SOURCE1 %{buildroot}%{_sysconfdir}/rpm/ + # TODO - Fix this: # src/DLD-FUNCTIONS/md5sum.cc ............................*** stack smashing detected ***: /builddir/build/BUILD/octave-3.3.54/src/.libs/lt-octave terminated @@ -150,7 +155,8 @@ fi %doc AUTHORS BUGS ChangeLog* COPYING NEWS* PROJECTS README README.Linux %doc README.kpathsea # FIXME: Create an -emacs package that has the emacs addon -%config %{_sysconfdir}/ld.so.conf.d/octave-*.conf +%config(noreplace) %{_sysconfdir}/ld.so.conf.d/octave-*.conf +%config(noreplace) %{_sysconfdir}/rpm/macros.octave %{_bindir}/octave* %{_libdir}/octave-%{version}/ %{_libexecdir}/octave/ @@ -183,6 +189,10 @@ fi %changelog +* Mon Feb 14 2011 Orion Poplawski - 6:3.4.0-3 +- Add rpm macros +- Rebuild should pick up fixed suitesparse + * Tue Feb 08 2011 Fedora Release Engineering - 6:3.4.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From 3fb3124a02b77672190f48dd4fa5eec2688812de Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 14 Feb 2011 15:34:34 -0700 Subject: [PATCH 3/3] Disable parallel builds --- octave.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/octave.spec b/octave.spec index 3213836..7bd3997 100644 --- a/octave.spec +++ b/octave.spec @@ -90,7 +90,7 @@ export F77=gfortran --with-lapack="-L%{_libdir}/atlas -llapack" \ --with-amd --with-umfpack --with-colamd --with-ccolamd --with-cholmod \ --with-cxsparse -make %{?_smp_mflags} OCTAVE_RELEASE="Fedora %{version}-%{release}" +make OCTAVE_RELEASE="Fedora %{version}-%{release}" %install rm -rf %{buildroot} @@ -192,6 +192,7 @@ fi * Mon Feb 14 2011 Orion Poplawski - 6:3.4.0-3 - Add rpm macros - Rebuild should pick up fixed suitesparse +- Disable parallel builds * Tue Feb 08 2011 Fedora Release Engineering - 6:3.4.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild