Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-release-src > by-pkgid > 4b770de04bb7cfabd199cdb38f5cdf5c > files > 2

octave3-2.9.16-3mdv2009.0.src.rpm

%define octave_api api-v28

Name:           octave3
Version:        2.9.16
Release:        %mkrel 3
Summary:        High-level language for numerical computations
Epoch:          0
Group:          Sciences/Mathematics
License:        GPL
URL:            http://www.octave.org/
Source0:        ftp://ftp.octave.org/pub/octave/bleeding-edge/octave-%{version}.tar.bz2
Requires:       gnuplot
Requires:       info
Requires:       less
Requires:       texinfo
Requires(post): info-install
Requires(preun): info-install
Requires(post): rpm-helper
BuildRequires:  bison
BuildRequires:  blas-devel
BuildRequires:  desktop-file-utils
BuildRequires:  fftw-devel
BuildRequires:  flex
BuildRequires:  gcc-gfortran
BuildRequires:  ghostscript
BuildRequires:  glibc-devel
BuildRequires:  glpk-devel
BuildRequires:  gnuplot
BuildRequires:  gperf
BuildRequires:  hdf5-devel
BuildRequires:  lapack-devel
BuildRequires:  less
BuildRequires:  ncurses-devel
BuildRequires:  readline-devel
BuildRequires:  tetex
BuildRequires:  texinfo
BuildRequires:  ufsparse-devel
BuildRequires:  zlib-devel
Provides:       octave(api) = %{octave_api}
Conflicts:      octave
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root

%description
GNU Octave is a high-level language, primarily intended for numerical
computations. It provides a convenient command line interface for
solving linear and nonlinear problems numerically, and for performing
other numerical experiments using a language that is mostly compatible
with Matlab. It may also be used as a batch-oriented language. Octave
has extensive tools for solving common numerical linear algebra
problems, finding the roots of nonlinear equations, integrating
ordinary functions, manipulating polynomials, and integrating ordinary
differential and differential-algebraic equations. It is easily
extensible and customizable via user-defined functions written in
Octave's own language, or using dynamically loaded modules written in
C++, C, Fortran, or other languages.

%package devel
Summary:        Development headers and files for Octave
Group:          Development/C
Requires:       %{name} = %{epoch}:%{version}-%{release}
Requires:       blas-devel
Requires:       fftw-devel
Requires:       gcc-c++
Requires:       gcc-gfortran
Requires:       hdf5-devel
Requires:       lapack-devel
Requires:       readline-devel
Requires:       zlib-devel

%description devel
The octave-devel package contains files needed for developing
applications which use GNU Octave.

%prep
%setup -q -n octave-%{version}
OCTAVE_API=`%{__sed} -nr 's/^#define OCTAVE_API_VERSION "(api-v[[:digit:]]+)"$/\1/p' src/version.h`
test "x${OCTAVE_API}" = x%{octave_api} || exit 1

%build
%define enable64 no
export CPPFLAGS=-I%{_includedir}/glpk
%{configure2_5x} --enable-shared --disable-static --enable-64=%{enable64} --with-f77=gfortran
%{make} OCTAVE_RELEASE="%{distribution} %{version}-%{release}"

%install
%{__rm} -rf %{buildroot}
%{makeinstall_std}

# Make library links
%{__mkdir_p} %{buildroot}/etc/ld.so.conf.d
/bin/echo "%{_libdir}/octave-%{version}" > %{buildroot}/etc/ld.so.conf.d/octave-%{_arch}.conf

# Remove RPM_BUILD_ROOT from ls-R files
%{__perl} -pi -e "s,%{buildroot},," %{buildroot}%{_libexecdir}/octave/ls-R
%{__perl} -pi -e "s,%{buildroot},," %{buildroot}%{_datadir}/octave/ls-R

