perl-math.spec 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. ##
  2. ## perl-math.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2005 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2005 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.7
  26. %define V_math_gmp 2.04
  27. %define V_math_mpfr 1.06
  28. %define V_math_bigint 1.77
  29. %define V_math_bigint_gmp 1.18
  30. %define V_math_bigint_constant 1.06
  31. %define V_math_bigint_fastcalc 0.10
  32. %define V_math_symbolic 0.160
  33. %define V_math_algebra_symbols 1.21
  34. %define V_math_combinatorics 0.05
  35. %define V_math_calc_units 1.03
  36. %define V_math_basecnv 1.2.54HK3pB
  37. # package information
  38. Name: perl-math
  39. Summary: Perl Mathematics Modules
  40. URL: http://www.cpan.org/
  41. Vendor: Perl Community
  42. Packager: OpenPKG
  43. Distribution: OpenPKG
  44. Class: BASE
  45. Group: Language
  46. License: GPL/Artistic
  47. Version: %{V_perl}
  48. Release: 20050819
  49. # package options
  50. %option with_gmp no
  51. %option with_mpfr no
  52. # list of sources
  53. Source0: http://www.cpan.org/modules/by-module/Math/Math-GMP-%{V_math_gmp}.tar.gz
  54. Source1: http://www.cpan.org/modules/by-module/Math/Math-MPFR-%{V_math_mpfr}.tar.gz
  55. Source2: http://www.cpan.org/modules/by-module/Math/Math-BigInt-%{V_math_bigint}.tar.gz
  56. Source3: http://www.cpan.org/modules/by-module/Math/Math-BigInt-GMP-%{V_math_bigint_gmp}.tar.gz
  57. Source4: http://www.cpan.org/modules/by-module/Math/Math-BigInt-Constant-%{V_math_bigint_constant}.tar.gz
  58. Source5: http://www.cpan.org/modules/by-module/Math/Math-BigInt-FastCalc-%{V_math_bigint_fastcalc}.tar.gz
  59. Source6: http://www.cpan.org/modules/by-module/Math/Math-Symbolic-%{V_math_symbolic}.tar.gz
  60. Source7: http://www.cpan.org/modules/by-module/Math/Math-Algebra-Symbols-%{V_math_algebra_symbols}.tar.gz
  61. Source8: http://www.cpan.org/modules/by-module/Math/Math-Combinatorics-%{V_math_combinatorics}.tar.gz
  62. Source9: http://www.cpan.org/modules/by-module/Math/Math-Calc-Units-%{V_math_calc_units}.tar.gz
  63. Source10: http://www.cpan.org/modules/by-module/Math/Math-BaseCnv-%{V_math_basecnv}.tgz
  64. # build information
  65. Prefix: %{l_prefix}
  66. BuildRoot: %{l_buildroot}
  67. BuildPreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126
  68. PreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}
  69. BuildPreReq: perl-util
  70. PreReq: perl-util
  71. %if "%{with_gmp}" == "yes"
  72. BuildPreReq: gmp
  73. PreReq: gmp
  74. %endif
  75. %if "%{with_mpfr}" == "yes"
  76. BuildPreReq: gmp, mpfr
  77. PreReq: gmp, mpfr
  78. %endif
  79. AutoReq: no
  80. AutoReqProv: no
  81. %description
  82. Various modules for mathematics with perl
  83. - Math::GMP (%{V_math_gmp}) [%{with_gmp}]
  84. - Math::MPFR (%{V_math_mpfr}) [%{with_mpfr}]
  85. - Math::BigInt (%{V_math_bigint})
  86. - Math::BigInt::GMP (%{V_math_bigint_gmp}) [%{with_gmp}]
  87. - Math::BigInt::Constant (%{V_math_bigint_constant})
  88. - Math::BigInt::FastCalc (%{V_math_bigint_fastcalc})
  89. - Math::Symbolic (%{V_math_symbolic})
  90. - Math::Algebra::Symbols (%{V_math_algebra_symbols})
  91. - Math::Combinatorics (%{V_math_combinatorics})
  92. - Math::Calc::Units (%{V_math_calc_units})
  93. - Math::BaseCnv (%{V_math_basecnv})
  94. %track
  95. prog perl-math:Math-GMP = {
  96. version = %{V_math_gmp}
  97. url = http://www.cpan.org/modules/by-module/Math/
  98. regex = Math-GMP-(__VER__)\.tar\.gz
  99. }
  100. prog perl-math:Math-MPFR = {
  101. version = %{V_math_mpfr}
  102. url = http://www.cpan.org/modules/by-module/Math/
  103. regex = Math-MPFR-(__VER__)\.tar\.gz
  104. }
  105. prog perl-math:Math-BigInt = {
  106. version = %{V_math_bigint}
  107. url = http://www.cpan.org/modules/by-module/Math/
  108. regex = Math-BigInt-(__VER__)\.tar\.gz
  109. }
  110. prog perl-math:Math-BigInt-GMP = {
  111. version = %{V_math_bigint_gmp}
  112. url = http://www.cpan.org/modules/by-module/Math/
  113. regex = Math-BigInt-GMP-(__VER__)\.tar\.gz
  114. }
  115. prog perl-math:Math-BigInt-Constant = {
  116. version = %{V_math_bigint_constant}
  117. url = http://www.cpan.org/modules/by-module/Math/
  118. regex = Math-BigInt-Constant-(__VER__)\.tar\.gz
  119. }
  120. prog perl-math:Math-BigInt-FastCalc = {
  121. version = %{V_math_bigint_fastcalc}
  122. url = http://www.cpan.org/modules/by-module/Math/
  123. regex = Math-BigInt-FastCalc-(__VER__)\.tar\.gz
  124. }
  125. prog perl-math:Math-Symbolic = {
  126. version = %{V_math_symbolic}
  127. url = http://www.cpan.org/modules/by-module/Math/
  128. regex = Math-Symbolic-(__VER__)\.tar\.gz
  129. }
  130. prog perl-math:Math-Algebra-Symbols = {
  131. version = %{V_math_algebra_symbols}
  132. url = http://www.cpan.org/modules/by-module/Math/
  133. regex = Math-Algebra-Symbols-(__VER__)\.tar\.gz
  134. }
  135. prog perl-math:Math-Combinatorics = {
  136. version = %{V_math_combinatorics}
  137. url = http://www.cpan.org/modules/by-module/Math/
  138. regex = Math-Combinatorics-(__VER__)\.tar\.gz
  139. }
  140. prog perl-math:Math-Calc-Units = {
  141. version = %{V_math_calc_units}
  142. url = http://www.cpan.org/modules/by-module/Math/
  143. regex = Math-Calc-Units-(__VER__)\.tar\.gz
  144. }
  145. prog perl-math:Math-BaseCnv = {
  146. version = %{V_math_basecnv}
  147. url = http://www.cpan.org/modules/by-module/Math/
  148. regex = Math-BaseCnv-(__VER__[^.]*)\.tgz
  149. }
  150. %prep
  151. %setup -q -c
  152. %setup -q -T -D -a 1
  153. %setup -q -T -D -a 2
  154. %setup -q -T -D -a 3
  155. %setup -q -T -D -a 4
  156. %setup -q -T -D -a 5
  157. %setup -q -T -D -a 6
  158. %setup -q -T -D -a 7
  159. %setup -q -T -D -a 8
  160. %setup -q -T -D -a 9
  161. %setup -q -T -D -a 10
  162. %build
  163. %install
  164. rm -rf $RPM_BUILD_ROOT
  165. %{l_prefix}/bin/perl-openpkg prepare
  166. %if "%{with_gmp}" == "yes"
  167. %{l_prefix}/bin/perl-openpkg -d %{SOURCE0} \
  168. -A 'INC="%{l_cppflags}"' \
  169. -A 'LIBS="%{l_ldflags} -lgmp"' \
  170. configure build install
  171. %endif
  172. %if "%{with_mpfr}" == "yes"
  173. %{l_prefix}/bin/perl-openpkg -d %{SOURCE1} \
  174. -A 'INC="%{l_cppflags}"' \
  175. -A 'LIBS="%{l_ldflags} -lmpfr -lgmp"' \
  176. configure build install
  177. %endif
  178. %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install
  179. %if "%{with_gmp}" == "yes"
  180. %{l_prefix}/bin/perl-openpkg -d %{SOURCE3} \
  181. -A 'INC="%{l_cppflags}"' \
  182. -A 'LIBS="%{l_ldflags} -lgmp"' \
  183. configure build install
  184. %endif
  185. %{l_prefix}/bin/perl-openpkg -d %{SOURCE4} configure build install
  186. %{l_prefix}/bin/perl-openpkg -d %{SOURCE5} configure build install
  187. %{l_prefix}/bin/perl-openpkg -d %{SOURCE6} configure build install
  188. %{l_prefix}/bin/perl-openpkg -d %{SOURCE7} configure build install
  189. %{l_prefix}/bin/perl-openpkg -d %{SOURCE8} configure build install
  190. %{l_prefix}/bin/perl-openpkg -d %{SOURCE9} configure build install
  191. %{l_prefix}/bin/perl-openpkg -d %{SOURCE10} configure build install
  192. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  193. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
  194. %files -f files
  195. %clean
  196. rm -rf $RPM_BUILD_ROOT