ksh.spec 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. ##
  2. ## ksh.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. %define V_pkg 20020628
  26. %define V_ksh 2002-06-28
  27. %define V_init 2002-06-28
  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 [REL]
  35. Group: Shell
  36. License: AT&T
  37. Version: %{V_pkg}
  38. Release: 20020628
  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. %description
  50. The KornShell language was designed and developed by David G. Korn
  51. at AT&T Bell Laboratories. It is an interactive command language
  52. that provides access to the UNIX system and to many other systems,
  53. on the many different computers and workstations on which it is
  54. implemented. This is Ksh93 which is intended to conform to the Shell
  55. Language Standard developed by the IEEE POSIX 1003.2 Shell and
  56. Utilities Language Committee.
  57. %prep
  58. %setup0 -q -c -n ksh-%{version}
  59. %setup1 -q -T -D -a 1
  60. %build
  61. ./bin/package read || true
  62. ./bin/package make CC="%{l_cc}"
  63. %install
  64. rm -rf $RPM_BUILD_ROOT
  65. %{l_shtool} mkdir -f -p -m 755 \
  66. $RPM_BUILD_ROOT%{l_prefix}/bin \
  67. $RPM_BUILD_ROOT%{l_prefix}/man/man1
  68. %{l_shtool} install -c -s -m 755 \
  69. arch/*/bin/ksh $RPM_BUILD_ROOT%{l_prefix}/bin/ksh
  70. %{l_shtool} install -c -m 644 \
  71. arch/*/man/man1/sh.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/ksh.1
  72. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  73. %files -f files
  74. %clean
  75. rm -rf $RPM_BUILD_ROOT
  76. %post
  77. if [ ".$1" = .1 ]; then
  78. if [ -f /etc/shells ]; then
  79. if [ ".`grep $RPM_INSTALL_PREFIX/bin/ksh /etc/shells`" = . ]; then
  80. ( echo "Hint: If you want to use $RPM_INSTALL_PREFIX/bin/ksh as the login"
  81. echo "shell for users you have to add this path to /etc/shells, please."
  82. ) | %{l_rpmtool} msg -b -t notice
  83. fi
  84. fi
  85. fi