perl-math.spec 10 KB

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