Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37734805
en ru br
Репозитории ALT
5.1: 3.2.48-alt3
4.1: 3.2.33-alt1
4.0: 3.1.17-alt3
3.0: 2.05b-alt7
www.altlinux.org/Changes

Другие репозитории

Группа :: Интерпретаторы команд
Пакет: bash

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Name: bash
%define bash_version 3.1
%define bash_patchlevel 17
%define srcname %name-%bash_version
Version: %bash_version.%bash_patchlevel
Release: alt3

Summary: The GNU Bourne Again SHell (Bash)
Group: Shells
License: GPL
Url: http://www.gnu.org/software/%name/
Packager: Dmitry V. Levin <ldv at altlinux.org>

Source0: ftp://ftp.gnu.org/pub/gnu/%srcname.tar.bz2
Source1: ftp://ftp.gnu.org/pub/gnu/bash-doc-%bash_version.tar.bz2
Source2: bash_alias
Source3: bashrc

Patch1:  ftp://ftp.gnu.org/gnu/%name/%srcname-patches/bash31-001
Patch2:  ftp://ftp.gnu.org/gnu/%name/%srcname-patches/bash31-002
Patch3:  ftp://ftp.gnu.org/gnu/%name/%srcname-patches/bash31-003
Patch4:  ftp://ftp.gnu.org/gnu/%name/%srcname-patches/bash31-004
Patch5:  ftp://ftp.gnu.org/gnu/%name/%srcname-patches/bash31-005
Patch6:  ftp://ftp.gnu.org/gnu/%name/%srcname-patches/bash31-006
Patch7:  ftp://ftp.gnu.org/gnu/%name/%srcname-patches/bash31-007
Patch8:  ftp://ftp.gnu.org/gnu/%name/%srcname-patches/bash31-008
Patch9:  ftp://ftp.gnu.org/gnu/%name/%srcname-patches/bash31-009
Patch10: ftp://ftp.gnu.org/gnu/%name/%srcname-patches/bash31-010
Patch11: ftp://ftp.gnu.org/gnu/%name/%srcname-patches/bash31-011
Patch12: ftp://ftp.gnu.org/gnu/%name/%srcname-patches/bash31-012
Patch13: ftp://ftp.gnu.org/gnu/%name/%srcname-patches/bash31-013
Patch14: ftp://ftp.gnu.org/gnu/%name/%srcname-patches/bash31-014
Patch15: ftp://ftp.gnu.org/gnu/%name/%srcname-patches/bash31-015
Patch16: ftp://ftp.gnu.org/gnu/%name/%srcname-patches/bash31-016
Patch17: ftp://ftp.gnu.org/gnu/%name/%srcname-patches/bash31-017

Patch111: bash-3.1-owl-warnings.patch
Patch112: bash-3.1-owl-tmp.patch
Patch113: bash-3.1-owl-vitmp.patch

Patch121: bash-3.1-alt-defaults.patch
Patch122: bash-3.1-alt-winsize.patch
Patch123: bash-3.1-alt-bashbug.patch
Patch124: bash-3.1-alt-man.patch
Patch125: bash-3.1-alt-unbound.patch
Patch126: bash-3.1-alt-dlopen.patch

Patch130: bash-3.1-rh-login.patch
Patch131: bash-3.1-rh-ulimit.patch
Patch132: bash-3.1-rh-setlocale.patch
Patch133: bash-3.1-rh-read-memleak.patch
Patch134: bash-3.1-rh-alt-requires.patch
Patch135: bash-3.1-rh-man.patch
Patch136: bash-3.1-rh-info-tags.patch

Patch141: bash-3.1-deb-random.patch
Patch142: bash-3.1-deb-doc.patch

# bashbug produces a lot of unneeded dependencies.

AutoReq: yes, noshell

Requires: sh = %version-%release
Provides: bash2 = %version-%release
Obsoletes: bash2

BuildPreReq: libreadline-devel >= 5.1, mktemp >= 1:1.3.1

