|
@@ -1,6 +1,11 @@
|
|
|
+# From src/version.h:#define OCTAVE_API_VERSION
|
|
|
+%global octave_api api-v53
|
|
|
+
|
|
|
+%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
|
|
|
+
|
|
|
%define pkg_name octave
|
|
|
%define pkg_version 5.1.0
|
|
|
-%define pkg_release 1%{?_dist_release}
|
|
|
+%define pkg_release 3%{?_dist_release}
|
|
|
|
|
|
Summary: GNU Octave -- a high-level language for numerical computations
|
|
|
Summary(ja): 数値計算のための高級言語
|
|
@@ -11,8 +16,12 @@ Release: %{pkg_release}
|
|
|
License: GPLv3
|
|
|
Group: Applications/Edutainment
|
|
|
URL: http://www.gnu.org/software/octave/
|
|
|
+
|
|
|
Source0: ftp://ftp.octave.org/gnu/octave/%{name}-%{version}.tar.lz
|
|
|
|
|
|
+# RPM macros for helping to build Octave packages
|
|
|
+Source1: macros.octave
|
|
|
+
|
|
|
Buildroot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
|
|
BuildRequires: gcc-gfortran
|
|
@@ -20,15 +29,16 @@ BuildRequires: bison flex gperf texinfo less
|
|
|
BuildRequires: gnuplot
|
|
|
BuildRequires: ghostscript-devel
|
|
|
BuildRequires: mesa-libOSMesa-devel
|
|
|
-BuildRequires: blas-devel lapack-devel
|
|
|
-BuildRequires: pcre-devel
|
|
|
-BuildRequires: readline-devel
|
|
|
%if %{?_dist_release} == "vl6"
|
|
|
BuildRequires: arpack
|
|
|
+BuildRequires: blas-devel lapack-devel
|
|
|
%endif
|
|
|
%if %{?_dist_release} >= "vl7"
|
|
|
BuildRequires: arpack-devel
|
|
|
+BuildRequires: openblas-devel
|
|
|
%endif
|
|
|
+BuildRequires: pcre-devel
|
|
|
+BuildRequires: readline-devel
|
|
|
BuildRequires: curl-devel
|
|
|
BuildRequires: fftw3-devel
|
|
|
BuildRequires: fontconfig-devel
|
|
@@ -62,7 +72,12 @@ BuildRequires: libsndfile-devel
|
|
|
BuildRequires: lzip
|
|
|
|
|
|
Requires: ghostscript
|
|
|
+%if %{?_dist_release} == "vl6"
|
|
|
Requires: blas lapack
|
|
|
+%endif
|
|
|
+%if %{?_dist_release} >= "vl7"
|
|
|
+Requires: openblas
|
|
|
+%endif
|
|
|
Requires: pcre
|
|
|
Requires: readline
|
|
|
Requires: mesa-libOSMesa
|
|
@@ -100,6 +115,8 @@ Requires(postun): /sbin/ldconfig
|
|
|
Requires(post): /sbin/ldconfig
|
|
|
Requires(preun): /sbin/install-info
|
|
|
|
|
|
+Provides: octave(api) = %{octave_api}
|
|
|
+
|
|
|
Vendor: Project Vine
|
|
|
Distribution: Vine Linux
|
|
|
Packager: ara_t
|
|
@@ -161,6 +178,14 @@ graphics_toolkit("gnuplot");
|
|
|
--enable-java \
|
|
|
--with-qt=5
|
|
|
|
|
|
+# Check that octave_api is set correctly (autogenerated file)
|
|
|
+make liboctave/version.h
|
|
|
+if ! grep -q '^#define OCTAVE_API_VERSION "%{octave_api}"' liboctave/version.h
|
|
|
+then
|
|
|
+ echo "octave_api variable in spec does not match liboctave/version.h"
|
|
|
+ exit 1
|
|
|
+fi
|
|
|
+
|
|
|
%{__make} %{?_smp_mflags}
|
|
|
|
|
|
|
|
@@ -174,10 +199,29 @@ find %{buildroot} -name "*.oct" | xargs strip
|
|
|
echo "%{_libdir}/octave-%{version}" > \
|
|
|
${RPM_BUILD_ROOT}/etc/ld.so.conf.d/octave-%{_arch}.conf
|
|
|
|
|
|
+# Remove RPM_BUILD_ROOT from ls-R files
|
|
|
+%{__perl} -pi -e "s,%{buildroot},," ${RPM_BUILD_ROOT}%{_libdir}/%{name}/ls-R
|
|
|
+%{__perl} -pi -e "s,%{buildroot},," ${RPM_BUILD_ROOT}%{_datadir}/%{name}/ls-R
|
|
|
+# Make sure ls-R exists
|
|
|
+touch ${RPM_BUILD_ROOT}%{_datadir}/%{name}/ls-R
|
|
|
+
|
|
|
+# Create directories for add-on packages
|
|
|
+HOST_TYPE=`%{buildroot}%{_bindir}/octave-config -p CANONICAL_HOST_TYPE`
|
|
|
+%{__mkdir_p} ${RPM_BUILD_ROOT}%{_libdir}/%{name}/site/oct/%{octave_api}/$HOST_TYPE
|
|
|
+%{__mkdir_p} ${RPM_BUILD_ROOT}%{_libdir}/%{name}/site/oct/$HOST_TYPE
|
|
|
+%{__mkdir_p} ${RPM_BUILD_ROOT}%{_datadir}/%{name}/packages
|
|
|
+%{__mkdir_p} ${RPM_BUILD_ROOT}%{_libdir}/%{name}/packages
|
|
|
+touch ${RPM_BUILD_ROOT}%{_datadir}/%{name}/octave_packages
|
|
|
+
|
|
|
# desktop file
|
|
|
%{__perl} -pi -e s/"Education;Science;Math;"/"Education;Science;"/g \
|
|
|
${RPM_BUILD_ROOT}%{_datadir}/applications/org.octave.Octave.desktop
|
|
|
|
|
|
+# rpm macros
|
|
|
+%{__mkdir_p} ${RPM_BUILD_ROOT}%{macrosdir}
|
|
|
+cp -p %{SOURCE1} ${RPM_BUILD_ROOT}%{macrosdir}
|
|
|
+
|
|
|
+
|
|
|
%check
|
|
|
%{__make} %{?_smp_mflags} check
|
|
|
|
|
@@ -192,9 +236,11 @@ echo "%{_libdir}/octave-%{version}" > \
|
|
|
|
|
|
%files
|
|
|
%defattr(-,root,root)
|
|
|
-%doc AUTHORS BUGS CITATION COPYING ChangeLog NEWS README
|
|
|
+%license COPYING
|
|
|
+%doc AUTHORS BUGS CITATION ChangeLog NEWS README
|
|
|
%doc examples doc/interpreter/octave.pdf doc/refcard
|
|
|
-%config(noreplace) /etc/ld.so.conf.d/
|
|
|
+# FIXME: Create an -emacs package that has the emacs addon
|
|
|
+%config(noreplace) %{_sysconfdir}/ld.so.conf.d/octave-*.conf
|
|
|
%{_bindir}/
|
|
|
%{_libdir}/octave
|
|
|
%{_libdir}/pkgconfig/*.pc
|
|
@@ -204,9 +250,18 @@ echo "%{_libdir}/octave-%{version}" > \
|
|
|
%{_datadir}/metainfo/
|
|
|
%{_datadir}/octave
|
|
|
%{_libexecdir}/octave
|
|
|
+%{macrosdir}/macros.octave
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
+* Sun Nov 03 2019 Toshiaki Ara <ara_t@384.jp> 5.1.0-3
|
|
|
+- Rebuild for suitesparse 5.4.0
|
|
|
+- change using openblas for VineSeed
|
|
|
+- add macros.octave from Fedora
|
|
|
+
|
|
|
+* Sat Aug 31 2019 Toshiaki Ara <ara_t@384.jp> 5.1.0-2
|
|
|
+- rebuild with readline-8.0 and ncurses-6.1
|
|
|
+
|
|
|
* Sun Apr 21 2019 Toshiaki Ara <ara_t@384.jp> 5.1.0-1
|
|
|
- update to 5.1.0
|
|
|
- drop gui/sound option
|