expect.spec 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. ##
  2. ## expect.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2003 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. # 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.4
  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: 20030730
  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. Patch0: expect.patch
  51. # build information
  52. Prefix: %{l_prefix}
  53. BuildRoot: %{l_buildroot}
  54. BuildPreReq: OpenPKG, openpkg >= 20020206, tcl = %{V_tcl}
  55. PreReq: OpenPKG, openpkg >= 20020206, tcl = %{V_tcl}
  56. AutoReq: no
  57. AutoReqProv: no
  58. %description
  59. Expect is a tool for automating interactive applications such as
  60. telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really makes
  61. this stuff trivial. Expect is also useful for testing these same
  62. applications.
  63. %prep
  64. %setup0 -q -c -n expect-%{version}
  65. %setup1 -q -T -D -a 1
  66. %patch0 -p0
  67. %build
  68. ( cd tcl%{V_tcl}/unix
  69. CC="%{l_cc}" \
  70. CFLAGS="%{l_cflags -O}" \
  71. ./configure \
  72. --prefix=%{l_prefix} \
  73. --disable-threads \
  74. --disable-load \
  75. --disable-shared
  76. %{l_make} %{l_mflags -O}
  77. ) || exit $?
  78. ( cd expect-%{V_expect}
  79. CC="%{l_cc}" \
  80. CFLAGS="%{l_cflags -O}" \
  81. ./configure \
  82. --prefix=%{l_prefix} \
  83. --with-tcl=../tcl%{V_tcl}/unix \
  84. --without-x \
  85. --disable-load \
  86. --disable-shared
  87. %{l_make} %{l_mflags -O} expect
  88. ) || exit $?
  89. %install
  90. rm -rf $RPM_BUILD_ROOT
  91. ( cd expect-%{V_expect}
  92. %{l_shtool} mkdir -f -p -m 755 \
  93. $RPM_BUILD_ROOT%{l_prefix}/bin \
  94. $RPM_BUILD_ROOT%{l_prefix}/man/man1
  95. %{l_shtool} install -c -s -m 755 \
  96. expect $RPM_BUILD_ROOT%{l_prefix}/bin/
  97. %{l_shtool} install -c -m 644 \
  98. expect.man $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  99. ) || exit $?
  100. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  101. %files -f files
  102. %clean
  103. rm -rf $RPM_BUILD_ROOT