expect.spec 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. ##
  2. ## expect.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 versions
  24. %define V_expect_tar 5.43.0
  25. %define V_expect_dir 5.43
  26. %define V_tcl 8.4.17
  27. # package information
  28. Name: expect
  29. Summary: Send/Expect Scripting Language
  30. URL: http://expect.nist.gov/
  31. Vendor: NIST
  32. Packager: OpenPKG Foundation e.V.
  33. Distribution: OpenPKG Community
  34. Class: BASE
  35. Group: Language
  36. License: GPL
  37. Version: %{V_expect_tar}
  38. Release: 20080105
  39. # list of sources
  40. Source0: http://expect.nist.gov/src/expect-%{V_expect_tar}.tar.gz
  41. Source1: http://switch.dl.sourceforge.net/tcl/tcl%{V_tcl}-src.tar.gz
  42. Patch0: expect.patch
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20040130
  47. PreReq: OpenPKG, openpkg >= 20040130
  48. AutoReq: no
  49. AutoReqProv: no
  50. %description
  51. Expect is a tool for automating interactive applications such as
  52. telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really makes
  53. this stuff trivial. Expect is also useful for testing these same
  54. applications.
  55. %track
  56. prog expect:expect = {
  57. comment = "rse: 5.44.x was withdrawn and failed to build anyway"
  58. version = %{version}
  59. url = http://expect.nist.gov/src/
  60. regex = expect-(__VER__)\.tar\.gz
  61. }
  62. prog expect:tcl = {
  63. version = %{V_tcl}
  64. url = http://prdownloads.sourceforge.net/tcl/
  65. regex = tcl(8\.4\.\d+)-src\.tar\.gz
  66. }
  67. %prep
  68. %setup -q -c
  69. %setup -q -T -D -a 1
  70. %patch -p0
  71. %build
  72. ( cd tcl%{V_tcl}/unix
  73. CC="%{l_cc}" \
  74. CFLAGS="%{l_cflags -O}" \
  75. ./configure \
  76. --prefix=%{l_prefix} \
  77. --includedir=%{l_prefix}/include/expect/tcl \
  78. --libdir=%{l_prefix}/lib/expect/tcl \
  79. --disable-threads \
  80. --disable-load \
  81. --disable-shared
  82. %{l_make} %{l_mflags -O}
  83. ) || exit $?
  84. ( cd expect-%{V_expect_dir}
  85. CC="%{l_cc}" \
  86. CFLAGS="%{l_cflags -O}" \
  87. ./configure \
  88. --prefix=%{l_prefix} \
  89. --with-tcl=../tcl%{V_tcl}/unix \
  90. --without-x \
  91. --disable-load \
  92. --disable-shared
  93. %{l_make} %{l_mflags -O} expect
  94. ) || exit $?
  95. %install
  96. rm -rf $RPM_BUILD_ROOT
  97. ( cd tcl%{V_tcl}/unix
  98. %{l_make} %{l_mflags} install INSTALL_ROOT=$RPM_BUILD_ROOT
  99. rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/man3
  100. rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/mann
  101. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/tclsh.1
  102. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/tclsh*
  103. rm -rf $RPM_BUILD_ROOT%{l_prefix}/include/expect
  104. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/expect/tcl/libtcl*
  105. ) || exit $?
  106. ( cd expect-%{V_expect_dir}
  107. %{l_shtool} mkdir -f -p -m 755 \
  108. $RPM_BUILD_ROOT%{l_prefix}/bin \
  109. $RPM_BUILD_ROOT%{l_prefix}/man/man1
  110. %{l_shtool} install -c -s -m 755 \
  111. expect $RPM_BUILD_ROOT%{l_prefix}/bin/
  112. %{l_shtool} install -c -m 644 \
  113. expect.man $RPM_BUILD_ROOT%{l_prefix}/man/man1/expect.1
  114. ) || exit $?
  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