tcsh.spec 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. ##
  2. ## tcsh.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2002 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. # package information
  26. Name: tcsh
  27. Summary: TENEX C-Shell
  28. URL: http://www2.wbs.ne.jp/~znc/tcsh/
  29. Vendor: Christos Zoulas, William Joy et al.
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [REL]
  32. Group: Shell
  33. License: BSD
  34. Version: 6.11
  35. Release: 20011201
  36. # list of sources
  37. Source0: ftp://ftp.astron.com/pub/tcsh/tcsh-%{version}.tar.gz
  38. #Source0: ftp://ftp.fujitsu.co.jp/pub/misc/shells/tcsh/tcsh-%{version}.tgz
  39. # build information
  40. Prefix: %{l_prefix}
  41. BuildRoot: %{l_buildroot}
  42. BuildPreReq: OpenPKG, openpkg >= 20011227
  43. PreReq: OpenPKG, openpkg >= 20011227
  44. AutoReq: no
  45. AutoReqProv: no
  46. %description
  47. TCSH is an enhanced but completely compatible version of the
  48. Berkeley UNIX C shell, csh(1). It is a command language interpreter
  49. usable both as an interactive login shell and a shell script command
  50. processor. It includes a command-line editor, programmable word
  51. completion, spelling correction, a history mechanism, job control
  52. and a C-like syntax.
  53. %prep
  54. %setup -q -n tcsh-%{version}.00
  55. %build
  56. CC="%{l_cc}" \
  57. CFLAGS="%{l_cflags -O}" \
  58. ./configure \
  59. --prefix=%{l_prefix}
  60. %{l_make} %{l_mflags -O}
  61. %install
  62. rm -rf $RPM_BUILD_ROOT
  63. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}
  64. %{l_make} %{l_mflags} install install.man \
  65. prefix=$RPM_BUILD_ROOT%{l_prefix}
  66. chmod -R u+w $RPM_BUILD_ROOT%{l_prefix}
  67. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  68. %files -f files
  69. %clean
  70. rm -rf $RPM_BUILD_ROOT
  71. %post
  72. if [ ".$1" = .1 -a -w /etc/shells ]; then
  73. cp -p /etc/shells /tmp/shells
  74. grep -v "$RPM_INSTALL_PREFIX/bin/tcsh" </tmp/shells >/etc/shells
  75. echo "$RPM_INSTALL_PREFIX/bin/tcsh" >>/etc/shells
  76. rm -f /tmp/shells
  77. fi
  78. %postun
  79. if [ ".$1" = .0 -a -w /etc/shells ]; then
  80. cp -p /etc/shells /tmp/shells
  81. grep -v "$RPM_INSTALL_PREFIX/bin/tcsh" </tmp/shells >/etc/shells
  82. rm -f /tmp/shells
  83. fi