%package -n sh
Summary: The GNU Bourne Again SHell (/bin/sh)
Group: Shells
Provides: /bin/sh, /usr/lib/bash
Conflicts: %name < %version-%release
AutoReq: yes

%package doc
Group: Shells
Summary: Documentation for the GNU Bourne Again SHell
Requires: %name = %version-%release
Obsoletes: bash2-doc
AutoReq: yes

%package examples
Group: Development/Other
Summary: Examples for the GNU Bourne Again SHell
Requires: %name = %version-%release
Obsoletes: bash2-examples
AutoReq: yes

%package devel
Group: Development/Other
Summary: Bash loadable builtins development files
Requires: %name = %version-%release

%description
Bash is an sh-compatible command language interpreter that executes
commands read from the standard input or from a file.  Bash also
incorporates useful features from the Korn and C shells (ksh and csh).
Most sh scripts can be run by bash without modification.

Bash is ultimately intended to be a conformant implementation of the
IEEE POSIX Shell and Tools specification (IEEE Working Group 1003.2).

%description -n sh
Bash is an sh-compatible command language interpreter that executes
commands read from the standard input or from a file.  Bash also
incorporates useful features from the Korn and C shells (ksh and csh).
Most sh scripts can be run by bash without modification.

Bash is ultimately intended to be a conformant implementation of the
IEEE POSIX Shell and Tools specification (IEEE Working Group 1003.2).

This package contains /bin/sh.

%description doc
Bash is an sh-compatible command language interpreter that executes
commands read from the standard input or from a file.  Bash also
incorporates useful features from the Korn and C shells (ksh and csh).
Most sh scripts can be run by bash without modification.

Bash is ultimately intended to be a conformant implementation of the
IEEE POSIX Shell and Tools specification (IEEE Working Group 1003.2).

This package contains documentation for the GNU Bourne Again SHell.

%description examples
Bash is an sh-compatible command language interpreter that executes
commands read from the standard input or from a file.  Bash also
incorporates useful features from the Korn and C shells (ksh and csh).
Most sh scripts can be run by bash without modification.

Bash is ultimately intended to be a conformant implementation of the
IEEE POSIX Shell and Tools specification (IEEE Working Group 1003.2).

This package contains examples for the GNU Bourne Again SHell.

%description devel
Bash can dynamically load new builtin commands.
Included are the necessary headers to compile custom builtins.

%prep
%setup -q -a1 -n %srcname

# CWRU

%patch1 -p0
%patch2 -p0
%patch3 -p0
%patch4 -p0
%patch5 -p0
%patch6 -p0
%patch7 -p0
%patch8 -p0
%patch9 -p0
%patch10 -p0
%patch11 -p0
%patch12 -p0
%patch13 -p0
%patch14 -p0
%patch15 -p0
%patch16 -p0
%patch17 -p0

# Owl

%patch111 -p1
%patch112 -p1
%patch113 -p1

# ALT

%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1

# RH

%patch130 -p1
%patch131 -p1
%patch132 -p1
%patch133 -p1
%patch134 -p1
%patch135 -p1
%patch136 -p1

# DEB

%patch141 -p1
%patch142 -p1

# Remove files which should be regenerated during build.

