Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37763592
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.2
%define bash_patchlevel 33
Version: %bash_version.%bash_patchlevel
Release: alt1

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

# ftp://ftp.gnu.org/gnu/bash/bash-%bash_version.tar.bz2

# ftp://ftp.gnu.org/gnu/bash/bash-%bash_version-patches/
Source0: bash-%version.tar
# ftp://ftp.gnu.org/gnu/bash/bash-doc-%bash_version.tar.bz2
Source1: bash-doc-%version.tar

Source2: bash_alias
Source3: bashrc

Patch: bash-%version-%release.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
%patch -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.

sed -i '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 --

sed -n '1,/^\.SH "BASH BUILTIN COMMANDS"/p' doc/builtins.1 >builtins.1
sed -n '/^\.\\" start of bash_builtins/,/^\.\\" bash_builtins/p' doc/bash.1 >>builtins.1
sed -n '/^\.SH SEE ALSO/,$p' doc/builtins.1 >>builtins.1
mv builtins.1 doc/builtins.1

sed -n '1,/^\.SH "RESTRICTED SHELL"/p' doc/rbash.1 >rbash.1
sed -n '/^\.\\" rbash\.1/,/^\.\\" end of rbash\.1/p' doc/bash.1 >> rbash.1
sed -n '/^\.SH SEE ALSO/,$p' doc/rbash.1 >>rbash.1
mv rbash.1 doc/rbash.1

%build
autoconf

export \
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
%{?!__buildreqs:%{?!_without_check:%{?!_disable_check:%make_build -k check}}}
%make clean

# Build bash.

%configure \
--without-bash-malloc \
--with-installed-readline \
--disable-command-timing \
--disable-net-redirections \
--enable-separate-helpfiles \
#
# SMP-incompatible build.
%make
%{?!__buildreqs:%{?!_without_check:%{?!_disable_check:%make_build -k check}}}

%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