%if 0
# Clean doc directory
pushd doc
  %{make} distclean || :
  %{__rm} -f *.in */*.in */*.cc refcard/*.tex
popd
%endif

# Create desktop file
%{__rm} %{buildroot}%{_datadir}/applications/www.octave.org-octave.desktop
%{_bindir}/desktop-file-install --add-category Education --remove-category Development \
        --dir %{buildroot}%{_datadir}/applications examples/octave.desktop

# Create directories for add-on packages
HOST_TYPE=`%{buildroot}%{_bindir}/octave-config -p CANONICAL_HOST_TYPE`
%{__mkdir_p} %{buildroot}%{_libexecdir}/octave/site/oct/%{octave_api}/$HOST_TYPE
%{__mkdir_p} %{buildroot}%{_libexecdir}/octave/site/oct/$HOST_TYPE
%{__mkdir_p} %{buildroot}%{_datadir}/octave/packages
/bin/touch %{buildroot}%{_datadir}/octave/octave_packages

%multiarch_includes %{buildroot}%{_includedir}/octave-%{version}/octave/config.h
%multiarch_includes %{buildroot}%{_includedir}/octave-%{version}/octave/defaults.h
%multiarch_includes %{buildroot}%{_includedir}/octave-%{version}/octave/oct-conf.h

%clean
%{__rm} -rf %{buildroot}

%post
%if %mdkversion < 200900
/sbin/ldconfig
%endif
%_install_info octave.info
%create_ghostfile %{_datadir}/octave/octave_packages root root 0664

%preun
%_remove_install_info octave.info

%if %mdkversion < 200900
%postun -p /sbin/ldconfig
%endif

%files
%defattr(0644,root,root,0755)
%doc COPYING NEWS* PROJECTS README README.Linux README.kpathsea ROADMAP
%doc SENDING-PATCHES THANKS emacs examples doc/interpreter/octave.p*
%doc doc/faq doc/interpreter/HTML doc/refcard
%defattr(-,root,root)
%{_bindir}/octave*
%config(noreplace) /etc/ld.so.conf.d/*
%{_libdir}/octave*
%{_datadir}/octave
%ghost %{_datadir}/octave/octave_packages
%if "%{_libdir}" != "%{_libexecdir}"
%{_libexecdir}/octave
%endif
%{_mandir}/man*/octave*
%{_infodir}/octave.info*
%{_datadir}/applications/*

%files devel
%defattr(0644,root,root,0755)
%doc doc/liboctave
%defattr(-,root,root)
%{_bindir}/mkoctfile*
%{_includedir}/octave-%{version}
%{multiarch_includedir}/octave-%{version}
%{_mandir}/man*/mkoctfile*


%changelog
* Wed Jul 30 2008 Thierry Vignaud <tvignaud@mandriva.com> 0:2.9.16-3mdv2009.0
+ Revision: 254386
- rebuild
- kill re-definition of %%buildroot on Pixel's request

  + Pixel <pixel@mandriva.com>
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

* Fri Nov 09 2007 David Walluck <walluck@mandriva.org> 0:2.9.16-1mdv2008.1
+ Revision: 107257
- 2.9.16

* Mon Oct 22 2007 David Walluck <walluck@mandriva.org> 0:2.9.15-1mdv2008.1
+ Revision: 101282
- sync sources
- 2.9.15
- Requires(post): rpm-helper
- remove octave-2.9.14-pkg.patch (merged upstream)

* Mon Oct 01 2007 David Walluck <walluck@mandriva.org> 0:2.9.14-1mdv2008.0
+ Revision: 94092
- add source tarball
- 2.9.14
- add patch for octave pkg manager (from Fedora)
- provide octave(api) again
- remove Development menu category (fix bug #33931)

* Tue Aug 28 2007 David Walluck <walluck@mandriva.org> 0:2.9.13-3mdv2008.0
+ Revision: 72460
- comment out Provides: octave(api)
- Conflicts: octave

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill ldconfig require as requested by pixel
    - kill file require on info-install
    - kill file require

* Thu Aug 09 2007 David Walluck <walluck@mandriva.org> 0:2.9.13-1mdv2008.0
+ Revision: 60939
- 2.9.13

* Fri Jun 08 2007 David Walluck <walluck@mandriva.org> 0:2.9.12-2mdv2008.0
+ Revision: 37217
- BuildRequires: texinfo
- clean up BuildRequires and Requires lists
- Import octave3



* Tue Jun 05 2007 David Walluck <walluck@mandriva.org> 0:2.9.12-1mdv2008.0
- release