calc.spec 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. ##
  2. ## calc.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2001 Ralf S. Engelschall <rse@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. # package information
  25. Name: calc
  26. Summary: C-Style Arbitrary Precision Calculator
  27. Group: Algorithm
  28. URL: http://www.isthe.com/chongo/tech/comp/calc/
  29. Vendor: David I. Bell et al.
  30. Packager: rse@openpkg.org
  31. Distribution: OpenPKG
  32. License: GPL
  33. Version: 2.11.4t2
  34. Release: 1
  35. # list of sources
  36. Source0: ftp://ftp.gnu.org/gnu/bc/%{name}-%{version}.tar.gz
  37. # build information
  38. Prefix: %{l_prefix}
  39. BuildRoot: %{l_buildroot}
  40. BuildPreReq: OpenPKG, openpkg >= 0.9-30
  41. PreReq: OpenPKG, openpkg >= 0.9-30
  42. AutoReq: no
  43. AutoReqProv: no
  44. %description
  45. Calc is an interactive calculator which provides for easy large
  46. numeric calculations, but which also can be easily programmed
  47. for difficult or long calculations. It can accept a command line
  48. argument, in which case it executes that single command and exits.
  49. Otherwise, it enters interactive mode. In this mode, it accepts
  50. commands one at a time, processes them, and displays the answers.
  51. In the simplest case, commands are simply expressions which are
  52. evaluated.
  53. %prep
  54. %setup -q
  55. %build
  56. chmod -R u+w .
  57. %{l_rpmtool} subst "s;<malloc.h>;<stdlib.h>;" -- *.[ch]
  58. %{l_make} %{l_mflags} \
  59. CC="%{l_cc}" \
  60. CFLAGS="%{l_cflags -O}" \
  61. BINDIR=%{l_prefix}/bin \
  62. TOPDIR=%{l_prefix}/lib \
  63. INCDIR=%{l_prefix}/include \
  64. MANDIR=%{l_prefix}/man/man1
  65. %install
  66. rm -rf $RPM_BUILD_ROOT
  67. %{l_shtool} mkdir -f -p -m 755 \
  68. $RPM_BUILD_ROOT%{l_prefix}/bin \
  69. $RPM_BUILD_ROOT%{l_prefix}/lib \
  70. $RPM_BUILD_ROOT%{l_prefix}/man/man1
  71. %{l_make} %{l_mflags} install \
  72. BINDIR=$RPM_BUILD_ROOT%{l_prefix}/bin \
  73. TOPDIR=$RPM_BUILD_ROOT%{l_prefix}/lib \
  74. INCDIR=$RPM_BUILD_ROOT%{l_prefix}/include \
  75. MANDIR=$RPM_BUILD_ROOT%{l_prefix}/man/man1
  76. rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/calc/test*
  77. rm -rf $RPM_BUILD_ROOT%{l_prefix}/bin/cscript
  78. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2> /dev/null || true
  79. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  80. %files -f files
  81. %clean
  82. rm -rf $RPM_BUILD_ROOT