bash.spec 3.7 KB

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