1 |
eatdirt |
1229198 |
%define octave_api 52 |
2 |
grenoya |
83691 |
|
3 |
mitya |
916873 |
%bcond_without audio |
4 |
|
|
%bcond_without gui |
5 |
|
|
%bcond_without java |
6 |
mitya |
916857 |
|
7 |
grenoya |
83691 |
Name: octave |
8 |
daviddavid |
1328945 |
Epoch: 0 |
9 |
shlomif |
1320352 |
Version: 4.4.1 |
10 |
joequant |
1329220 |
Release: %mkrel 3 |
11 |
grenoya |
83691 |
Summary: High-level language for numerical computations |
12 |
|
|
License: GPLv3+ |
13 |
|
|
Group: Sciences/Mathematics |
14 |
eatdirt |
1229198 |
Source0: http://ftp.gnu.org/gnu/octave/%{name}-%{version}.tar.xz |
15 |
grenoya |
83691 |
Source4: octave-2.1.36-emac.lisp |
16 |
|
|
URL: http://www.octave.org/ |
17 |
|
|
Obsoletes: octave3 < %{epoch}:%{version}-%{release} |
18 |
|
|
Provides: octave3 = %{epoch}:%{version}-%{release} |
19 |
fwang |
131650 |
Provides: octave(api) = api-v%{octave_api} |
20 |
grenoya |
83691 |
Requires: gnuplot |
21 |
anssi |
195002 |
# (Anssi) for makeinfo which is needed for "help foo" command: |
22 |
|
|
Requires: texinfo |
23 |
mjack |
1172270 |
Requires: graphicsmagick |
24 |
grenoya |
83691 |
Requires(post): desktop-file-utils |
25 |
|
|
Requires(postun): desktop-file-utils |
26 |
|
|
Requires(post): rpm-helper |
27 |
eatdirt |
1071703 |
BuildRequires: lzip |
28 |
grenoya |
83691 |
BuildRequires: bison |
29 |
|
|
BuildRequires: blas-devel |
30 |
|
|
BuildRequires: dejagnu |
31 |
|
|
BuildRequires: desktop-file-utils |
32 |
|
|
BuildRequires: emacs |
33 |
|
|
BuildRequires: emacs-bin |
34 |
|
|
BuildRequires: fftw-devel >= 0:3.0.1 |
35 |
|
|
BuildRequires: flex |
36 |
|
|
BuildRequires: gcc-gfortran |
37 |
mitya |
916857 |
BuildRequires: glpk-devel |
38 |
|
|
BuildRequires: gnuplot-nox |
39 |
grenoya |
83691 |
# (Abel) not strictly needed, but play safe |
40 |
|
|
BuildRequires: gperf |
41 |
|
|
BuildRequires: hdf5-devel |
42 |
|
|
BuildRequires: lapack-devel |
43 |
ovitters |
1145408 |
BuildRequires: pkgconfig(ncurses) |
44 |
grenoya |
83691 |
BuildRequires: readline-devel |
45 |
|
|
BuildRequires: texinfo |
46 |
eatdirt |
1098827 |
BuildRequires: texinfo-tex |
47 |
grenoya |
85774 |
BuildRequires: texlive |
48 |
ovitters |
1145408 |
BuildRequires: pkgconfig(libpcre) |
49 |
|
|
BuildRequires: pkgconfig(libcurl) |
50 |
grenoya |
83691 |
# (Lev) needed to support sparse matrix functionality |
51 |
mitya |
916857 |
BuildRequires: suitesparse-devel |
52 |
grenoya |
83691 |
# (Lev) other useful libraries |
53 |
mitya |
916857 |
BuildRequires: qhull-devel |
54 |
|
|
BuildRequires: qrupdate-devel |
55 |
grenoya |
83691 |
# (Lev) for new experimental plotting |
56 |
|
|
BuildRequires: fltk-devel |
57 |
daviddavid |
1328945 |
BuildRequires: pkgconfig(gl) |
58 |
ovitters |
1145408 |
BuildRequires: pkgconfig(glu) |
59 |
mitya |
228709 |
# (Mitya) for eigs and svds to work |
60 |
ovitters |
1145408 |
BuildRequires: pkgconfig(arpack) |
61 |
grenoya |
83691 |
# to make imread more functional |
62 |
ovitters |
1145408 |
BuildRequires: pkgconfig(GraphicsMagick) |
63 |
mitya |
916857 |
# (Mitya) GUI |
64 |
mitya |
916873 |
%if %{with gui} |
65 |
mitya |
916857 |
BuildRequires: pkgconfig(QtCore) |
66 |
|
|
BuildRequires: pkgconfig(QtGui) |
67 |
|
|
BuildRequires: pkgconfig(QtNetwork) |
68 |
|
|
BuildRequires: pkgconfig(QtOpenGL) |
69 |
daviddavid |
1220178 |
BuildRequires: qscintilla-qt4-devel |
70 |
mitya |
916873 |
%endif |
71 |
mitya |
916857 |
# (Mitya) Java interface |
72 |
mitya |
916873 |
%if %{with java} |
73 |
mitya |
916857 |
BuildRequires: java-devel |
74 |
mitya |
916873 |
%endif |
75 |
mitya |
916857 |
# (Mitya) rendering stuff |
76 |
|
|
BuildRequires: gl2ps-devel |
77 |
mitya |
916858 |
BuildRequires: pkgconfig(osmesa) |
78 |
mitya |
916857 |
# (Mitya) Audio processing |
79 |
mitya |
916873 |
%if %{with audio} |
80 |
daviddavid |
1328945 |
BuildRequires: pkgconfig(portaudio-2.0) |
81 |
ovitters |
1145408 |
BuildRequires: pkgconfig(sndfile) |
82 |
mitya |
916857 |
%endif |
83 |
eatdirt |
1098827 |
# (eatdirt) fix some warnings for icon generation |
84 |
|
|
BuildRequires: icoutils |
85 |
|
|
BuildRequires: librsvg |
86 |
grenoya |
83691 |
|
87 |
|
|
%description |
88 |
|
|
GNU Octave is a high-level language, primarily intended for numerical |
89 |
|
|
computations. It provides a convenient command line interface for |
90 |
|
|
solving linear and nonlinear problems numerically, and for performing |
91 |
|
|
other numerical experiments using a language that is mostly compatible |
92 |
|
|
with Matlab. It may also be used as a batch-oriented language. |
93 |
|
|
|
94 |
|
|
Octave has extensive tools for solving common numerical linear algebra |
95 |
|
|
problems, finding the roots of nonlinear equations, integrating |
96 |
|
|
ordinary functions, manipulating polynomials, and integrating ordinary |
97 |
|
|
differential and differential-algebraic equations. It is easily |
98 |
|
|
extensible and customizable via user-defined functions written in |
99 |
|
|
Octave's own language, or using dynamically loaded modules written in |
100 |
|
|
C++, C, Fortran, or other languages. |
101 |
|
|
|
102 |
|
|
%package devel |
103 |
|
|
Summary: Development headers and files for Octave |
104 |
|
|
Group: Development/C |
105 |
|
|
Obsoletes: octave3-devel < %{epoch}:%{version}-%{release} |
106 |
|
|
Provides: octave3-devel = %{epoch}:%{version}-%{release} |
107 |
|
|
Requires: %{name} = %{epoch}:%{version}-%{release} |
108 |
|
|
Requires: blas-devel |
109 |
|
|
Requires: fftw-devel |
110 |
|
|
Requires: gcc-c++ |
111 |
|
|
Requires: gcc-gfortran |
112 |
|
|
Requires: hdf5-devel |
113 |
|
|
Requires: lapack-devel |
114 |
|
|
Requires: readline-devel |
115 |
|
|
Requires: zlib-devel |
116 |
grenoya |
197868 |
Requires: gnuplot-nox |
117 |
|
|
Requires: pstoedit |
118 |
|
|
Requires: transfig |
119 |
mjack |
1175622 |
Provides: mkoctfile = %{epoch}:%{version}-%{release} |
120 |
grenoya |
83691 |
|
121 |
|
|
%description devel |
122 |
|
|
The octave-devel package contains files needed for developing |
123 |
|
|
applications which use GNU Octave. |
124 |
mjack |
1172270 |
This package is necessary if you intend to install external packages |
125 |
|
|
(for example, through Octave forge) in Octave. |
126 |
grenoya |
83691 |
|
127 |
|
|
%package doc |
128 |
|
|
Summary: Documentation for Octave, a numerical computational language |
129 |
|
|
Group: Sciences/Mathematics |
130 |
mitya |
916857 |
BuildArch: noarch |
131 |
grenoya |
83691 |
|
132 |
|
|
%description doc |
133 |
|
|
GNU Octave is a high-level language, primarily intended for numerical |
134 |
|
|
computations. It provides a convenient command line interface for |
135 |
|
|
solving linear and nonlinear problems numerically, and for performing |
136 |
|
|
other numerical experiments using a language that is mostly compatible |
137 |
|
|
with Matlab. It may also be used as a batch-oriented language. |
138 |
|
|
|
139 |
|
|
This package contains documentation of Octave in various formats. |
140 |
|
|
|
141 |
|
|
%prep |
142 |
|
|
%setup -q |
143 |
|
|
|
144 |
eatdirt |
1071703 |
#this command just returns the API number hardcoded in configure.ac |
145 |
|
|
#and ensures that it matches the one defined above |
146 |
|
|
OCTAVE_API=`%{__sed} -nr 's/^OCTAVE_API_VERSION="api-v([[:digit:]]+)"/\1/p' configure.ac` |
147 |
grenoya |
83691 |
test "x${OCTAVE_API}" = x%{octave_api} || exit 1 |
148 |
|
|
%{__cp} -a %{SOURCE4} octave.el |
149 |
|
|
|
150 |
|
|
%build |
151 |
|
|
%define enable64 no |
152 |
|
|
export CPPFLAGS="%{optflags} -DH5_USE_16_API" |
153 |
mitya |
916857 |
export GNUPLOT=%{_bindir}/gnuplot-nox |
154 |
grenoya |
671908 |
%{configure2_5x} --enable-dl \ |
155 |
|
|
--enable-shared \ |
156 |
|
|
--disable-static \ |
157 |
|
|
--enable-64=%{enable64} \ |
158 |
mitya |
916857 |
--with-amd="-lamd -lsuitesparseconfig" \ |
159 |
|
|
--with-camd="-lcamd -lsuitesparseconfig" \ |
160 |
|
|
--with-colamd="-lcolamd -lsuitesparseconfig" \ |
161 |
|
|
--with-ccolamd="-lccolamd -lsuitesparseconfig" |
162 |
grenoya |
671908 |
|
163 |
mitya |
916857 |
# (Mitya) Because of gnuplot-nox used for build, Octave will set it as default gnuplot binary. |
164 |
|
|
# Revert it to original gnuplot. |
165 |
eatdirt |
1071703 |
#{__sed} -i 's/gnuplot-nox/gnuplot/' scripts/plot/util/gnuplot_binary.m |
166 |
grenoya |
671908 |
|
167 |
daviddavid |
1220178 |
%{make_build} OCTAVE_RELEASE="%{distribution} %{version}-%{release}" LDFLAGS="-lgfortran -llapack -lGL -lGLU -lpthread" |
168 |
grenoya |
83691 |
|
169 |
|
|
# emacs mode |
170 |
|
|
%{_bindir}/emacs -batch -q -no-site-file -f batch-byte-compile %{name}.el |
171 |
|
|
|
172 |
|
|
%check |
173 |
grenoya |
197868 |
#%%{make} check |
174 |
grenoya |
83691 |
|
175 |
|
|
%install |
176 |
shlomif |
1003004 |
%{make_install} |
177 |
grenoya |
83691 |
|
178 |
|
|
# Make library links |
179 |
|
|
%{__mkdir_p} %{buildroot}/etc/ld.so.conf.d |
180 |
|
|
/bin/echo "%{_libdir}/octave-%{version}" > %{buildroot}/etc/ld.so.conf.d/octave-%{_arch}.conf |
181 |
|
|
|
182 |
|
|
# Remove RPM_BUILD_ROOT from ls-R files |
183 |
|
|
%{__perl} -pi -e "s,%{buildroot},," %{buildroot}%{_libexecdir}/octave/ls-R |
184 |
|
|
%{__perl} -pi -e "s,%{buildroot},," %{buildroot}%{_datadir}/octave/ls-R |
185 |
|
|
|
186 |
|
|
%{_bindir}/find %{buildroot} -name "*.oct" -print0 | %{_bindir}/xargs -t -0 -r strip --strip-unneeded |
187 |
|
|
|
188 |
|
|
%{__mkdir_p} %{buildroot}%{_sysconfdir}/emacs/site-start.d |
189 |
|
|
%{__cp} -a %{name}.elc %{buildroot}%{_sysconfdir}/emacs/site-start.d/%{name}.elc |
190 |
|
|
%{__cp} -a %{name}.el %{buildroot}%{_sysconfdir}/emacs/site-start.d/%{name}.el |
191 |
|
|
|
192 |
|
|
# prepare documentation |
193 |
|
|
%{__rm} -rf package-doc |
194 |
|
|
%{__mkdir_p} package-doc |
195 |
|
|
|
196 |
grenoya |
138167 |
%{__mkdir_p} package-doc/interpreter/octave.html/ |
197 |
|
|
/bin/ln doc/interpreter/octave.html/*.html package-doc/interpreter/octave.html/ |
198 |
grenoya |
83691 |
|
199 |
grenoya |
138167 |
%{__mkdir_p} package-doc/liboctave/liboctave.html/ |
200 |
|
|
/bin/ln doc/liboctave/liboctave.html/*.html package-doc/liboctave/liboctave.html/ |
201 |
grenoya |
83691 |
|
202 |
|
|
%{__mkdir_p} package-doc/examples |
203 |
shlomif |
900084 |
%{__cp} -a examples/[[:lower:]]* package-doc/examples/ |
204 |
grenoya |
83691 |
|
205 |
|
|
%{__cp} -a doc/liboctave/liboctave.info %{buildroot}%{_infodir}/ |
206 |
|
|
|
207 |
|
|
# Create desktop file |
208 |
eatdirt |
1229198 |
%{__mv} %{buildroot}%{_datadir}/applications/org.octave.Octave.desktop \ |
209 |
grenoya |
138167 |
%{buildroot}%{_datadir}/applications/octave.desktop |
210 |
grenoya |
83691 |
%{_bindir}/desktop-file-install --add-category Education --remove-category Development \ |
211 |
grenoya |
138167 |
--dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/octave.desktop |
212 |
grenoya |
83691 |
|
213 |
|
|
# Create directories for add-on packages |
214 |
|
|
HOST_TYPE=`%{buildroot}%{_bindir}/octave-config -p CANONICAL_HOST_TYPE` |
215 |
|
|
%{__mkdir_p} %{buildroot}%{_libexecdir}/octave/site/oct/%{octave_api}/$HOST_TYPE |
216 |
|
|
%{__mkdir_p} %{buildroot}%{_libexecdir}/octave/site/oct/$HOST_TYPE |
217 |
|
|
%{__mkdir_p} %{buildroot}%{_datadir}/octave/packages |
218 |
|
|
/bin/touch %{buildroot}%{_datadir}/octave/octave_packages |
219 |
|
|
|
220 |
eatdirt |
1229198 |
#multiarch_includes %{buildroot}%{_includedir}/octave-%{version}/octave/config.h |
221 |
|
|
%multiarch_includes %{buildroot}%{_includedir}/octave-%{version}/octave/*.h |
222 |
grenoya |
83691 |
|
223 |
|
|
%post |
224 |
|
|
%create_ghostfile %{_datadir}/octave/octave_packages root root 0664 |
225 |
|
|
|
226 |
|
|
%files |
227 |
|
|
%defattr(0644,root,root,0755) |
228 |
shlomif |
900084 |
%doc NEWS* README |
229 |
grenoya |
138167 |
%doc examples |
230 |
grenoya |
83691 |
%defattr(-,root,root,0755) |
231 |
|
|
%{_bindir}/octave* |
232 |
|
|
%config(noreplace) /etc/ld.so.conf.d/* |
233 |
|
|
%{_libdir}/octave* |
234 |
|
|
%{_datadir}/octave |
235 |
eatdirt |
1229198 |
%{_datadir}/metainfo/org.octave.Octave.appdata.xml |
236 |
shlomif |
900084 |
%{_datadir}/icons/*/*/apps/octave.png |
237 |
|
|
%{_datadir}/icons/*/*/apps/octave.svg |
238 |
grenoya |
83691 |
%exclude %{_datadir}/octave/octave_packages |
239 |
|
|
%ghost %{_datadir}/octave/octave_packages |
240 |
|
|
%if "%{_libdir}" != "%{_libexecdir}" |
241 |
|
|
%{_libexecdir}/octave |
242 |
|
|
%endif |
243 |
|
|
%{_mandir}/man*/octave* |
244 |
|
|
%{_infodir}/octave.info* |
245 |
|
|
%{_datadir}/applications/* |
246 |
|
|
%config(noreplace) %_sysconfdir/emacs/site-start.d/octave.el* |
247 |
|
|
|
248 |
|
|
%files devel |
249 |
|
|
%defattr(0644,root,root,0755) |
250 |
|
|
#%%doc doc/liboctave |
251 |
|
|
%defattr(-,root,root) |
252 |
|
|
%{_bindir}/mkoctfile* |
253 |
|
|
%{_includedir}/octave-%{version} |
254 |
|
|
%dir %{multiarch_includedir}/octave-* |
255 |
eatdirt |
1229198 |
%multiarch %{multiarch_includedir}/octave-*/octave/*.h |
256 |
|
|
%multiarch %{multiarch_includedir}/octave-*/octave/*.cc |
257 |
grenoya |
83691 |
%{_mandir}/man*/mkoctfile* |
258 |
|
|
|
259 |
|
|
%files doc |
260 |
|
|
%defattr(0644,root,root,0755) |
261 |
grenoya |
180467 |
%doc doc/refcard/*.pdf |
262 |
|
|
%doc doc/interpreter/*.pdf |
263 |
|
|
%doc doc/liboctave/*.pdf |
264 |
grenoya |
83691 |
%doc package-doc/* |
265 |
|
|
%{_infodir}/liboctave.* |