bash.spec 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. ##
  2. ## bash.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.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: 20030725
  39. # list of sources
  40. Source0: ftp://ftp.cwru.edu/pub/bash/bash-%{V_real}.tar.gz
  41. Source1: profile
  42. Patch0: bash.patch
  43. Patch1: ftp://ftp.cwru.edu/pub/bash/bash-%{V_real}-patches/bash%{V_comp}-001
  44. Patch2: ftp://ftp.cwru.edu/pub/bash/bash-%{V_real}-patches/bash%{V_comp}-002
  45. Patch3: ftp://ftp.cwru.edu/pub/bash/bash-%{V_real}-patches/bash%{V_comp}-003
  46. Patch4: ftp://ftp.cwru.edu/pub/bash/bash-%{V_real}-patches/bash%{V_comp}-004
  47. Patch5: ftp://ftp.cwru.edu/pub/bash/bash-%{V_real}-patches/bash%{V_comp}-005
  48. Patch6: ftp://ftp.cwru.edu/pub/bash/bash-%{V_real}-patches/bash%{V_comp}-006
  49. Patch7: ftp://ftp.cwru.edu/pub/bash/bash-%{V_real}-patches/bash%{V_comp}-007
  50. # build information
  51. Prefix: %{l_prefix}
  52. BuildRoot: %{l_buildroot}
  53. BuildPreReq: OpenPKG, openpkg >= 20030717
  54. PreReq: OpenPKG, openpkg >= 20030717
  55. AutoReq: no
  56. AutoReqProv: no
  57. %description
  58. Bash (Bourne-Again Shell) is an sh-compatible command language interpreter
  59. that executes commands read from the standard input or from a file. Bash
  60. also incorporates useful features from the Korn and C shells (ksh and csh).
  61. Bash is intended to be a conformant implementation of the IEEE POSIX Shell
  62. and Tools specification (IEEE Working Group 1003.2).
  63. %prep
  64. %setup -q
  65. %patch0 -p0
  66. %patch1 -p0
  67. %patch2 -p0
  68. %patch3 -p0
  69. %patch4 -p0
  70. %patch5 -p0
  71. %patch6 -p0
  72. %patch7 -p0
  73. %build
  74. # configure package
  75. ( # force disabled wide-character support
  76. echo "ac_cv_header_wchar_h=no"
  77. echo "ac_cv_header_wctype_h=no"
  78. echo "ac_cv_func_mbsrtowcs=no"
  79. # force disabled internationalization support
  80. echo "ac_cv_header_libintl_h=no"
  81. echo "ac_cv_func_gettext=no"
  82. echo "ac_cv_func_textdomain=no"
  83. echo "ac_cv_func_bindtextdomain=no"
  84. echo "ac_cv_lib_intl_bindtextdomain=no"
  85. ) >config.cache
  86. CC="%{l_cc}" \
  87. CFLAGS="%{l_cflags -O}" \
  88. ./configure \
  89. --cache-file=./config.cache \
  90. --prefix=%{l_prefix} \
  91. --without-gnu-malloc \
  92. --without-curses
  93. %{l_shtool} subst \
  94. -e 's;^\(#define.*SYS_PROFILE["^]*\).*;\1 "%{l_prefix}/etc/bash/profile";' \
  95. pathnames.h
  96. %{l_shtool} subst \
  97. -e 's;/etc/profile;%{l_prefix}/etc/bash/profile;' \
  98. doc/bash.1
  99. # build package
  100. %{l_make} %{l_mflags}
  101. %install
  102. # install package
  103. rm -rf $RPM_BUILD_ROOT
  104. %{l_make} %{l_mflags} install \
  105. prefix=$RPM_BUILD_ROOT%{l_prefix}
  106. # strip down installation
  107. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  108. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/bashbug.1
  109. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/bashbug
  110. strip $RPM_BUILD_ROOT%{l_prefix}/bin/bash
  111. # install global configuration
  112. %{l_shtool} mkdir -f -p -m 755 \
  113. $RPM_BUILD_ROOT%{l_prefix}/etc/bash
  114. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  115. %{SOURCE profile} $RPM_BUILD_ROOT%{l_prefix}/etc/bash/
  116. # determine installation files
  117. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  118. %{l_files_std} \
  119. '%config %{l_prefix}/etc/bash/profile'
  120. %files -f files
  121. %clean
  122. rm -rf $RPM_BUILD_ROOT
  123. %post
  124. if [ ".$1" = .1 ]; then
  125. # display note about login shell prerequisite
  126. if [ -f /etc/shells ]; then
  127. if [ ".`grep $RPM_INSTALL_PREFIX/bin/bash /etc/shells`" = . ]; then
  128. ( echo "Hint: To use $RPM_INSTALL_PREFIX/bin/bash as the login"
  129. echo "shell for users, please add this path to /etc/shells."
  130. ) | %{l_rpmtool} msg -b -t notice
  131. fi
  132. fi
  133. fi