spin.spec 4.5 KB

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