frink.spec 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. ##
  2. ## frink.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2008 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. # package information
  24. Name: frink
  25. Summary: Practical Calculations Engine
  26. URL: http://futureboy.us/frinkdocs/
  27. Vendor: Alan Eliasen.
  28. Packager: OpenPKG Foundation e.V.
  29. Distribution: OpenPKG Community
  30. Class: EVAL
  31. Group: Language
  32. License: Freely Usable
  33. Version: 20080716
  34. Release: 20080727
  35. # package options
  36. %option with_gcj no
  37. # list of sources
  38. Source0: ftp://ftp.openpkg.org/sources/CPY/VERSIONED/frink/frink-%{version}.jar
  39. Source1: frink.sh
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20060823
  44. PreReq: OpenPKG, openpkg >= 20060823
  45. BuildPreReq: java, JAVA-JDK
  46. PreReq: java, JAVA-JDK
  47. %if "%{with_gcj}" == "yes"
  48. BuildPreReq: gcc, gcc::with_java = yes
  49. %endif
  50. AutoReq: no
  51. AutoReqProv: no
  52. %description
  53. Frink is a practical calculating tool and programming language
  54. designed to help to better understand the world, to get calculations
  55. right without getting bogged down in the mechanics, and to make
  56. a tool that's really useful in the real world. It tracks units
  57. of measure (feet, meters, kilograms, watts, etc.) through all
  58. calculations, allowing you to make physical calculations easily, to
  59. mix units of measure transparently, and ensures that the answers
  60. come out right.
  61. %track
  62. prog frink = {
  63. version = %{version}
  64. url = ftp://ftp.openpkg.org/sources/CPY/VERSIONED/frink/
  65. regex = frink-(__VER__)\.jar
  66. }
  67. %prep
  68. %setup -q -T -c
  69. %build
  70. %if "%{with_gcj}" == "yes"
  71. gcj -O2 -fomit-frame-pointer \
  72. --main=frink.parser.Frink \
  73. -o frink.exe %{SOURCE frink-%{version}.jar}
  74. %endif
  75. %install
  76. rm -rf $RPM_BUILD_ROOT
  77. %{l_shtool} mkdir -f -p -m 755 \
  78. $RPM_BUILD_ROOT%{l_prefix}/bin \
  79. $RPM_BUILD_ROOT%{l_prefix}/libexec/frink
  80. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  81. %{SOURCE frink.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/frink
  82. %{l_shtool} install -c -m 644 \
  83. %{SOURCE frink-%{version}.jar} $RPM_BUILD_ROOT%{l_prefix}/libexec/frink/frink.jar
  84. %if "%{with_gcj}" == "yes"
  85. %{l_shtool} install -c -s -m 755 \
  86. frink.exe $RPM_BUILD_ROOT%{l_prefix}/libexec/frink/
  87. %endif
  88. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  89. %files -f files
  90. %clean
  91. rm -rf $RPM_BUILD_ROOT