bash.spec 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. ##
  2. ## bash.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. # 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: 20021127
  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. ( # force disabled wide-character support
  67. echo "ac_cv_header_wchar_h=no"
  68. echo "ac_cv_header_wctype_h=no"
  69. echo "ac_cv_func_mbsrtowcs=no"
  70. # force disabled internationalization support
  71. echo "ac_cv_header_libintl_h=no"
  72. echo "ac_cv_func_gettext=no"
  73. echo "ac_cv_func_textdomain=no"
  74. echo "ac_cv_func_bindtextdomain=no"
  75. echo "ac_cv_lib_intl_bindtextdomain=no"
  76. ) >config.cache
  77. CC="%{l_cc}" \
  78. CFLAGS="%{l_cflags -O}" \
  79. ./configure \
  80. --cache-file=./config.cache \
  81. --prefix=%{l_prefix} \
  82. --without-gnu-malloc \
  83. --without-curses
  84. %{l_shtool} subst \
  85. -e 's;^\(#define.*SYS_PROFILE["^]*\).*;\1 "%{l_prefix}/etc/bash/profile";' \
  86. pathnames.h
  87. %{l_shtool} subst \
  88. -e 's;/etc/profile;%{l_prefix}/etc/bash/profile;' \
  89. doc/bash.1
  90. %{l_make} %{l_mflags}
  91. %install
  92. rm -rf $RPM_BUILD_ROOT
  93. %{l_make} %{l_mflags} install prefix=$RPM_BUILD_ROOT%{l_prefix}
  94. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  95. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/bashbug.1
  96. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/bashbug
  97. strip $RPM_BUILD_ROOT%{l_prefix}/bin/bash
  98. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/bash
  99. %{l_shtool} install -c -m 644 -e 's;@l_prefix@;%{l_prefix};g' \
  100. %{SOURCE profile} $RPM_BUILD_ROOT%{l_prefix}/etc/bash/
  101. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  102. %{l_files_std} \
  103. '%config %{l_prefix}/etc/bash/profile'
  104. %files -f files
  105. %clean
  106. rm -rf $RPM_BUILD_ROOT
  107. %post
  108. if [ ".$1" = .1 ]; then
  109. if [ -f /etc/shells ]; then
  110. if [ ".`grep $RPM_INSTALL_PREFIX/bin/bash /etc/shells`" = . ]; then
  111. ( echo "Hint: To use $RPM_INSTALL_PREFIX/bin/bash as the login"
  112. echo "shell for users, please add this path to /etc/shells."
  113. ) | %{l_rpmtool} msg -b -t notice
  114. fi
  115. fi
  116. fi