ksh.spec 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. ##
  2. ## ksh.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. %define V_pkg 20030422
  26. %define V_ksh 2003-04-22
  27. %define V_init 2003-04-22
  28. # package information
  29. Name: ksh
  30. Summary: The Original AT&T Korn Shell
  31. URL: http://www.kornshell.com/
  32. Vendor: David G. Korn, AT&T Bell Labs
  33. Packager: The OpenPKG Project
  34. Distribution: OpenPKG [BASE]
  35. Group: Shell
  36. License: AT&T
  37. Version: %{V_pkg}
  38. Release: 20030424
  39. # list of sources
  40. Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{V_ksh}.tgz
  41. Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{V_init}.tgz
  42. # build information
  43. Prefix: %{l_prefix}
  44. BuildRoot: %{l_buildroot}
  45. BuildPreReq: OpenPKG, openpkg >= 20020416
  46. PreReq: OpenPKG, openpkg >= 20020416
  47. AutoReq: no
  48. AutoReqProv: no
  49. Provides: KSH
  50. Conflicts: pdksh
  51. %description
  52. The KornShell language was designed and developed by David G. Korn
  53. at AT&T Bell Laboratories. It is an interactive command language
  54. that provides access to the UNIX system and to many other systems,
  55. on the many different computers and workstations on which it is
  56. implemented. This is Ksh93 which is intended to conform to the Shell
  57. Language Standard developed by the IEEE POSIX 1003.2 Shell and
  58. Utilities Language Committee.
  59. %prep
  60. %setup0 -q -c -n ksh-%{version}
  61. %setup1 -q -T -D -a 1
  62. %build
  63. ./bin/package read || true
  64. ./bin/package make CC="%{l_cc}"
  65. %install
  66. rm -rf $RPM_BUILD_ROOT
  67. %{l_shtool} mkdir -f -p -m 755 \
  68. $RPM_BUILD_ROOT%{l_prefix}/bin \
  69. $RPM_BUILD_ROOT%{l_prefix}/man/man1
  70. %{l_shtool} install -c -s -m 755 \
  71. arch/*/bin/ksh $RPM_BUILD_ROOT%{l_prefix}/bin/ksh
  72. %{l_shtool} install -c -m 644 \
  73. arch/*/man/man1/sh.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/ksh.1
  74. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  75. %files -f files
  76. %clean
  77. rm -rf $RPM_BUILD_ROOT
  78. %post
  79. if [ ".$1" = .1 ]; then
  80. if [ -f /etc/shells ]; then
  81. if [ ".`grep $RPM_INSTALL_PREFIX/bin/ksh /etc/shells`" = . ]; then
  82. ( echo "Hint: To use $RPM_INSTALL_PREFIX/bin/ksh as the login"
  83. echo "shell for users, please add this path to /etc/shells."
  84. ) | %{l_rpmtool} msg -b -t notice
  85. fi
  86. fi
  87. fi