Currently there is no recent octave package for openSUSE, so I decided to compile it
by myself, but due to dependencies this was a rather difficult task. I
succeeded by applying the following steps for Octave 3.2.3 on openSUSE 11.2.
1. add some additional sources (if not already available)
sudo zypper ar http://download.opensuse.org/repositories/openSUSE:Factory:Contrib/standard/ openSUSE:Factory:Contrib
sudo zypper ar http://download.opensuse.org/repositories/home:/ars3niy:/octave/openSUSE_11.1/ ars3niy:Octave
sudo zypper ar http://ftp.gwdg.de/pub/linux/misc/packman/ Packman
sudo zypper ar http://ftp.gwdg.de/pub/linux/misc/packman/suse/11.2/ Packman
2. we will need the following packages incl. some devel packages; install:
sudo zypper install bison build fftw3 fftw3-devel flex fltk fltk-devel \
gcc-c++ gcc-fortran glpk glpk-devel libglpk0 \
gmp-devel libgmp3 gnuplot gperf \
ImageMagick libbz2 libbz2-devel \
libcurl libcurl-devel hdf5 hdf5-devel \
libltdl3 ncurses ncurses-devel \
pcre pcre-devel readline readline-devel zlib zlib-devel \
libqrupdate1 libqrupdate1-devel \
Suitesparse Suitesparse-devel \
qhull qhull-devel \
libamd libamd-devel
2b. Add a link to hdf5 library (if necessary)
cd /usr/lib64
sudo ln libhdf5.so libhdf5.so.0
3. install source package; if you like you could compile additionally: libamd Suitesparse qhull …
sudo zypper source-install octave
4. download octave-3.2.3.tar.gz and save it to /usr/src/packages/SOURCES, e.g.
cd /usr/src/packages/SOURCES
wget ftp://ftp.octave.org/pub/octave/octave-3.2.3.tar.gz
5. modify octave.spec for the new version
edit /usr/src/packages/SPECS/octave.spec
- change version number (Version: 3.2.3)
- add additional entry to the “%file” section “%{_datadir}/applications/”
6. compile all packages according to their spec files
cd /usr/src/packages/SPECS
sudo rpmbuild -ba octave.spec
7. install the packages (this depends on your architecture, e.g. for x86_64)
cd /usr/src/packages/RPMS/x86_64
sudo rpm --install octave*.rpm
I corrected a small typo in the definition of the packman source, thanks to Martin’s post in the OpenSUSE Forum.