pari.spec 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. ##
  2. ## pari.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2002 Ralf S. Engelschall <rse@engelschall.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. %define V_major 2.1
  26. %define V_minor 4
  27. # package information
  28. Name: pari
  29. Summary: GP/PARI number-theory library
  30. URL: http://www.parigp-home.de/
  31. Vendor: Henri Cohen et al
  32. Packager: The OpenPKG Project
  33. Distribution: OpenPKG [PLUS]
  34. Group: Algorithm
  35. License: GPL
  36. Version: %{V_major}.%{V_minor}
  37. Release: 20020821
  38. # list of sources
  39. Source0: ftp://www.gn-50uma.de/gn/gn-50uma.de/pari-%{V_major}/pari-%{version}.tar.gz
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20020206, make, gcc
  44. PreReq: OpenPKG, openpkg >= 20020206
  45. AutoReq: no
  46. AutoReqProv: no
  47. %description
  48. PARI-GP is a software package for computer-aided number theory. It
  49. consists of a C library, libpari (with optional assembler cores for
  50. some popular architectures), and of the programmable interactive gp
  51. calculator. While you can write your own libpari-based programs,
  52. many people just start up a gp session, or have gp execute their
  53. scripts.
  54. %prep
  55. %setup -q
  56. %build
  57. CC="%{l_cc}" \
  58. CFLAGS="%{l_cflags -O}" \
  59. ./Configure \
  60. --prefix=%{l_prefix} \
  61. --datadir=%{l_prefix}/share/pari/galdata \
  62. --miscdir=%{l_prefix}/share/pari \
  63. --graphic=none \
  64. --static
  65. %{l_make} %{l_mflags -O} gp
  66. %install
  67. rm -rf $RPM_BUILD_ROOT
  68. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  69. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/gp
  70. mv $RPM_BUILD_ROOT%{l_prefix}/bin/gp-%{V_major} \
  71. $RPM_BUILD_ROOT%{l_prefix}/bin/gp
  72. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/libpari.a
  73. mv $RPM_BUILD_ROOT%{l_prefix}/lib/libpari.a.%{V_major} \
  74. $RPM_BUILD_ROOT%{l_prefix}/lib/libpari.a
  75. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/tex2mail
  76. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/tex2mail.1
  77. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/pari/[A-Z]*
  78. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/pari/doc
  79. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  80. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  81. %files -f files
  82. %clean
  83. rm -rf $RPM_BUILD_ROOT