perl-math.spec 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. ##
  2. ## perl-math.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # versions of individual parts
  25. %define V_perl 5.8.8
  26. %define V_math_gmp 2.04
  27. %define V_math_mpfr 1.11
  28. %define V_math_bigint 1.79
  29. %define V_math_bigint_gmp 1.19
  30. %define V_math_bigint_constant 1.07
  31. %define V_math_bigint_fastcalc 0.11
  32. %define V_math_symbolic 0.507
  33. %define V_math_algebra_symbols 1.21
  34. %define V_math_combinatorics 0.09
  35. %define V_math_calc_units 1.06
  36. %define V_math_basecnv 1.2.59M7mRX
  37. %define V_math_interpolate 1.05
  38. %define V_math_derivative 0.01
  39. %define V_math_spline 0.01
  40. %define V_math_round 0.06
  41. # package information
  42. Name: perl-math
  43. Summary: Perl Mathematics Modules
  44. URL: http://www.cpan.org/
  45. Vendor: Perl Community
  46. Packager: OpenPKG Foundation e.V.
  47. Distribution: OpenPKG Community
  48. Class: BASE
  49. Group: Perl
  50. License: GPL/Artistic
  51. Version: %{V_perl}
  52. Release: 20070224
  53. # package options
  54. %option with_gmp no
  55. %option with_mpfr no
  56. # list of sources
  57. Source0: http://www.cpan.org/modules/by-module/Math/Math-GMP-%{V_math_gmp}.tar.gz
  58. Source1: http://www.cpan.org/modules/by-module/Math/Math-MPFR-%{V_math_mpfr}.tar.gz
  59. Source2: http://www.cpan.org/modules/by-module/Math/Math-BigInt-%{V_math_bigint}.tar.gz
  60. Source3: http://www.cpan.org/modules/by-module/Math/Math-BigInt-GMP-%{V_math_bigint_gmp}.tar.gz
  61. Source4: http://www.cpan.org/modules/by-module/Math/Math-BigInt-Constant-%{V_math_bigint_constant}.tar.gz
  62. Source5: http://www.cpan.org/modules/by-module/Math/Math-BigInt-FastCalc-%{V_math_bigint_fastcalc}.tar.gz
  63. Source6: http://www.cpan.org/modules/by-module/Math/Math-Symbolic-%{V_math_symbolic}.tar.gz
  64. Source7: http://www.cpan.org/modules/by-module/Math/Math-Algebra-Symbols-%{V_math_algebra_symbols}.tar.gz
  65. Source8: http://www.cpan.org/modules/by-module/Math/Math-Combinatorics-%{V_math_combinatorics}.tar.gz
  66. Source9: http://www.cpan.org/modules/by-module/Math/Math-Calc-Units-%{V_math_calc_units}.tar.gz
  67. Source10: http://www.cpan.org/modules/by-module/Math/Math-BaseCnv-%{V_math_basecnv}.tgz
  68. Source11: http://www.cpan.org/modules/by-module/Math/Math-Interpolate-%{V_math_interpolate}.tar.gz
  69. Source12: http://www.cpan.org/modules/by-module/Math/Math-Derivative-%{V_math_derivative}.tar.gz
  70. Source13: http://www.cpan.org/modules/by-module/Math/Math-Spline-%{V_math_spline}.tar.gz
  71. Source14: http://www.cpan.org/modules/by-module/Math/Math-Round-%{V_math_round}.tar.gz
  72. Patch0: perl-math.patch
  73. # build information
  74. Prefix: %{l_prefix}
  75. BuildRoot: %{l_buildroot}
  76. BuildPreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126
  77. PreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}
  78. BuildPreReq: perl-util, perl-parse
  79. PreReq: perl-util, perl-parse
  80. %if "%{with_gmp}" == "yes"
  81. BuildPreReq: gmp
  82. PreReq: gmp
  83. %endif
  84. %if "%{with_mpfr}" == "yes"
  85. BuildPreReq: gmp, mpfr
  86. PreReq: gmp, mpfr
  87. %endif
  88. AutoReq: no
  89. AutoReqProv: no
  90. %description
  91. Various modules for mathematics with perl
  92. - Math::GMP (%{V_math_gmp}) [%{with_gmp}]
  93. - Math::MPFR (%{V_math_mpfr}) [%{with_mpfr}]
  94. - Math::BigInt (%{V_math_bigint})
  95. - Math::BigInt::GMP (%{V_math_bigint_gmp}) [%{with_gmp}]
  96. - Math::BigInt::Constant (%{V_math_bigint_constant})
  97. - Math::BigInt::FastCalc (%{V_math_bigint_fastcalc})
  98. - Math::Symbolic (%{V_math_symbolic})
  99. - Math::Algebra::Symbols (%{V_math_algebra_symbols})
  100. - Math::Combinatorics (%{V_math_combinatorics})
  101. - Math::Calc::Units (%{V_math_calc_units})
  102. - Math::BaseCnv (%{V_math_basecnv})
  103. - Math::Derivative (%{V_math_derivative})
  104. - Math::Interpolate (%{V_math_interpolate})
  105. - Math::Spline (%{V_math_spline})
  106. - Math::Round (%{V_math_round})
  107. %track
  108. prog perl-math:Math-GMP = {
  109. version = %{V_math_gmp}
  110. url = http://www.cpan.org/modules/by-module/Math/
  111. regex = Math-GMP-(__VER__)\.tar\.gz
  112. }
  113. prog perl-math:Math-MPFR = {
  114. version = %{V_math_mpfr}
  115. url = http://www.cpan.org/modules/by-module/Math/
  116. regex = Math-MPFR-(__VER__)\.tar\.gz
  117. }
  118. prog perl-math:Math-BigInt = {
  119. version = %{V_math_bigint}
  120. url = http://www.cpan.org/modules/by-module/Math/
  121. regex = Math-BigInt-(__VER__)\.tar\.gz
  122. }
  123. prog perl-math:Math-BigInt-GMP = {
  124. version = %{V_math_bigint_gmp}
  125. url = http://www.cpan.org/modules/by-module/Math/
  126. regex = Math-BigInt-GMP-(__VER__)\.tar\.gz
  127. }
  128. prog perl-math:Math-BigInt-Constant = {
  129. version = %{V_math_bigint_constant}
  130. url = http://www.cpan.org/modules/by-module/Math/
  131. regex = Math-BigInt-Constant-(__VER__)\.tar\.gz
  132. }
  133. prog perl-math:Math-BigInt-FastCalc = {
  134. version = %{V_math_bigint_fastcalc}
  135. url = http://www.cpan.org/modules/by-module/Math/
  136. regex = Math-BigInt-FastCalc-(__VER__)\.tar\.gz
  137. }
  138. prog perl-math:Math-Symbolic = {
  139. version = %{V_math_symbolic}
  140. url = http://www.cpan.org/modules/by-module/Math/
  141. regex = Math-Symbolic-(__VER__)\.tar\.gz
  142. }
  143. prog perl-math:Math-Algebra-Symbols = {
  144. version = %{V_math_algebra_symbols}
  145. url = http://www.cpan.org/modules/by-module/Math/
  146. regex = Math-Algebra-Symbols-(__VER__)\.tar\.gz
  147. }
  148. prog perl-math:Math-Combinatorics = {
  149. version = %{V_math_combinatorics}
  150. url = http://www.cpan.org/modules/by-module/Math/
  151. regex = Math-Combinatorics-(__VER__)\.tar\.gz
  152. }
  153. prog perl-math:Math-Calc-Units = {
  154. version = %{V_math_calc_units}
  155. url = http://www.cpan.org/modules/by-module/Math/
  156. regex = Math-Calc-Units-(__VER__)\.tar\.gz
  157. }
  158. prog perl-math:Math-BaseCnv = {
  159. version = %{V_math_basecnv}
  160. url = http://www.cpan.org/modules/by-module/Math/
  161. regex = Math-BaseCnv-(__VER__[^.]*)\.tgz
  162. }
  163. prog perl-math:Math-Interpolate = {
  164. version = %{V_math_interpolate}
  165. url = http://www.cpan.org/modules/by-module/Math/
  166. regex = Math-Interpolate-(__VER__)\.tar\.gz
  167. }
  168. prog perl-math:Math-Derivative = {
  169. version = %{V_math_derivative}
  170. url = http://www.cpan.org/modules/by-module/Math/
  171. regex = Math-Derivative-(__VER__)\.tar\.gz
  172. }
  173. prog perl-math:Math-Spline = {
  174. version = %{V_math_spline}
  175. url = http://www.cpan.org/modules/by-module/Math/
  176. regex = Math-Spline-(__VER__)\.tar\.gz
  177. }
  178. prog perl-math:Math-Round = {
  179. version = %{V_math_round}
  180. url = http://www.cpan.org/modules/by-module/Math/
  181. regex = Math-Round-(__VER__)\.tar\.gz
  182. }
  183. %prep
  184. %setup -q -c
  185. %setup -q -T -D -a 1
  186. %setup -q -T -D -a 2
  187. %setup -q -T -D -a 3
  188. %setup -q -T -D -a 4
  189. %setup -q -T -D -a 5
  190. %setup -q -T -D -a 6
  191. %setup -q -T -D -a 7
  192. %setup -q -T -D -a 8
  193. %setup -q -T -D -a 9
  194. %setup -q -T -D -a 10
  195. %setup -q -T -D -a 11
  196. %setup -q -T -D -a 12
  197. %setup -q -T -D -a 13
  198. %setup -q -T -D -a 14
  199. %patch -p0
  200. %build
  201. %install
  202. rm -rf $RPM_BUILD_ROOT
  203. %{l_prefix}/bin/perl-openpkg prepare
  204. %if "%{with_gmp}" == "yes"
  205. %{l_prefix}/bin/perl-openpkg -d %{SOURCE0} \
  206. -A 'INC="%{l_cppflags}"' \
  207. -A 'LIBS="%{l_ldflags} -lgmp"' \
  208. configure build install
  209. %endif
  210. %if "%{with_mpfr}" == "yes"
  211. %{l_prefix}/bin/perl-openpkg -d %{SOURCE1} \
  212. -A 'INC="%{l_cppflags}"' \
  213. -A 'LIBS="%{l_ldflags} -lmpfr -lgmp"' \
  214. configure build install
  215. %endif
  216. %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install
  217. %if "%{with_gmp}" == "yes"
  218. %{l_prefix}/bin/perl-openpkg -d %{SOURCE3} \
  219. -A 'INC="%{l_cppflags}"' \
  220. -A 'LIBS="%{l_ldflags} -lgmp"' \
  221. configure build install
  222. %endif
  223. %{l_prefix}/bin/perl-openpkg -d %{SOURCE4} configure build install
  224. %{l_prefix}/bin/perl-openpkg -d %{SOURCE5} configure build install
  225. %{l_prefix}/bin/perl-openpkg -d %{SOURCE6} configure build install
  226. %{l_prefix}/bin/perl-openpkg -d %{SOURCE7} configure build install
  227. %{l_prefix}/bin/perl-openpkg -d %{SOURCE8} configure build install
  228. %{l_prefix}/bin/perl-openpkg -d %{SOURCE9} configure build install
  229. %{l_prefix}/bin/perl-openpkg -d %{SOURCE10} configure build install
  230. %{l_prefix}/bin/perl-openpkg -d %{SOURCE11} configure build install
  231. %{l_prefix}/bin/perl-openpkg -d %{SOURCE12} configure build install
  232. %{l_prefix}/bin/perl-openpkg -d %{SOURCE13} configure build install
  233. %{l_prefix}/bin/perl-openpkg -d %{SOURCE14} configure build install
  234. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  235. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
  236. %files -f files
  237. %clean
  238. rm -rf $RPM_BUILD_ROOT