expect.spec 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. ##
  2. ## expect.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 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. # ATTENTION: Expect is brain-dead: it requires private Tcl information
  26. # (tclInt.h) which only can be found in the Tcl sources on the one
  27. # hand and it requires the Tcl installation files under run-time on
  28. # the other hand (which can be provided by the Tcl package). This
  29. # means we have to do something very strange: include the Tcl source
  30. # and use it for building and requiring the Tcl package for use under
  31. # run-time. Hence we require _exactly_ a particular Tcl version. Keep
  32. # this in sync!
  33. # package versions
  34. %define V_expect 5.38
  35. %define V_tcl 8.4.1
  36. # package information
  37. Name: expect
  38. Summary: Send/Expect Scripting Language
  39. URL: http://expect.nist.gov/
  40. Vendor: NIST
  41. Packager: The OpenPKG Project
  42. Distribution: OpenPKG [BASE]
  43. Group: Language
  44. License: GPL
  45. Version: %{V_expect}
  46. Release: 20021023
  47. # list of sources
  48. Source0: http://expect.nist.gov/expect.tar.gz
  49. Source1: ftp://ftp.scriptics.com/pub/tcl/tcl8_4/tcl%{V_tcl}-src.tar.gz
  50. # build information
  51. Prefix: %{l_prefix}
  52. BuildRoot: %{l_buildroot}
  53. BuildPreReq: OpenPKG, openpkg >= 20020206, tcl = %{V_tcl}
  54. PreReq: OpenPKG, openpkg >= 20020206, tcl = %{V_tcl}
  55. AutoReq: no
  56. AutoReqProv: no
  57. %description
  58. Expect is a tool for automating interactive applications such as
  59. telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really makes
  60. this stuff trivial. Expect is also useful for testing these same
  61. applications.
  62. %prep
  63. %setup0 -q -c -n expect-%{version}
  64. %setup1 -q -T -D -a 1
  65. %build
  66. ( cd tcl%{V_tcl}/unix
  67. CC="%{l_cc}" \
  68. CFLAGS="%{l_cflags -O}" \
  69. ./configure \
  70. --prefix=%{l_prefix} \
  71. --disable-threads \
  72. --disable-load \
  73. --disable-shared
  74. %{l_make} %{l_mflags -O}
  75. )
  76. ( cd expect-%{V_expect}
  77. CC="%{l_cc}" \
  78. CFLAGS="%{l_cflags -O}" \
  79. ./configure \
  80. --prefix=%{l_prefix} \
  81. --with-tcl=../tcl%{V_tcl}/unix \
  82. --without-x \
  83. --disable-load \
  84. --disable-shared
  85. %{l_make} %{l_mflags -O} expect
  86. )
  87. %install
  88. rm -rf $RPM_BUILD_ROOT
  89. ( cd expect-%{V_expect}
  90. %{l_shtool} mkdir -f -p -m 755 \
  91. $RPM_BUILD_ROOT%{l_prefix}/bin \
  92. $RPM_BUILD_ROOT%{l_prefix}/man/man1
  93. %{l_shtool} install -c -s -m 755 \
  94. expect $RPM_BUILD_ROOT%{l_prefix}/bin/
  95. %{l_shtool} install -c -m 644 \
  96. expect.man $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  97. )
  98. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  99. %files -f files
  100. %clean
  101. rm -rf $RPM_BUILD_ROOT