bash.spec 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. ##
  2. ## bash.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 version
  26. %define V_real 2.05b
  27. %define V_comp 205b
  28. # package information
  29. Name: bash
  30. Summary: Bourne-Again Shell
  31. URL: http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html
  32. Vendor: Free Software Foundation
  33. Packager: The OpenPKG Project
  34. Distribution: OpenPKG [CORE]
  35. Group: Shell
  36. License: GPL
  37. Version: %{V_real}
  38. Release: 20021025
  39. # list of sources
  40. Source0: ftp://ftp.cwru.edu/pub/bash/bash-%{V_real}.tar.gz
  41. Source1: profile
  42. Patch0: ftp://ftp.cwru.edu/pub/bash/bash-%{V_real}-patches/bash%{V_comp}-001
  43. Patch1: ftp://ftp.cwru.edu/pub/bash/bash-%{V_real}-patches/bash%{V_comp}-002
  44. Patch2: ftp://ftp.cwru.edu/pub/bash/bash-%{V_real}-patches/bash%{V_comp}-003
  45. Patch3: ftp://ftp.cwru.edu/pub/bash/bash-%{V_real}-patches/bash%{V_comp}-004
  46. # build information
  47. Prefix: %{l_prefix}
  48. BuildRoot: %{l_buildroot}
  49. BuildPreReq: OpenPKG, openpkg >= 20020416
  50. PreReq: OpenPKG, openpkg >= 20020416
  51. AutoReq: no
  52. AutoReqProv: no
  53. %description
  54. Bash (Bourne-Again Shell) is an sh-compatible command language interpreter
  55. that executes commands read from the standard input or from a file. Bash
  56. also incorporates useful features from the Korn and C shells (ksh and csh).
  57. Bash is intended to be a conformant implementation of the IEEE POSIX Shell
  58. and Tools specification (IEEE Working Group 1003.2).
  59. %prep
  60. %setup -q
  61. %patch0 -p0
  62. %patch1 -p0
  63. %patch2 -p0
  64. %patch3 -p0
  65. %build
  66. CC="%{l_cc}" \
  67. CFLAGS="%{l_cflags -O}" \
  68. ./configure \
  69. --prefix=%{l_prefix} \
  70. --without-gnu-malloc \
  71. --without-curses
  72. %{l_shtool} subst \
  73. -e 's;^\(#define.*SYS_PROFILE["^]*\).*;\1 "%{l_prefix}/etc/bash/profile";' \
  74. pathnames.h
  75. %{l_shtool} subst \
  76. -e 's;/etc/profile;%{l_prefix}/etc/bash/profile;' \
  77. doc/bash.1
  78. %{l_make} %{l_mflags}
  79. %install
  80. rm -rf $RPM_BUILD_ROOT
  81. %{l_make} %{l_mflags} install prefix=$RPM_BUILD_ROOT%{l_prefix}
  82. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  83. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/bashbug.1
  84. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/bashbug
  85. strip $RPM_BUILD_ROOT%{l_prefix}/bin/bash
  86. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/bash
  87. %{l_shtool} install -c -m 644 -e 's;@l_prefix@;%{l_prefix};g' \
  88. %{SOURCE profile} $RPM_BUILD_ROOT%{l_prefix}/etc/bash/
  89. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  90. %{l_files_std} \
  91. '%config %{l_prefix}/etc/bash/profile'
  92. %files -f files
  93. %clean
  94. rm -rf $RPM_BUILD_ROOT
  95. %post
  96. if [ ".$1" = .1 ]; then
  97. if [ -f /etc/shells ]; then
  98. if [ ".`grep $RPM_INSTALL_PREFIX/bin/bash /etc/shells`" = . ]; then
  99. ( echo "Hint: To use $RPM_INSTALL_PREFIX/bin/bash as the login"
  100. echo "shell for users, please add this path to /etc/shells."
  101. ) | %{l_rpmtool} msg -b -t notice
  102. fi
  103. fi
  104. fi