rm configure y.tab.? doc/*.info*

# Bundled texi2dvi is outdated.

install -pm755 /usr/bin/texi2dvi support/

# Fix temporary file handling.

%__subst 's,/tmp/,,g' *.m4

# Would anyone volunteer to fix those? Probably not.

#find examples -type f -print0 |
# xargs -r0 grep -FlZ -- /tmp |
# xargs -r0 rm -fv --

find -type f -name \*.orig -delete -print

%build
autoconf

export \
LDFLAGS=-Wl,--as-needed \
bash_cv_dev_fd=standard \
bash_cv_dev_stdin=present \
bash_cv_mail_dir=/var/mail \
bash_cv_termcap_lib=libc \
%{?__buildreqs:bash_cv_must_reinstall_sighandlers=no} \
#

# Build sh.

%configure \
--without-bash-malloc \
--disable-readline \
--disable-command-timing \
--disable-net-redirections \
--disable-help-builtin \
--disable-bang-history \
--disable-history \
--disable-progcomp \
--disable-restricted \
#
# SMP-incompatible build.
%make
mv %name sh
%make clean

# Build bash.

%configure \
--without-bash-malloc \
--with-installed-readline \
--disable-command-timing \
--disable-net-redirections \
--enable-separate-helpfiles \
#
# SMP-incompatible build.
%make

%install
%makeinstall

install -pD -m755 sh %buildroot/bin/sh
mv %buildroot%_bindir/%name %buildroot/bin/%name
ln -s %name %buildroot/bin/bash2

# Make manpages for bash builtins as per suggestion in doc/README.

pushd doc
sed -e '
/^\.SH NAME/, /\\- bash built-in commands$/{
/^\.SH NAME/d
s/^bash, //
s/\\- bash built-in commands$//
s/,//g
b
}
d
' builtins.1 > man.pages
for f in `cat man.pages` ; do
ln -s builtins.1 "%buildroot%_man1dir/$f.1"
done
popd

# Those conflicts with real manpages from coreutils.

rm %buildroot%_man1dir/{echo,kill,printf,pwd,test}.1

ln -s %name %buildroot/bin/r%name
ln -s %name.1 %buildroot%_man1dir/sh.1
ln -s %name.1 %buildroot%_man1dir/bash2.1

install -pD -m755 %_sourcedir/bash_alias %buildroot%_sysconfdir/bashrc.d/alias.sh
install -p -m755 %_sourcedir/bashrc %buildroot%_sysconfdir/

# Directory for builtins

mkdir -p %buildroot/usr/lib/bash

# Include files for building custom builtins.

mkdir -p %buildroot%_includedir/bash
for f in examples/loadables/*.c; do
%__cc -MM -DHAVE_CONFIG_H -DSHELL -Iexamples/loadables -I. -Ilib -Ibuiltins -Iinclude "$f"
done |
tr -d '\:' |
tr -s '[:space:]' '\n' |
fgrep .h |
fgrep -v examples/loadables/ |
sort -u |
while read f; do
install -pm644 "$f" %buildroot%_includedir/bash/
done

# Prepare documentation.

%define docdir %_docdir/%name-%version
mkdir -p %buildroot%docdir/{html,ps,txt}
install -p -m644 \
AUTHORS CHANGES COMPAT NEWS NOTES POSIX RBASH doc/{FAQ,INTRO} \
%buildroot%docdir/
install -p -m644 doc/*.html %buildroot%docdir/html/
install -p -m644 doc/*.ps %buildroot%docdir/ps/
install -p -m644 doc/*.txt %buildroot%docdir/txt/
find %buildroot%docdir/{[A-Z],{ps,txt}/}* -type f -size +8k -print0 |
xargs -r0 bzip2 -9 --
cp -a examples %buildroot%docdir/
find %buildroot%docdir/examples/ -type f -name 'Makefile*' -delete -print

cat >%buildroot%docdir/examples/loadables/Makefile <<'EOF'
CC = %__cc
CPPFLAGS = -DHAVE_CONFIG_H -I. -I%_includedir/bash
CFLAGS = %optflags %optflags_shared
LDFLAGS = -shared -Wl,-soname,$ at

%%.so: %%.c
$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $ at
EOF

%find_lang %name

%files -n sh
/bin/sh
/usr/lib/bash

%files -f %name.lang
%config(noreplace) %_sysconfdir/bashrc*
/bin/*%{name}*
%_bindir/*
%_datadir/%name
%_mandir/man?/..?*
%_mandir/man?/*
%_infodir/*.info*
%dir %docdir
%docdir/[A-Z]*

%files doc
%dir %docdir
%docdir/html
%docdir/ps
%docdir/txt

%files examples
%dir %docdir
%docdir/examples

%files devel
%_includedir/*

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin