octave-vl.spec 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. # From src/version.h:#define OCTAVE_API_VERSION
  2. %define octave_api api-v32
  3. %define vine4 0
  4. %define version 3.0.2
  5. %define release 1%{?_dist_release}
  6. %define name octave
  7. Summary: GNU Octave -- a high-level language for numerical computations
  8. Summary(ja): 数値計算のための高級言語
  9. Name: %{name}
  10. Version: %{version}
  11. Release: %{release}
  12. License: GPL
  13. Group: Applications/Engineering
  14. Source: ftp://ftp.octave.org/pub/octave/%{name}-%{version}.tar.bz2
  15. URL: http://www.octave.org
  16. BuildRequires: bison flex less tetex lapack-devel blas-devel
  17. BuildRequires: ncurses-devel zlib-devel curl-devel texinfo
  18. BuildRequires: readline-devel glibc-devel fftw3-devel gperf ghostscript
  19. BuildRequires: glpk-devel gnuplot desktop-file-utils
  20. BuildRequires: hdf5-devel qhull-devel suitesparse-devel
  21. %if !%{vine4}
  22. BuildRequires: gcc-gfortran
  23. %else
  24. BuildRequires: gcc-g77
  25. %endif
  26. Requires: gnuplot
  27. Requires(post): /sbin/install-info
  28. Requires(postun): /sbin/ldconfig
  29. Requires(post): /sbin/ldconfig
  30. Requires(preun): /sbin/install-info
  31. Buildroot: %{_tmppath}/%{name}-%{version}-root
  32. Vendor: Project Vine
  33. Distribution: Vine Linux
  34. %description
  35. GNU Octave is a high-level language, primarily intended for numerical
  36. computations. It provides a convenient command line interface for
  37. solving linear and nonlinear problems numerically, and for performing
  38. other numerical experiments using a language that is mostly compatible
  39. with Matlab. It may also be used as a batch-oriented language.
  40. Octave has extensive tools for solving common numerical linear algebra
  41. problems, finding the roots of nonlinear equations, integrating
  42. ordinary functions, manipulating polynomials, and integrating ordinary
  43. differential and differential-algebraic equations. It is easily
  44. extensible and customizable via user-defined functions written in
  45. Octave's own language, or using dynamically loaded modules written in
  46. C++, C, Fortran, or other languages.
  47. #'
  48. %description -l ja
  49. GNU Octave は数値計算用に開発の始められた高級言語です。線形問題や非線形
  50. 問題を数値的に解いたり、その他のMatlab と互換性の高い言語を用いた数値計算
  51. を行うための使いやすいコマンドライン・インタフェースを備えています。
  52. バッチ指向言語としても使うこともできます。Octave は多機能なツールで、
  53. 一般的な線形幾何の問題の数値解や、通常の関数の積分・微分、多項式の操作
  54. 等を行うことができます。Octave の言語でユーザが関数を定義したり、C++,
  55. C, Fortran その他の言語で書いた動的ライブラリを用いて容易に拡張やカスタ
  56. マイズを行うことができます。
  57. %prep
  58. %setup -q
  59. # Check that octave_api is set correctly
  60. if ! grep -q '^#define OCTAVE_API_VERSION "%{octave_api}"' src/version.h
  61. then
  62. echo "octave_api variable in spec does not match src/version.h"
  63. exit 1
  64. fi
  65. %build
  66. %define enable64 no
  67. %if !%{vine4}
  68. %define f77 gfortran
  69. %else
  70. %define f77 g77
  71. %endif
  72. export CPPFLAGS=-I%{_includedir}/glpk
  73. %configure --enable-shared --disable-static --enable-64=%enable64 --with-f77=%{f77} --with-curl
  74. make %{?_smp_mflags} OCTAVE_RELEASE="VinePlus %{version}-%{release}"
  75. #CXXFLAGS="$RPM_OPT_FLAGS"
  76. #export CXXFLAGS
  77. #configure --enable-dl --enable-shared --enable-lite-kernel --enable-picky-flags --disable-rpath --with-g77 --without-mpi
  78. %install
  79. rm -rf $RPM_BUILD_ROOT
  80. make install DESTDIR=$RPM_BUILD_ROOT
  81. rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir
  82. find %{buildroot} -name "*.oct" | xargs strip
  83. # Make library links
  84. mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
  85. echo "%{_libdir}/octave-%{version}" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/octave-%{_arch}.conf
  86. # Remove RPM_BUILD_ROOT from ls-R files
  87. perl -pi -e "s,$RPM_BUILD_ROOT,," $RPM_BUILD_ROOT%{_libexecdir}/%{name}/ls-R
  88. perl -pi -e "s,$RPM_BUILD_ROOT,," $RPM_BUILD_ROOT%{_datadir}/%{name}/ls-R
  89. # Clean doc directory
  90. pushd doc
  91. make distclean
  92. rm -f *.in */*.in */*.cc refcard/*.tex
  93. popd
  94. # Create desktop file
  95. rm $RPM_BUILD_ROOT%{_datadir}/applications/www.octave.org-octave.desktop
  96. desktop-file-install --vendor vine --add-category X-Fedora \
  97. --dir $RPM_BUILD_ROOT%{_datadir}/applications examples/octave.desktop
  98. # Create directories for add-on packages
  99. HOST_TYPE=`$RPM_BUILD_ROOT%{_bindir}/octave-config -p CANONICAL_HOST_TYPE`
  100. mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/%{name}/site/oct/%{octave_api}/$HOST_TYPE
  101. mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/%{name}/site/oct/$HOST_TYPE
  102. %clean
  103. rm -rf $RPM_BUILD_ROOT
  104. %post
  105. /sbin/ldconfig
  106. /sbin/install-info --info-dir=%{_infodir} --section="Programming" \
  107. %{_infodir}/octave.info || :
  108. %preun
  109. if [ "$1" = "0" ]; then
  110. /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/octave.info || :
  111. fi
  112. %postun -p /sbin/ldconfig
  113. %files
  114. %defattr(-,root,root)
  115. %doc COPYING NEWS* PROJECTS README README.Linux README.kpathsea ROADMAP
  116. %doc SENDING-PATCHES THANKS emacs examples doc/interpreter/octave.p*
  117. %doc doc/faq doc/interpreter/HTML doc/refcard
  118. %{_bindir}/*
  119. %config(noreplace) /etc/ld.so.conf.d/*
  120. %{_libdir}/octave-%{version}
  121. %{_includedir}/octave-%{version}
  122. %{_datadir}/applications/*
  123. %{_datadir}/octave
  124. %{_libexecdir}/octave
  125. %{_mandir}/man*/*
  126. %{_infodir}/octave*
  127. #{_menudir}/%{name}
  128. #{_iconsdir}/%{name}.xpm
  129. #{_miconsdir}/%{name}.xpm
  130. #{_liconsdir}/%{name}.xpm
  131. %changelog
  132. * Sat Aug 23 2008 Shu KONNO <owa@bg.wakwak.com> 3.0.2-1vl5
  133. - update to 3.0.2
  134. - applied new versioning policy, spec in utf-8
  135. * Sun Feb 03 2008 NAKAMURA Kenta <kenta@vinelinux.org> 3.0.0-0vl1
  136. - update to 3.0.0
  137. * Sat Aug 18 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.9.13-0vl2
  138. - rebuilt for VineSeed
  139. * Fri Aug 17 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.9.13-0vl1
  140. - update to 2.9.13
  141. - rebuilt with new toolchain and environment
  142. * Sun Apr 20 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.0.17-0vl1
  143. - update to 2.0.17
  144. - rebuild with new toolchains
  145. - add BuildRequires: gcc295, gcc295-c++
  146. * Sun Mar 3 2002 Jun Nishii <jun@vinelinux.org> 2.1.35-0vl1
  147. - ver.up
  148. * Tue Sep 26 2000 Jun Nishii <jun@vinelinux.org> 2.0.16-0vl1
  149. - build for Vine Linux 2.1
  150. * Mon Aug 07 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.0.16-5mdk
  151. - automatically added BuildRequires
  152. * Wed Jul 26 2000 Vincent Saugey <vince@mandrakesoft.com> 2.0.16-4mdk
  153. - Macros, BM, add multiple icons sizes
  154. * Wed Apr 12 2000 Vincent Saugey <vince@mandrakesoft.com> 2.0.16-3mdk
  155. - strip oct file
  156. - add menu entry
  157. * Tue Mar 21 2000 Vincent Saugey <vince@mandrakesoft.com> 2.0.16-2mdk
  158. - corrected for new groups
  159. * Thu Mar 09 2000 Lenny Cartier <lenny@mandrakesoft.com>
  160. - mandrake build
  161. - v2.0.16
  162. * Fri Oct 23 1998 Jeff Johnson <jbj@redhat.com>
  163. - update to 2.0.13.90
  164. * Thu Jul 9 1998 Jeff Johnson <jbj@redhat.com>
  165. - repackage in powertools.
  166. * Thu Jun 11 1998 Andrew Veliath <andrewtv@usa.net>
  167. - Add %attr, build as user.
  168. * Mon Jun 1 1998 Andrew Veliath <andrewtv@usa.net>
  169. - Add BuildRoot, installinfo, require gnuplot, description from
  170. Octave's web page, update to Octave 2.0.13.
  171. - Adapt from existing spec file.
  172. * Tue Dec 2 1997 Otto Hammersmith <otto@redhat.com>
  173. - removed libreadline stuff from the file list
  174. * Mon Nov 24 1997 Otto Hammersmith <otto@redhat.com>
  175. - changed configure command to put things in $RPM_ARCH-rehat-linux,
  176. rather than genereated one... was causing problems between building
  177. on i686 build machine.
  178. * Mon Nov 17 1997 Otto Hammersmith <otto@redhat.com>
  179. - moved buildroot from /tmp to /var/tmp
  180. * Mon Sep 22 1997 Mike Wangsmo <wanger@redhat.com>
  181. - Upgraded to version 2.0.9 and built for glibc system
  182. * Thu May 01 1997 Michael Fulbright <msf@redhat.com>
  183. - Updated to version 2.0.5 and changed to build using a BuildRoot