pari.spec 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. ##
  2. ## pari.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package version
  26. %define V_major 2.1
  27. %define V_minor 6
  28. # package information
  29. Name: pari
  30. Summary: GP/PARI number-theory library
  31. URL: http://pari.math.u-bordeaux.fr/
  32. Vendor: Henri Cohen et al.
  33. Packager: The OpenPKG Project
  34. Distribution: OpenPKG
  35. Class: PLUS
  36. Group: Algorithm
  37. License: GPL
  38. Version: %{V_major}.%{V_minor}
  39. Release: 20041126
  40. # list of sources
  41. Source0: http://pari.math.u-bordeaux.fr/pub/pari/unix/pari-%{version}.tgz
  42. # build information
  43. Prefix: %{l_prefix}
  44. BuildRoot: %{l_buildroot}
  45. BuildPreReq: OpenPKG, openpkg >= 20040130, make, gcc
  46. PreReq: OpenPKG, openpkg >= 20040130
  47. AutoReq: no
  48. AutoReqProv: no
  49. %description
  50. PARI-GP is a software package for computer-aided number theory. It
  51. consists of a C library, libpari (with optional assembler cores for
  52. some popular architectures), and of the programmable interactive gp
  53. calculator. While you can write your own libpari-based programs,
  54. many people just start up a gp session, or have gp execute their
  55. scripts.
  56. %track
  57. prog pari = {
  58. version = %{version}
  59. url = http://pari.math.u-bordeaux.fr/download.html
  60. regex = pari-(\d+\.\d+\.\d+)\.tgz
  61. }
  62. %prep
  63. %setup -q
  64. %{l_shtool} subst \
  65. -e 's;-O3;-O2;g' \
  66. -e 's;-D__GNUC__;;g' \
  67. Configure
  68. %{l_shtool} subst \
  69. -e 's;^\(install:.*\) install-doc \(.*\);\1 \2;' \
  70. config/Makefile.SH
  71. %{l_shtool} subst \
  72. -e 's;}; double y=log2(10)};' \
  73. config/has_exp2.c
  74. %build
  75. # FIXME: mlelstv: doesn't take advantage of asm kernel (broken on Solaris)
  76. CC="%{l_cc}" \
  77. CFLAGS="%{l_cflags -O}" \
  78. ./Configure \
  79. --prefix=%{l_prefix} \
  80. --datadir=%{l_prefix}/share/pari/galdata \
  81. --miscdir=%{l_prefix}/share/pari \
  82. --host=none \
  83. --graphic=none \
  84. --static
  85. %{l_make} %{l_mflags -O} gp
  86. %install
  87. rm -rf $RPM_BUILD_ROOT
  88. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  89. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/gp
  90. mv $RPM_BUILD_ROOT%{l_prefix}/bin/gp-%{V_major} \
  91. $RPM_BUILD_ROOT%{l_prefix}/bin/gp
  92. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/libpari.a
  93. mv $RPM_BUILD_ROOT%{l_prefix}/lib/libpari.a.%{V_major} \
  94. $RPM_BUILD_ROOT%{l_prefix}/lib/libpari.a
  95. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/tex2mail
  96. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/tex2mail.1
  97. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/pari/[A-Z]*
  98. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/pari/doc
  99. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  100. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  101. %files -f files
  102. %clean
  103. rm -rf $RPM_BUILD_ROOT