bash.spec 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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: 20030508
  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. Patch4: ftp://ftp.cwru.edu/pub/bash/bash-%{V_real}-patches/bash%{V_comp}-005
  47. Patch5: ftp://ftp.cwru.edu/pub/bash/bash-%{V_real}-patches/bash%{V_comp}-006
  48. Patch6: ftp://ftp.cwru.edu/pub/bash/bash-%{V_real}-patches/bash%{V_comp}-007
  49. # build information
  50. Prefix: %{l_prefix}
  51. BuildRoot: %{l_buildroot}
  52. BuildPreReq: OpenPKG, openpkg >= 20020416
  53. PreReq: OpenPKG, openpkg >= 20020416
  54. AutoReq: no
  55. AutoReqProv: no
  56. %description
  57. Bash (Bourne-Again Shell) is an sh-compatible command language interpreter
  58. that executes commands read from the standard input or from a file. Bash
  59. also incorporates useful features from the Korn and C shells (ksh and csh).
  60. Bash is intended to be a conformant implementation of the IEEE POSIX Shell
  61. and Tools specification (IEEE Working Group 1003.2).
  62. %prep
  63. %setup -q
  64. %patch0 -p0
  65. %patch1 -p0
  66. %patch2 -p0
  67. %patch3 -p0
  68. %build
  69. ( # force disabled wide-character support
  70. echo "ac_cv_header_wchar_h=no"
  71. echo "ac_cv_header_wctype_h=no"
  72. echo "ac_cv_func_mbsrtowcs=no"
  73. # force disabled internationalization support
  74. echo "ac_cv_header_libintl_h=no"
  75. echo "ac_cv_func_gettext=no"
  76. echo "ac_cv_func_textdomain=no"
  77. echo "ac_cv_func_bindtextdomain=no"
  78. echo "ac_cv_lib_intl_bindtextdomain=no"
  79. ) >config.cache
  80. CC="%{l_cc}" \
  81. CFLAGS="%{l_cflags -O}" \
  82. ./configure \
  83. --cache-file=./config.cache \
  84. --prefix=%{l_prefix} \
  85. --without-gnu-malloc \
  86. --without-curses
  87. %{l_shtool} subst \
  88. -e 's;^\(#define.*SYS_PROFILE["^]*\).*;\1 "%{l_prefix}/etc/bash/profile";' \
  89. pathnames.h
  90. %{l_shtool} subst \
  91. -e 's;/etc/profile;%{l_prefix}/etc/bash/profile;' \
  92. doc/bash.1
  93. %{l_make} %{l_mflags}
  94. %install
  95. rm -rf $RPM_BUILD_ROOT
  96. %{l_make} %{l_mflags} install prefix=$RPM_BUILD_ROOT%{l_prefix}
  97. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  98. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/bashbug.1
  99. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/bashbug
  100. strip $RPM_BUILD_ROOT%{l_prefix}/bin/bash
  101. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/bash
  102. %{l_shtool} install -c -m 644 -e 's;@l_prefix@;%{l_prefix};g' \
  103. %{SOURCE profile} $RPM_BUILD_ROOT%{l_prefix}/etc/bash/
  104. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  105. %{l_files_std} \
  106. '%config %{l_prefix}/etc/bash/profile'
  107. %files -f files
  108. %clean
  109. rm -rf $RPM_BUILD_ROOT
  110. %post
  111. if [ ".$1" = .1 ]; then
  112. if [ -f /etc/shells ]; then
  113. if [ ".`grep $RPM_INSTALL_PREFIX/bin/bash /etc/shells`" = . ]; then
  114. ( echo "Hint: To use $RPM_INSTALL_PREFIX/bin/bash as the login"
  115. echo "shell for users, please add this path to /etc/shells."
  116. ) | %{l_rpmtool} msg -b -t notice
  117. fi
  118. fi
  119. fi