spin.spec 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. ##
  2. ## spin.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2007 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. # package version
  25. %define V_real 4.2.9
  26. %define V_dist 429
  27. # package information
  28. Name: spin
  29. Summary: Formal Concurrent System Verification
  30. URL: http://spinroot.com/
  31. Vendor: NASA & Bell Labs
  32. Packager: OpenPKG Foundation e.V.
  33. Distribution: OpenPKG Community
  34. Class: EVAL
  35. Group: Language
  36. License: Freeware
  37. Version: %{V_real}
  38. Release: 20070211
  39. # package options
  40. %option with_x11 no
  41. # list of sources
  42. Source0: http://spinroot.com/spin/Src/spin%{V_dist}.tar.gz
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, bison
  47. PreReq: OpenPKG, openpkg >= 20040130
  48. %if "%{with_x11}" == "yes"
  49. PreReq: tcl, tcl::with_x11 = yes, graphviz, gcc
  50. %endif
  51. AutoReq: no
  52. AutoReqProv: no
  53. %description
  54. Spin is a popular software tool that can be used for the formal
  55. verification of distributed software systems. Spin targets efficient
  56. software verification, not hardware verification. Spin uses a high
  57. level language to specify systems descriptions, called PROMELA (a
  58. PROcess MEta LAnguage). Spin has been used to trace logical design
  59. errors in distributed systems design, such as operating systems,
  60. data communications protocols, switching systems, concurrent
  61. algorithms, railway signaling protocols, etc. The tool checks the
  62. logical consistency of a specification. It reports on deadlocks,
  63. unspecified receptions, flags incompleteness, race conditions, and
  64. unwarranted assumptions about the relative speeds of processes.
  65. %track
  66. prog spin = {
  67. version = %{V_dist}
  68. url = http://spinroot.com/spin/Src/index.html
  69. regex = spin(__VER__)\.tar\.gz
  70. }
  71. %prep
  72. %setup -q -n Spin
  73. %build
  74. # build spin
  75. ( cd Src%{V_real}
  76. # detect extra CFLAGS to be added for system-specifics
  77. cflags="-DNXT -D_POSIX_SOURCE"
  78. case "%{l_platform -t}" in
  79. *-sunos* ) cflags="$cflags -DSOLARIS" ;;
  80. esac
  81. %{l_make} %{l_mflags} -f makefile \
  82. CC="%{l_cc}" CFLAGS="%{l_cflags -O} $cflags" \
  83. YACC="%{l_prefix}/bin/bison -y"
  84. ) || exit $?
  85. %if "%{with_x11}" == "yes"
  86. # build xspin
  87. ( cd Xspin*
  88. %{l_shtool} subst \
  89. -e 's;^#!/bin/sh;#!%{l_prefix}/bin/wish -f;' \
  90. -e 's;^\(exec wish\);#\1;' \
  91. -e 's;"gcc -w";"%{l_cc}";' \
  92. -e 's;"cpp";"%{l_cc} -E";' \
  93. -e 's;"spin";"%{l_prefix}/bin/spin";' \
  94. -e 's;"dot";"%{l_prefix}/bin/dot";' \
  95. xspin*.tcl
  96. ) || exit $?
  97. %endif
  98. %install
  99. rm -rf $RPM_BUILD_ROOT
  100. # make installation hierarchy
  101. %{l_shtool} mkdir -p -f -m 755 \
  102. $RPM_BUILD_ROOT%{l_prefix}/bin \
  103. $RPM_BUILD_ROOT%{l_prefix}/man/man1
  104. # install spin
  105. %{l_shtool} install -c -s -m 755 \
  106. Src%{V_real}/spin $RPM_BUILD_ROOT%{l_prefix}/bin/
  107. %{l_shtool} install -c -m 644 \
  108. Man/spin.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  109. %if "%{with_x11}" == "yes"
  110. # install xspin
  111. %{l_shtool} install -c -m 755 \
  112. Xspin*/xspin*.tcl $RPM_BUILD_ROOT%{l_prefix}/bin/xspin
  113. %endif
  114. # determine installation files
  115. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  116. %files -f files
  117. %clean
  118. rm -rf $RPM_BUILD_ROOT