From 9073223e7771261341757c9b9d47822b5c2f8869 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Tue, 29 Sep 2009 18:14:52 +0000 Subject: [PATCH 01/20] - Update to 3.2.3 - Re-add make check --- .cvsignore | 2 +- octave.spec | 12 ++++++++---- sources | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index b84418b..1d87c3d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -octave-3.2.2.tar.bz2 +octave-3.2.3.tar.bz2 diff --git a/octave.spec b/octave.spec index 15940b8..140dd4c 100644 --- a/octave.spec +++ b/octave.spec @@ -2,8 +2,8 @@ %define octave_api api-v37 Name: octave -Version: 3.2.2 -Release: 5%{?dist} +Version: 3.2.3 +Release: 1%{?dist} Summary: A high-level language for numerical computations Epoch: 6 Group: Applications/Engineering @@ -118,8 +118,8 @@ touch %{buildroot}%{_datadir}/%{name}/octave_packages mkdir interpreter cp -a doc/interpreter/*.pdf doc/interpreter/HTML/ interpreter/ -#check -#make check +%check +make check %clean rm -rf %{buildroot} @@ -171,6 +171,10 @@ fi %changelog +* Tue Sep 29 2009 Orion Poplawski - 6:3.2.3-1 +- Update to 3.2.3 +- Re-add make check + * Tue Sep 22 2009 Rakesh Pandit - 6:3.2.2-5 - Added categories to desktop file: Education, DataVisualization, NumericalAnalysis diff --git a/sources b/sources index df4aba0..645b8a0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -656d0d11bf9cfea7a4cee226ee63fea7 octave-3.2.2.tar.bz2 +eecaa1a3b2da3b94fa7bcebbc4f1a1f2 octave-3.2.3.tar.bz2 From 7dd481e0bb22fd2b9774aaa2d78780f58db17462 Mon Sep 17 00:00:00 2001 From: alexlan Date: Sun, 15 Nov 2009 08:09:59 +0000 Subject: [PATCH 02/20] - Workaround broken pre-linking (#524493) --- octave.conf | 1 + octave.spec | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 octave.conf diff --git a/octave.conf b/octave.conf new file mode 100644 index 0000000..a58a10c --- /dev/null +++ b/octave.conf @@ -0,0 +1 @@ +-b /usr/bin/octave-3.2.3 diff --git a/octave.spec b/octave.spec index 140dd4c..231fd43 100644 --- a/octave.spec +++ b/octave.spec @@ -3,12 +3,13 @@ Name: octave Version: 3.2.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A high-level language for numerical computations Epoch: 6 Group: Applications/Engineering License: GPLv3+ Source: ftp://ftp.octave.org/pub/octave/octave-%{version}.tar.bz2 +Source1: octave.conf URL: http://www.octave.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -118,6 +119,10 @@ touch %{buildroot}%{_datadir}/%{name}/octave_packages mkdir interpreter cp -a doc/interpreter/*.pdf doc/interpreter/HTML/ interpreter/ +# work-around broken pre-linking (bug 524493) +install -d %{buildroot}%{_sysconfdir}/prelink.conf.d +install %{SOURCE1} %{buildroot}%{_sysconfdir}/prelink.conf.d/ + %check make check @@ -155,6 +160,7 @@ fi %ghost %{_datadir}/octave/octave_packages %{_datadir}/octave/packages/ %{_datadir}/octave/site/ +%{_sysconfdir}/prelink.conf.d/octave.conf %files devel %defattr(-,root,root,-) @@ -171,6 +177,9 @@ fi %changelog +* Sun Nov 15 2009 Alex Lancaster - 6:3.2.3-2 +- Workaround broken pre-linking (#524493) + * Tue Sep 29 2009 Orion Poplawski - 6:3.2.3-1 - Update to 3.2.3 - Re-add make check From e3f62733e2b141508757c53d57eb6796cf8cbb68 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 22:56:29 +0000 Subject: [PATCH 03/20] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 29971c6..86713d9 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ NAME := octave SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 1b7b4530d4cbc494a33fb762725ff8f8fb6f976f Mon Sep 17 00:00:00 2001 From: Jussi Lehtola Date: Wed, 6 Jan 2010 10:37:08 +0000 Subject: [PATCH 04/20] Really build against ATLAS instead of reference BLAS. --- octave.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/octave.spec b/octave.spec index 231fd43..d60d8be 100644 --- a/octave.spec +++ b/octave.spec @@ -3,7 +3,7 @@ Name: octave Version: 3.2.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A high-level language for numerical computations Epoch: 6 Group: Applications/Engineering @@ -15,7 +15,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Provides: octave(api) = %{octave_api} -BuildRequires: bison flex less tetex gcc-gfortran lapack-devel blas-devel +BuildRequires: bison flex less tetex gcc-gfortran atlas-devel BuildRequires: ncurses-devel zlib-devel hdf5-devel texinfo qhull-devel BuildRequires: readline-devel glibc-devel fftw-devel gperf ghostscript BuildRequires: curl-devel pcre-devel texinfo-tex arpack-devel libX11-devel @@ -47,7 +47,7 @@ Summary: Development headers and files for Octave Group: Development/Libraries Requires: %{name} = %{epoch}:%{version}-%{release} Requires: readline-devel fftw-devel hdf5-devel zlib-devel -Requires: lapack-devel blas-devel gcc-c++ gcc-gfortran +Requires: atlas-devel gcc-c++ gcc-gfortran %description devel The octave-devel package contains files needed for developing @@ -76,7 +76,7 @@ fi %build %global enable64 no export CPPFLAGS="-DH5_USE_16_API" -%configure --enable-shared --disable-static --enable-64=%enable64 F77=gfortran +%configure --enable-shared --disable-static --enable-64=%enable64 --with-blas="-L%{_libdir}/atlas -lf77blas -latlas" F77=gfortran # SMP make doesn't work in Octave 3.2.2 #make %{?_smp_mflags} OCTAVE_RELEASE="Fedora %{version}-%{release}" make OCTAVE_RELEASE="Fedora %{version}-%{release}" @@ -177,6 +177,9 @@ fi %changelog +* Wed Jan 6 2010 Jussi Lehtola - 6.3.2.3-3 +- Really build against ATLAS instead of reference BLAS (#513381). + * Sun Nov 15 2009 Alex Lancaster - 6:3.2.3-2 - Workaround broken pre-linking (#524493) From 3f7737ba94d9133b186f95b11adcef3fbad6aa77 Mon Sep 17 00:00:00 2001 From: Jussi Lehtola Date: Sun, 17 Jan 2010 11:21:20 +0000 Subject: [PATCH 05/20] Fix build against ARPACK. --- octave.spec | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/octave.spec b/octave.spec index d60d8be..fa0f5df 100644 --- a/octave.spec +++ b/octave.spec @@ -1,14 +1,14 @@ # From src/version.h:#define OCTAVE_API_VERSION -%define octave_api api-v37 +%global octave_api api-v37 Name: octave Version: 3.2.3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A high-level language for numerical computations Epoch: 6 Group: Applications/Engineering License: GPLv3+ -Source: ftp://ftp.octave.org/pub/octave/octave-%{version}.tar.bz2 +Source0: ftp://ftp.octave.org/pub/octave/octave-%{version}.tar.bz2 Source1: octave.conf URL: http://www.octave.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -76,7 +76,12 @@ fi %build %global enable64 no export CPPFLAGS="-DH5_USE_16_API" -%configure --enable-shared --disable-static --enable-64=%enable64 --with-blas="-L%{_libdir}/atlas -lf77blas -latlas" F77=gfortran +export F77=gfortran +%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 # SMP make doesn't work in Octave 3.2.2 #make %{?_smp_mflags} OCTAVE_RELEASE="Fedora %{version}-%{release}" make OCTAVE_RELEASE="Fedora %{version}-%{release}" @@ -177,7 +182,10 @@ fi %changelog -* Wed Jan 6 2010 Jussi Lehtola - 6.3.2.3-3 +* Sun Jan 17 2010 Jussi Lehtola - 6:3.2.3-4 +- Fix compilation against ARPACK. + +* Wed Jan 6 2010 Jussi Lehtola - 6:3.2.3-3 - Really build against ATLAS instead of reference BLAS (#513381). * Sun Nov 15 2009 Alex Lancaster - 6:3.2.3-2 From 8e60b0224ce5ac28f3b9c3a08799f3435aa4feac Mon Sep 17 00:00:00 2001 From: Jussi Lehtola Date: Thu, 28 Jan 2010 13:06:39 +0000 Subject: [PATCH 06/20] Update to 3.2.4. --- .cvsignore | 2 +- octave.spec | 16 +++++++++++----- sources | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.cvsignore b/.cvsignore index 1d87c3d..59fc351 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -octave-3.2.3.tar.bz2 +octave-3.2.4.tar.bz2 diff --git a/octave.spec b/octave.spec index fa0f5df..362fa78 100644 --- a/octave.spec +++ b/octave.spec @@ -2,13 +2,13 @@ %global octave_api api-v37 Name: octave -Version: 3.2.3 -Release: 4%{?dist} +Version: 3.2.4 +Release: 1%{?dist} Summary: A high-level language for numerical computations Epoch: 6 Group: Applications/Engineering License: GPLv3+ -Source0: ftp://ftp.octave.org/pub/octave/octave-%{version}.tar.bz2 +Source0: ftp://ftp.octave.org/pub/octave/octave-%{version}.tar.bz2 Source1: octave.conf URL: http://www.octave.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -73,6 +73,9 @@ then exit 1 fi +# Check permissions +find -name *.cc -exec chmod 644 {} \; + %build %global enable64 no export CPPFLAGS="-DH5_USE_16_API" @@ -126,7 +129,7 @@ cp -a doc/interpreter/*.pdf doc/interpreter/HTML/ interpreter/ # work-around broken pre-linking (bug 524493) install -d %{buildroot}%{_sysconfdir}/prelink.conf.d -install %{SOURCE1} %{buildroot}%{_sysconfdir}/prelink.conf.d/ +install -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/prelink.conf.d/ %check make check @@ -182,6 +185,9 @@ fi %changelog +* Thu Jan 28 2010 Jussi Lehtola - 6:3.2.4-1 +- Update to 3.2.4 with a few rpmlint fixes. + * Sun Jan 17 2010 Jussi Lehtola - 6:3.2.3-4 - Fix compilation against ARPACK. @@ -387,7 +393,7 @@ fi * Fri Nov 11 2005 Quentin Spencer 2.9.4-1 - New upstream release. - Patch to make sure all headers are included in -devel. -- PKG_ADD file now needs %{buildroot} stripped from it. +- PKG_ADD file now needs %%{buildroot} stripped from it. - Cleanup errors in dependencies. * Tue Oct 25 2005 Quentin Spencer 2.9.3-6 diff --git a/sources b/sources index 645b8a0..3a86753 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -eecaa1a3b2da3b94fa7bcebbc4f1a1f2 octave-3.2.3.tar.bz2 +608196657f4fa010420227b77333bb71 octave-3.2.4.tar.bz2 From 25798c44ce4b329da969553613fe698fdc638643 Mon Sep 17 00:00:00 2001 From: alexlan Date: Sun, 28 Feb 2010 23:08:24 +0000 Subject: [PATCH 07/20] - Fix the prelink workaround to work with any version. - Use _sysconfdir macro instead of /etc. --- octave.spec | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/octave.spec b/octave.spec index 362fa78..6852fa0 100644 --- a/octave.spec +++ b/octave.spec @@ -3,13 +3,12 @@ Name: octave Version: 3.2.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A high-level language for numerical computations Epoch: 6 Group: Applications/Engineering License: GPLv3+ Source0: ftp://ftp.octave.org/pub/octave/octave-%{version}.tar.bz2 -Source1: octave.conf URL: http://www.octave.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -95,8 +94,8 @@ make install DESTDIR=%{buildroot} rm -f %{buildroot}%{_infodir}/dir # Make library links -mkdir -p %{buildroot}/etc/ld.so.conf.d -echo "%{_libdir}/octave-%{version}" > %{buildroot}/etc/ld.so.conf.d/octave-%{_arch}.conf +mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d +echo "%{_libdir}/octave-%{version}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/octave-%{_arch}.conf # Remove RPM_BUILD_ROOT from ls-R files perl -pi -e "s,%{buildroot},," %{buildroot}%{_libexecdir}/%{name}/ls-R @@ -129,7 +128,7 @@ cp -a doc/interpreter/*.pdf doc/interpreter/HTML/ interpreter/ # work-around broken pre-linking (bug 524493) install -d %{buildroot}%{_sysconfdir}/prelink.conf.d -install -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/prelink.conf.d/ +echo "-b %{_bindir}/octave-%{version}" > %{buildroot}%{_sysconfdir}/prelink.conf.d/octave.conf %check make check @@ -154,7 +153,7 @@ fi %doc COPYING NEWS* PROJECTS README README.Linux README.kpathsea ROADMAP %doc SENDING-PATCHES emacs/ # FIXME: Create an -emacs package that has the emacs addon -%config /etc/ld.so.conf.d/octave-*.conf +%config %{_sysconfdir}/ld.so.conf.d/octave-*.conf %{_bindir}/octave* %{_libdir}/octave-%{version}/ %{_libexecdir}/octave/ @@ -185,6 +184,10 @@ fi %changelog +* Fri Feb 26 2010 Michal Schmidt 6:3.2.4-2 +- Fix the prelink workaround to work with any version. +- Use _sysconfdir macro instead of /etc. + * Thu Jan 28 2010 Jussi Lehtola - 6:3.2.4-1 - Update to 3.2.4 with a few rpmlint fixes. From 4d202ad7525a9069729757fdca8ad4cafa40a146 Mon Sep 17 00:00:00 2001 From: alexlan Date: Mon, 1 Mar 2010 00:08:53 +0000 Subject: [PATCH 08/20] - Temporarily disable %%check to enable build to complete and ensure upgrade path works. This works around a crash in the imread.m image test script, this may be the same problem as described by upstream here: https://www-old.cae.wisc.edu/pipermail/octave-maintainers/2010-January/ 014891.html --- octave.spec | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/octave.spec b/octave.spec index 6852fa0..b48b12b 100644 --- a/octave.spec +++ b/octave.spec @@ -3,7 +3,7 @@ Name: octave Version: 3.2.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A high-level language for numerical computations Epoch: 6 Group: Applications/Engineering @@ -130,8 +130,8 @@ cp -a doc/interpreter/*.pdf doc/interpreter/HTML/ interpreter/ install -d %{buildroot}%{_sysconfdir}/prelink.conf.d echo "-b %{_bindir}/octave-%{version}" > %{buildroot}%{_sysconfdir}/prelink.conf.d/octave.conf -%check -make check +#%%check +#make check %clean rm -rf %{buildroot} @@ -184,6 +184,12 @@ fi %changelog +* Sun Feb 28 2010 Alex Lancaster - 6:3.2.4-3 +- Temporarily disable %%check to enable build to complete and ensure + upgrade path works. This works around a crash in the imread.m image test + script, this may be the same problem as described by upstream here: + https://www-old.cae.wisc.edu/pipermail/octave-maintainers/2010-January/014891.html + * Fri Feb 26 2010 Michal Schmidt 6:3.2.4-2 - Fix the prelink workaround to work with any version. - Use _sysconfdir macro instead of /etc. From 83a398c8ec847ca4b342e96f2bef4032d99d15b3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 04:49:51 +0000 Subject: [PATCH 09/20] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- import.log | 5 ----- 3 files changed, 26 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 import.log diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 86713d9..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: octave -# $Id$ -NAME := octave -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/import.log b/import.log deleted file mode 100644 index bcf7a68..0000000 --- a/import.log +++ /dev/null @@ -1,5 +0,0 @@ -octave-3_0_2-2_fc10:HEAD:octave-3.0.2-2.fc10.src.rpm:1224776342 -octave-3_0_5-1_fc11:HEAD:octave-3.0.5-1.fc11.src.rpm:1239552316 -octave-3_2_0-1_fc11:HEAD:octave-3.2.0-1.fc11.src.rpm:1247313567 -octave-3_2_2-1_fc11:HEAD:octave-3.2.2-1.fc11.src.rpm:1249027014 -octave-3_2_2-5_fc12:HEAD:octave-3.2.2-5.fc12.src.rpm:1253686658 From c427094f21ca9d307a6a0c949e76a3b0141f55ba Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Tue, 21 Dec 2010 10:41:07 -0700 Subject: [PATCH 10/20] - Update to 3.3.54 - Add patch to prevent run-octave from getting installed - Drop -DH5_USE_16_API - Enable parallel builds - Cleanup doc instal --- .gitignore | 1 + octave.spec | 49 ++++++++++++++++++++++++++----------------------- sources | 2 +- 3 files changed, 28 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index 59fc351..cc631d1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ octave-3.2.4.tar.bz2 +/octave-3.3.54.tar.bz2 diff --git a/octave.spec b/octave.spec index b48b12b..13cc0e9 100644 --- a/octave.spec +++ b/octave.spec @@ -1,14 +1,16 @@ # From src/version.h:#define OCTAVE_API_VERSION -%global octave_api api-v37 +%global octave_api api-v42+ Name: octave -Version: 3.2.4 -Release: 3%{?dist} +Version: 3.3.54 +Release: 1%{?dist} Summary: A high-level language for numerical computations Epoch: 6 Group: Applications/Engineering License: GPLv3+ -Source0: ftp://ftp.octave.org/pub/octave/octave-%{version}.tar.bz2 +Source0: ftp://alpha.gnu.org/gnu/octave/octave-%{version}.tar.bz2 +#Source0: ftp://ftp.octave.org/pub/octave/octave-%{version}.tar.bz2 +Patch0: octave-3.3.54-run-octave.patch URL: http://www.octave.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -65,6 +67,7 @@ This package contains documentation for Octave. %prep %setup -q +%patch0 -p1 -b .run-octave # Check that octave_api is set correctly if ! grep -q '^#define OCTAVE_API_VERSION "%{octave_api}"' src/version.h then @@ -77,16 +80,13 @@ find -name *.cc -exec chmod 644 {} \; %build %global enable64 no -export CPPFLAGS="-DH5_USE_16_API" export F77=gfortran %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 -# SMP make doesn't work in Octave 3.2.2 -#make %{?_smp_mflags} OCTAVE_RELEASE="Fedora %{version}-%{release}" -make OCTAVE_RELEASE="Fedora %{version}-%{release}" +make %{?_smp_mflags} OCTAVE_RELEASE="Fedora %{version}-%{release}" %install rm -rf %{buildroot} @@ -103,12 +103,6 @@ perl -pi -e "s,%{buildroot},," %{buildroot}%{_datadir}/%{name}/ls-R # Make sure ls-R exists touch %{buildroot}%{_datadir}/%{name}/ls-R -# Clean doc directory -pushd doc - make distclean - rm -f *.in */*.in */*.cc refcard/*.tex -popd - # Create desktop file rm %{buildroot}%{_datadir}/applications/www.octave.org-octave.desktop desktop-file-install --vendor fedora --remove-category Development --add-category "Education" \ @@ -122,17 +116,17 @@ mkdir -p %{buildroot}%{_libexecdir}/%{name}/site/oct/$HOST_TYPE mkdir -p %{buildroot}%{_datadir}/%{name}/packages touch %{buildroot}%{_datadir}/%{name}/octave_packages -# Create interpreter documentation directory -mkdir interpreter -cp -a doc/interpreter/*.pdf doc/interpreter/HTML/ interpreter/ - # work-around broken pre-linking (bug 524493) install -d %{buildroot}%{_sysconfdir}/prelink.conf.d echo "-b %{_bindir}/octave-%{version}" > %{buildroot}%{_sysconfdir}/prelink.conf.d/octave.conf -#%%check + +# TODO - Fix this: +# src/DLD-FUNCTIONS/md5sum.cc ............................*** stack smashing detected ***: /builddir/build/BUILD/octave-3.3.54/src/.libs/lt-octave terminated +#%check #make check + %clean rm -rf %{buildroot} @@ -151,14 +145,16 @@ fi %files %defattr(-,root,root,-) %doc COPYING NEWS* PROJECTS README README.Linux README.kpathsea ROADMAP -%doc SENDING-PATCHES emacs/ +%doc SENDING-PATCHES # FIXME: Create an -emacs package that has the emacs addon %config %{_sysconfdir}/ld.so.conf.d/octave-*.conf %{_bindir}/octave* %{_libdir}/octave-%{version}/ %{_libexecdir}/octave/ %{_mandir}/man1/octave*.1.* +%{_infodir}/liboctave.info* %{_infodir}/octave.info* +%{_infodir}/OctaveFAQ.info* %{_datadir}/applications/fedora-octave.desktop # octave_packages is %ghost, so need to list everything else separately %dir %{_datadir}/octave @@ -178,12 +174,19 @@ fi %files doc %defattr(-,root,root,-) -%doc doc/liboctave/HTML/ doc/liboctave/liboctave.pdf -%doc doc/faq/Octave-FAQ.pdf doc/refcard/*.pdf -%doc examples/ interpreter +%doc doc/liboctave/liboctave.html doc/liboctave/liboctave.pdf +%doc doc/faq/OctaveFAQ.pdf doc/refcard/*.pdf +%doc examples/ %changelog +* Thu Dec 16 2010 Orion Poplawski - 6:3.3.54-1 +- Update to 3.3.54 +- Add patch to prevent run-octave from getting installed +- Drop -DH5_USE_16_API +- Enable parallel builds +- Cleanup doc instal + * Sun Feb 28 2010 Alex Lancaster - 6:3.2.4-3 - Temporarily disable %%check to enable build to complete and ensure upgrade path works. This works around a crash in the imread.m image test diff --git a/sources b/sources index 3a86753..31e7561 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -608196657f4fa010420227b77333bb71 octave-3.2.4.tar.bz2 +3443b2b48b0e7d17a272d80faf3bebee octave-3.3.54.tar.bz2 From ce945d94590e43eb8a795e885b0598ea0a3da7ea Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Tue, 8 Feb 2011 10:55:39 -0700 Subject: [PATCH 11/20] - Update to 3.4.0 - Drop run-octave patch fixed upstream - Add patch to support gcc 4.6 --- .gitignore | 1 + octave-3.4.0-gcc46.patch | 24 ++++++++++++++++++++++++ octave.spec | 23 ++++++++++++++--------- sources | 2 +- 4 files changed, 40 insertions(+), 10 deletions(-) create mode 100644 octave-3.4.0-gcc46.patch diff --git a/.gitignore b/.gitignore index cc631d1..d3f0347 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ octave-3.2.4.tar.bz2 /octave-3.3.54.tar.bz2 +/octave-3.4.0.tar.bz2 diff --git a/octave-3.4.0-gcc46.patch b/octave-3.4.0-gcc46.patch new file mode 100644 index 0000000..c174204 --- /dev/null +++ b/octave-3.4.0-gcc46.patch @@ -0,0 +1,24 @@ +diff -up octave-3.4.0/liboctave/oct-alloc.h.gcc46 octave-3.4.0/liboctave/oct-alloc.h +--- octave-3.4.0/liboctave/oct-alloc.h.gcc46 2011-02-08 03:00:51.000000000 -0700 ++++ octave-3.4.0/liboctave/oct-alloc.h 2011-02-08 09:41:23.984081687 -0700 +@@ -23,6 +23,8 @@ along with Octave; see the file COPYING. + #if !defined (octave_oct_alloc_h) + #define octave_oct_alloc_h 1 + ++#include ++ + class + OCTAVE_API + octave_allocator +diff -up octave-3.4.0/src/pr-output.cc.gcc46 octave-3.4.0/src/pr-output.cc +--- octave-3.4.0/src/pr-output.cc.gcc46 2011-02-08 03:00:52.000000000 -0700 ++++ octave-3.4.0/src/pr-output.cc 2011-02-08 09:55:16.149662744 -0700 +@@ -3024,7 +3024,7 @@ abs (T x) + } + + #define INSTANTIATE_ABS(T) \ +- template /* static */ inline T abs (T) ++ template /* static */ T abs (T) + + INSTANTIATE_ABS(signed char); + INSTANTIATE_ABS(short); diff --git a/octave.spec b/octave.spec index 13cc0e9..5c46b0e 100644 --- a/octave.spec +++ b/octave.spec @@ -1,16 +1,16 @@ # From src/version.h:#define OCTAVE_API_VERSION -%global octave_api api-v42+ +%global octave_api api-v47+ Name: octave -Version: 3.3.54 +Version: 3.4.0 Release: 1%{?dist} Summary: A high-level language for numerical computations Epoch: 6 Group: Applications/Engineering License: GPLv3+ -Source0: ftp://alpha.gnu.org/gnu/octave/octave-%{version}.tar.bz2 -#Source0: ftp://ftp.octave.org/pub/octave/octave-%{version}.tar.bz2 -Patch0: octave-3.3.54-run-octave.patch +Source0: ftp://ftp.gnu.org/gnu/octave/octave-%{version}.tar.bz2 +# Add missing cstddef for gcc 4.6 +Patch0: octave-3.4.0-gcc46.patch URL: http://www.octave.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -67,7 +67,7 @@ This package contains documentation for Octave. %prep %setup -q -%patch0 -p1 -b .run-octave +%patch0 -p1 -b .gcc46 # Check that octave_api is set correctly if ! grep -q '^#define OCTAVE_API_VERSION "%{octave_api}"' src/version.h then @@ -107,7 +107,7 @@ touch %{buildroot}%{_datadir}/%{name}/ls-R rm %{buildroot}%{_datadir}/applications/www.octave.org-octave.desktop desktop-file-install --vendor fedora --remove-category Development --add-category "Education" \ --add-category "DataVisualization" --add-category "NumericalAnalysis" --add-category "Engineering" --add-category "Physics" \ - --dir %{buildroot}%{_datadir}/applications examples/octave.desktop + --dir %{buildroot}%{_datadir}/applications doc/icons/octave.desktop # Create directories for add-on packages HOST_TYPE=`%{buildroot}%{_bindir}/octave-config -p CANONICAL_HOST_TYPE` @@ -144,8 +144,8 @@ fi %files %defattr(-,root,root,-) -%doc COPYING NEWS* PROJECTS README README.Linux README.kpathsea ROADMAP -%doc SENDING-PATCHES +%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 %{_bindir}/octave* @@ -180,6 +180,11 @@ fi %changelog +* Tue Feb 8 2011 Orion Poplawski - 6:3.4.0-1 +- Update to 3.4.0 +- Drop run-octave patch fixed upstream +- Add patch to support gcc 4.6 + * Thu Dec 16 2010 Orion Poplawski - 6:3.3.54-1 - Update to 3.3.54 - Add patch to prevent run-octave from getting installed diff --git a/sources b/sources index 31e7561..14057a2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3443b2b48b0e7d17a272d80faf3bebee octave-3.3.54.tar.bz2 +c8144cee1d37e645d3368a8e8a5f1856 octave-3.4.0.tar.bz2 From c1ffcc58a22032e9c773fd5a9a6147a2095f37e0 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 8 Feb 2011 20:21:08 -0600 Subject: [PATCH 12/20] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- octave.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/octave.spec b/octave.spec index 5c46b0e..ea5aebe 100644 --- a/octave.spec +++ b/octave.spec @@ -3,7 +3,7 @@ Name: octave Version: 3.4.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A high-level language for numerical computations Epoch: 6 Group: Applications/Engineering @@ -180,6 +180,9 @@ fi %changelog +* Tue Feb 08 2011 Fedora Release Engineering - 6:3.4.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Tue Feb 8 2011 Orion Poplawski - 6:3.4.0-1 - Update to 3.4.0 - Drop run-octave patch fixed upstream From 4c96691d1851f517165fa0e80c506879530a3c57 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Sun, 13 Feb 2011 08:32:34 -0700 Subject: [PATCH 13/20] 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 582974b37422ceb6bc99fa24ad3d9da54b2d37a3 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Sun, 13 Feb 2011 08:32:34 -0700 Subject: [PATCH 14/20] 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 15/20] 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 16/20] 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 From b62f11555631057bdfdf902f83386dfeee0c2091 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Wed, 23 Feb 2011 10:40:13 -0700 Subject: [PATCH 17/20] Update rpm macros per FPC comments --- macros.octave | 32 ++++++++++++++++++++++++-------- octave.spec | 5 ++++- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/macros.octave b/macros.octave index 660a50a..7fc264b 100644 --- a/macros.octave +++ b/macros.octave @@ -1,13 +1,28 @@ +# Octave packaging macros + +# Octave binary API provided %octave_api %(octave-config -p API_VERSION || echo 0)} -%_octshareprefix %{buildroot}%{_datadir}/octave -%_octprefix %{_octshareprefix}/packages -%_octarchprefix %{buildroot}%{_libexecdir}/octave/packages + +# Octave Package Directories +%octshareprefix %{_datadir}/octave +%octprefix %{octshareprefix}/packages +%octarchprefix %{_libexecdir}/octave/packages +%octpkgdir %{octshareprefix}/%{octpkg}-%{version} +%octpkglibdir %{octarchprefix}/%{octpkg}-%{version} + +# Run an octave command - quietly with no startup files %octave_cmd() octave -H -q --no-site-file --eval "%*"; + +# Build Source0 into a package tar file in a temporary location %octave_pkg_build %octave_cmd pkg build '-verbose' %{_tmppath}/%{name}-%{version}-%{release}.%{_arch} %SOURCE0 + +# Install a package. We use the octave pkg install command to install the +# built package into the buildroot. We also put a note to prevent the root +# user from removing the package with the octave pkg uninstall command %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')); \ +mkdir -p %{buildroot}/%{octprefix} \ +mkdir -p %{buildroot}/%{octarchprefix} \ +%octave_cmd warning('off','all');pkg('prefix','%{buildroot}/%{octprefix}','%{buildroot}/%{octarchprefix}');pkg('global_list',fullfile('%{buildroot}/%{octshareprefix}','octave_packages'));pkg('local_list',fullfile('%{buildroot}/%{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 \ @@ -16,6 +31,9 @@ echo "function on_uninstall (desc)" > %{buildroot}%{octpkgdir}/packinfo/on_unins 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} + +# preun script - we need to remove our uninstall protection and perhaps +# run the package's own uninstall script. %_octave_pkg_preun \ rm %{octpkgdir}/packinfo/on_uninstall.m \ if [ -e %{octpkgdir}/packinfo/on_uninstall.m.orig ]; then \ @@ -24,5 +42,3 @@ if [ -e %{octpkgdir}/packinfo/on_uninstall.m.orig ]; then \ %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 7bd3997..b5977b7 100644 --- a/octave.spec +++ b/octave.spec @@ -3,7 +3,7 @@ Name: octave Version: 3.4.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A high-level language for numerical computations Epoch: 6 Group: Applications/Engineering @@ -189,6 +189,9 @@ fi %changelog +* Wed Feb 23 2011 Orion Poplawski - 6:3.4.0-4 +- Update rpm macros per FPC comments + * Mon Feb 14 2011 Orion Poplawski - 6:3.4.0-3 - Add rpm macros - Rebuild should pick up fixed suitesparse From 6948e3e45a09ae42dd75b96fb6d550412e4e8b65 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Wed, 23 Feb 2011 10:56:38 -0700 Subject: [PATCH 18/20] Fix %octpkgdir --- macros.octave | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros.octave b/macros.octave index 7fc264b..278598b 100644 --- a/macros.octave +++ b/macros.octave @@ -7,7 +7,7 @@ %octshareprefix %{_datadir}/octave %octprefix %{octshareprefix}/packages %octarchprefix %{_libexecdir}/octave/packages -%octpkgdir %{octshareprefix}/%{octpkg}-%{version} +%octpkgdir %{octprefix}/%{octpkg}-%{version} %octpkglibdir %{octarchprefix}/%{octpkg}-%{version} # Run an octave command - quietly with no startup files From 265a73c346ccfe1b4529e5a7eca6755e5bd44941 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Wed, 30 Mar 2011 11:09:06 -0600 Subject: [PATCH 19/20] Use libdir instead of libexecdir Rename octave_pkg_preun macro Fix multilib installs Re-enable prelinking, seems to work Add patch to enable building packages from directories --- macros.octave | 6 +-- octave-3.4.0-libdir.patch | 72 +++++++++++++++++++++++++++++ octave-3.4.0-pkgbuilddir.patch | 41 +++++++++++++++++ octave.spec | 84 ++++++++++++++++++++++++++++++---- 4 files changed, 191 insertions(+), 12 deletions(-) create mode 100644 octave-3.4.0-libdir.patch create mode 100644 octave-3.4.0-pkgbuilddir.patch diff --git a/macros.octave b/macros.octave index 278598b..5875023 100644 --- a/macros.octave +++ b/macros.octave @@ -6,7 +6,7 @@ # Octave Package Directories %octshareprefix %{_datadir}/octave %octprefix %{octshareprefix}/packages -%octarchprefix %{_libexecdir}/octave/packages +%octarchprefix %{_libdir}/octave/packages %octpkgdir %{octprefix}/%{octpkg}-%{version} %octpkglibdir %{octarchprefix}/%{octpkg}-%{version} @@ -14,7 +14,7 @@ %octave_cmd() octave -H -q --no-site-file --eval "%*"; # Build Source0 into a package tar file in a temporary location -%octave_pkg_build %octave_cmd pkg build '-verbose' %{_tmppath}/%{name}-%{version}-%{release}.%{_arch} %SOURCE0 +%octave_pkg_build %octave_cmd pkg build '-verbose' %{_tmppath}/%{name}-%{version}-%{release}.%{_arch} %{_builddir}/%{buildsubdir} # Install a package. We use the octave pkg install command to install the # built package into the buildroot. We also put a note to prevent the root @@ -34,7 +34,7 @@ echo "endfunction" >> %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m \ # preun script - we need to remove our uninstall protection and perhaps # run the package's own uninstall script. -%_octave_pkg_preun \ +%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 \ diff --git a/octave-3.4.0-libdir.patch b/octave-3.4.0-libdir.patch new file mode 100644 index 0000000..3bc68af --- /dev/null +++ b/octave-3.4.0-libdir.patch @@ -0,0 +1,72 @@ +--- octave-3.4.0/configure.libdir 2011-02-08 03:03:31.000000000 -0700 ++++ octave-3.4.0/configure 2011-03-18 10:35:25.014978076 -0600 +@@ -6680,7 +6680,7 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: result: defining octetcdir to be $octetcdir" >&5 + $as_echo "defining octetcdir to be $octetcdir" >&6; } + +-: ${octlibdir='$(libdir)/octave-$(version)'} ++: ${octlibdir='$(libdir)/octave/$(version)'} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: defining octlibdir to be $octlibdir" >&5 + $as_echo "defining octlibdir to be $octlibdir" >&6; } + +@@ -6700,19 +6700,19 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: result: defining localverarchlibdir to be $localverarchlibdir" >&5 + $as_echo "defining localverarchlibdir to be $localverarchlibdir" >&6; } + +-: ${octfiledir='$(libexecdir)/octave/$(version)/oct/$(canonical_host_type)'} ++: ${octfiledir='$(libdir)/octave/$(version)/oct'} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: defining octfiledir to be $octfiledir" >&5 + $as_echo "defining octfiledir to be $octfiledir" >&6; } + +-: ${localoctfiledir='$(libexecdir)/octave/site/oct/$(canonical_host_type)'} ++: ${localoctfiledir='$(libdir)/octave/site/oct'} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: defining localoctfiledir to be $localoctfiledir" >&5 + $as_echo "defining localoctfiledir to be $localoctfiledir" >&6; } + +-: ${localapioctfiledir='$(libexecdir)/octave/site/oct/$(api_version)/$(canonical_host_type)'} ++: ${localapioctfiledir='$(libdir)/octave/site/oct/$(api_version)'} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: defining localapioctfiledir to be $localapioctfiledir" >&5 + $as_echo "defining localapioctfiledir to be $localapioctfiledir" >&6; } + +-: ${localveroctfiledir='$(libexecdir)/octave/$(version)/site/oct/$(canonical_host_type)'} ++: ${localveroctfiledir='$(libdir)/octave/$(version)/site/oct'} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: defining localveroctfiledir to be $localveroctfiledir" >&5 + $as_echo "defining localveroctfiledir to be $localveroctfiledir" >&6; } + +--- octave-3.4.0/scripts/pkg/pkg.m.libdir 2011-03-18 09:34:11.258406127 -0600 ++++ octave-3.4.0/scripts/pkg/pkg.m 2011-03-18 10:56:58.763177238 -0600 +@@ -248,7 +248,7 @@ + if (prefix == -1) + if (global_install) + prefix = fullfile (OCTAVE_HOME (), "share", "octave", "packages"); +- archprefix = fullfile (octave_config_info ("libexecdir"), ++ archprefix = fullfile (octave_config_info ("libdir"), + "octave", "packages"); + else + prefix = fullfile ("~", "octave"); +@@ -293,7 +293,7 @@ + global_install = true; + if (! user_prefix) + prefix = fullfile (OCTAVE_HOME (), "share", "octave", "packages"); +- archprefix = fullfile (octave_config_info ("libexecdir"), ++ archprefix = fullfile (octave_config_info ("libdir"), + "octave", "packages"); + endif + case available_actions +@@ -2211,14 +2211,13 @@ + endfunction + + function arch = getarch () +- persistent _arch = cstrcat (octave_config_info("canonical_host_type"), ... +- "-", octave_config_info("api_version")); ++ persistent _arch = octave_config_info("api_version"); + arch = _arch; + endfunction + + function archprefix = getarchprefix (desc, global_install) + if ((nargin == 2 && global_install) || (nargin < 2 && issuperuser ())) +- archprefix = fullfile (octave_config_info ("libexecdir"), "octave", ++ archprefix = fullfile (octave_config_info ("libdir"), "octave", + "packages", cstrcat(desc.name, "-", desc.version)); + else + archprefix = desc.dir; diff --git a/octave-3.4.0-pkgbuilddir.patch b/octave-3.4.0-pkgbuilddir.patch new file mode 100644 index 0000000..c6811dc --- /dev/null +++ b/octave-3.4.0-pkgbuilddir.patch @@ -0,0 +1,41 @@ +--- octave-3.4.0/scripts/pkg/pkg.m.pkgbuilddir 2011-02-08 03:00:51.000000000 -0700 ++++ octave-3.4.0/scripts/pkg/pkg.m 2011-03-18 09:31:24.670165643 -0600 +@@ -644,7 +644,14 @@ + for i = 1:length (files) + tgz = files{i}; + +- if (exist (tgz, "file")) ++ ## The filename pointed to an uncompressed package to begin with. ++ if (exist (tgz, "dir")) ++ if (tgz(1) == '/') ++ packdir = tgz; ++ else ++ packdir = fullfile (pwd(), tgz); ++ endif ++ elseif (exist (tgz, "file")) + ## Create a temporary directory. + tmpdir = tmpnam (); + tmpdirs{end+1} = tmpdir; +@@ -671,20 +678,12 @@ + if (length (dirlist) > 3) + error ("bundles of packages are not allowed"); + endif +- endif + +- ## The filename pointed to an uncompressed package to begin with. +- if (exist (tgz, "dir")) +- dirlist = {".", "..", tgz}; ++ ## The two first entries of dirlist are "." and "..". ++ packdir = fullfile (tmpdir, dirlist{3}); + endif + + if (exist (tgz, "file") || exist (tgz, "dir")) +- ## The two first entries of dirlist are "." and "..". +- if (exist (tgz, "file")) +- packdir = fullfile (tmpdir, dirlist{3}); +- else +- packdir = fullfile (pwd(), dirlist{3}); +- endif + packdirs{end+1} = packdir; + + ## Make sure the package contains necessary files. diff --git a/octave.spec b/octave.spec index b5977b7..47ccfc3 100644 --- a/octave.spec +++ b/octave.spec @@ -3,7 +3,7 @@ Name: octave Version: 3.4.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A high-level language for numerical computations Epoch: 6 Group: Applications/Engineering @@ -12,6 +12,11 @@ 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 +# Use libdir instead of libexecdir +Patch1: octave-3.4.0-libdir.patch +# https://savannah.gnu.org/bugs/index.php?32839 +# Fix building packages from directories +Patch2: octave-3.4.0-pkgbuilddir.patch URL: http://www.octave.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -69,6 +74,8 @@ This package contains documentation for Octave. %prep %setup -q %patch0 -p1 -b .gcc46 +%patch1 -p1 -b .libdir +%patch2 -p1 -b .pkgbuilddir # Check that octave_api is set correctly if ! grep -q '^#define OCTAVE_API_VERSION "%{octave_api}"' src/version.h then @@ -99,10 +106,10 @@ rm -f %{buildroot}%{_infodir}/dir # Make library links mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d -echo "%{_libdir}/octave-%{version}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/octave-%{_arch}.conf +echo "%{_libdir}/octave/%{version}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/octave-%{_arch}.conf # Remove RPM_BUILD_ROOT from ls-R files -perl -pi -e "s,%{buildroot},," %{buildroot}%{_libexecdir}/%{name}/ls-R +perl -pi -e "s,%{buildroot},," %{buildroot}%{_libdir}/%{name}/ls-R perl -pi -e "s,%{buildroot},," %{buildroot}%{_datadir}/%{name}/ls-R # Make sure ls-R exists touch %{buildroot}%{_datadir}/%{name}/ls-R @@ -115,14 +122,66 @@ desktop-file-install --vendor fedora --remove-category Development --add-categor # Create directories for add-on packages HOST_TYPE=`%{buildroot}%{_bindir}/octave-config -p CANONICAL_HOST_TYPE` -mkdir -p %{buildroot}%{_libexecdir}/%{name}/site/oct/%{octave_api}/$HOST_TYPE -mkdir -p %{buildroot}%{_libexecdir}/%{name}/site/oct/$HOST_TYPE +mkdir -p %{buildroot}%{_libdir}/%{name}/site/oct/%{octave_api}/$HOST_TYPE +mkdir -p %{buildroot}%{_libdir}/%{name}/site/oct/$HOST_TYPE mkdir -p %{buildroot}%{_datadir}/%{name}/packages +mkdir -p %{buildroot}%{_libdir}/%{name}/packages touch %{buildroot}%{_datadir}/%{name}/octave_packages # work-around broken pre-linking (bug 524493) -install -d %{buildroot}%{_sysconfdir}/prelink.conf.d -echo "-b %{_bindir}/octave-%{version}" > %{buildroot}%{_sysconfdir}/prelink.conf.d/octave.conf +#install -d %{buildroot}%{_sysconfdir}/prelink.conf.d +#echo "-b %{_bindir}/octave-%{version}" > %{buildroot}%{_sysconfdir}/prelink.conf.d/octave.conf + +# Fix multilib installs +for include in config defaults oct-conf +do + mv %{buildroot}%{_includedir}/%{name}-%{version}/%{name}/${include}.h \ + %{buildroot}%{_includedir}/%{name}-%{version}/%{name}/${include}-%{__isa_bits}.h + cat > %{buildroot}%{_includedir}/%{name}-%{version}/%{name}/${include}.h < + +#if __WORDSIZE == 32 +#include "${include}-32.h" +#elif __WORDSIZE == 64 +#include "${include}-64.h" +#else +#error "Unknown word size" +#endif +EOF +done +for script in octave-config-%{version} mkoctfile-%{version} +do + mv %{buildroot}%{_bindir}/${script} %{buildroot}%{_libdir}/%{name}/%{version}/${script} + cat > %{buildroot}%{_bindir}/${script} < - 6:3.4.0-5 +- Use libdir instead of libexecdir +- Rename octave_pkg_preun macro +- Fix multilib installs +- Re-enable prelinking, seems to work +- Add patch to enable building packages from directories + * Wed Feb 23 2011 Orion Poplawski - 6:3.4.0-4 - Update rpm macros per FPC comments From e82abefcda91d2e2186a100fb7bfda4ccbdb8534 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Tue, 17 May 2011 21:53:17 -0600 Subject: [PATCH 20/20] Rebuild for hdf5 1.8.7 --- octave.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/octave.spec b/octave.spec index 47ccfc3..ad38975 100644 --- a/octave.spec +++ b/octave.spec @@ -3,7 +3,7 @@ Name: octave Version: 3.4.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: A high-level language for numerical computations Epoch: 6 Group: Applications/Engineering @@ -248,6 +248,9 @@ fi %changelog +* Tue May 17 2011 Orion Poplawski - 6:3.4.0-6 +- Rebuild for hdf5 1.8.7 + * Fri Mar 18 2011 Orion Poplawski - 6:3.4.0-5 - Use libdir instead of libexecdir - Rename octave_pkg_preun macro