2006-12-15 18:03:59 +01:00
|
|
|
#
|
2011-02-18 11:51:53 +01:00
|
|
|
# spec file for package bash
|
2006-12-15 18:03:59 +01:00
|
|
|
#
|
2011-02-18 11:51:53 +01:00
|
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2006-12-15 18:03:59 +01:00
|
|
|
#
|
2008-09-05 19:54:36 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2006-12-15 18:03:59 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2008-02-29 22:27:19 +01:00
|
|
|
|
2006-12-15 18:03:59 +01:00
|
|
|
Name: bash
|
2010-07-19 13:22:41 +02:00
|
|
|
BuildRequires: bison ncurses-devel
|
|
|
|
%if %suse_version > 1020
|
|
|
|
BuildRequires: fdupes
|
|
|
|
%endif
|
2009-12-14 23:28:55 +01:00
|
|
|
License: GPLv2+
|
2006-12-15 18:03:59 +01:00
|
|
|
Group: System/Shells
|
2011-03-08 13:18:13 +01:00
|
|
|
%define bash_vers 4.2
|
|
|
|
%define rl_vers 6.2
|
|
|
|
%define extend ""
|
2010-07-19 13:22:41 +02:00
|
|
|
%if %suse_version > 1020
|
2009-06-12 16:51:48 +02:00
|
|
|
Recommends: bash-lang = %bash_vers
|
2010-07-19 13:22:41 +02:00
|
|
|
# The package bash-completion is a source of
|
|
|
|
# bugs which will hit at most this package
|
|
|
|
#Recommends: bash-completion
|
2008-09-05 19:54:36 +02:00
|
|
|
Suggests: command-not-found
|
2011-02-18 11:51:53 +01:00
|
|
|
Recommends: bash-doc = %bash_vers
|
2010-07-19 13:22:41 +02:00
|
|
|
%endif
|
2011-03-08 13:18:13 +01:00
|
|
|
Version: 4.2
|
2011-06-22 10:46:38 +02:00
|
|
|
Release: 5
|
2006-12-15 18:03:59 +01:00
|
|
|
Summary: The GNU Bourne-Again Shell
|
2007-09-21 15:57:43 +02:00
|
|
|
Url: http://www.gnu.org/software/bash/bash.html
|
2011-06-20 11:03:29 +02:00
|
|
|
Source0: ftp://ftp.gnu.org/gnu/bash/bash-%{bash_vers}.tar.gz
|
|
|
|
Source1: ftp://ftp.gnu.org/gnu/readline/readline-%{rl_vers}.tar.gz
|
2006-12-15 18:03:59 +01:00
|
|
|
Source2: bash-%{bash_vers}-patches.tar.bz2
|
|
|
|
Source3: readline-%{rl_vers}-patches.tar.bz2
|
|
|
|
Source4: run-tests
|
2007-12-12 22:07:41 +01:00
|
|
|
Source5: dot.bashrc
|
|
|
|
Source6: dot.profile
|
|
|
|
Source7: bash-rpmlintrc
|
2009-12-16 08:57:10 +01:00
|
|
|
Source8: baselibs.conf
|
2011-03-09 12:02:20 +01:00
|
|
|
# Remember unsafe method, compare with
|
|
|
|
# http://lists.gnu.org/archive/html/bug-bash/2011-03/msg00070.html
|
|
|
|
# http://lists.gnu.org/archive/html/bug-bash/2011-03/msg00071.html
|
|
|
|
# http://lists.gnu.org/archive/html/bug-bash/2011-03/msg00073.html
|
|
|
|
Source9: bash-4.2-history-myown.dif.bz2
|
2006-12-15 18:03:59 +01:00
|
|
|
Patch0: bash-%{bash_vers}.dif
|
|
|
|
Patch1: bash-2.03-manual.patch
|
2009-03-03 18:12:53 +01:00
|
|
|
Patch2: bash-4.0-security.patch
|
2011-03-08 13:18:13 +01:00
|
|
|
Patch3: bash-4.2-2.4.4.patch
|
2006-12-15 18:03:59 +01:00
|
|
|
Patch4: bash-3.0-evalexp.patch
|
|
|
|
Patch5: bash-3.0-warn-locale.patch
|
2011-11-11 14:55:13 +01:00
|
|
|
Patch6: bash-4.2-endpw.dif
|
2006-12-15 18:03:59 +01:00
|
|
|
Patch7: bash-3.0-decl.patch
|
2009-09-10 12:39:25 +02:00
|
|
|
Patch8: bash-4.0-async-bnc523667.dif
|
2009-03-03 18:12:53 +01:00
|
|
|
Patch9: bash-4.0-extended_quote.patch
|
2006-12-15 18:03:59 +01:00
|
|
|
Patch10: bash-3.2-printf.patch
|
2009-03-03 18:12:53 +01:00
|
|
|
Patch11: bash-4.0-loadables.dif
|
2010-03-09 15:35:20 +01:00
|
|
|
Patch12: bash-4.1-completion.dif
|
2011-11-11 16:29:47 +01:00
|
|
|
Patch13: bash-4.2-nscdunmap.dif
|
2011-03-08 13:18:13 +01:00
|
|
|
Patch14: bash-4.2-sigrestart.patch
|
2008-04-25 15:34:05 +02:00
|
|
|
Patch15: bash-3.2-longjmp.dif
|
2009-03-03 18:12:53 +01:00
|
|
|
Patch16: bash-4.0-setlocale.dif
|
2009-06-12 16:51:48 +02:00
|
|
|
Patch17: bash-4.0-headers.dif
|
2006-12-15 18:03:59 +01:00
|
|
|
Patch20: readline-%{rl_vers}.dif
|
|
|
|
Patch21: readline-4.3-input.dif
|
2010-02-18 12:17:29 +01:00
|
|
|
Patch22: readline-6.1-wrap.patch
|
2006-12-15 18:03:59 +01:00
|
|
|
Patch23: readline-5.2-conf.patch
|
2011-03-08 13:18:13 +01:00
|
|
|
Patch24: readline-6.2-metamode.patch
|
2011-11-11 14:55:13 +01:00
|
|
|
Patch25: readline-6.2-endpw.dif
|
2011-03-08 13:18:13 +01:00
|
|
|
Patch30: readline-6.2-destdir.patch
|
2010-02-18 12:17:29 +01:00
|
|
|
Patch40: bash-4.1-bash.bashrc.dif
|
2010-09-09 14:46:02 +02:00
|
|
|
Patch46: man2html-no-timestamp.patch
|
2006-12-15 18:03:59 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2007-12-12 22:07:41 +01:00
|
|
|
%global _sysconfdir /etc
|
|
|
|
%global _incdir %{_includedir}
|
2009-06-12 16:51:48 +02:00
|
|
|
%global _ldldir /%{_lib}/bash
|
2009-02-19 17:52:11 +01:00
|
|
|
%global _minsh 0
|
2009-03-03 18:12:53 +01:00
|
|
|
%{expand: %%global rl_major %(echo %{rl_vers} | sed -r 's/.[0-9]+//g')}
|
2006-12-15 18:03:59 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Bash is an sh-compatible command interpreter that executes commands
|
|
|
|
read from standard input or from a file. Bash incorporates useful
|
|
|
|
features from the Korn and C shells (ksh and csh). Bash is intended to
|
|
|
|
be a conformant implementation of the IEEE Posix Shell and Tools
|
|
|
|
specification (IEEE Working Group 1003.2).
|
|
|
|
|
2007-08-03 17:30:00 +02:00
|
|
|
%package -n bash-doc
|
2009-12-14 23:28:55 +01:00
|
|
|
License: GPLv2+
|
2007-08-03 17:30:00 +02:00
|
|
|
Summary: Documentation how to Use the GNU Bourne-Again Shell
|
|
|
|
Group: Documentation/Man
|
2007-12-12 22:07:41 +01:00
|
|
|
Provides: bash:%{_infodir}/bash.info.gz
|
|
|
|
PreReq: %install_info_prereq
|
2011-03-08 13:18:13 +01:00
|
|
|
Version: 4.2
|
2011-06-22 10:46:38 +02:00
|
|
|
Release: 5
|
2010-02-18 12:17:29 +01:00
|
|
|
%if %suse_version > 1120
|
2009-12-18 12:33:21 +01:00
|
|
|
BuildArch: noarch
|
2010-02-18 12:17:29 +01:00
|
|
|
%endif
|
2007-08-03 17:30:00 +02:00
|
|
|
|
|
|
|
%description -n bash-doc
|
|
|
|
This package contains the documentation for using the bourne shell
|
|
|
|
interpreter Bash.
|
|
|
|
|
2010-07-19 13:22:41 +02:00
|
|
|
%if %{defined lang_package}
|
2009-06-12 16:51:48 +02:00
|
|
|
%lang_package(bash)
|
2010-07-19 13:22:41 +02:00
|
|
|
%else
|
|
|
|
|
|
|
|
%package -n bash-lang
|
|
|
|
License: GPLv2+
|
|
|
|
Summary: Languages for package bash
|
|
|
|
Group: System/Localization
|
|
|
|
Provides: bash-lang = %{version}
|
|
|
|
Requires: bash = %{version}
|
|
|
|
|
|
|
|
%description -n bash-lang
|
|
|
|
Provides translations to the package bash
|
|
|
|
%endif
|
|
|
|
|
2009-06-12 16:51:48 +02:00
|
|
|
%package -n bash-devel
|
2009-12-14 23:28:55 +01:00
|
|
|
License: GPLv2+
|
2009-06-12 16:51:48 +02:00
|
|
|
Summary: Include Files mandatory for Development of bash loadable builtins
|
|
|
|
Group: Development/Languages/C and C++
|
2011-03-08 13:18:13 +01:00
|
|
|
Version: 4.2
|
2011-06-22 10:46:38 +02:00
|
|
|
Release: 5
|
2009-06-12 16:51:48 +02:00
|
|
|
|
|
|
|
%description -n bash-devel
|
|
|
|
This package contains the C header files for writing loadable new
|
|
|
|
builtins for the interpreter Bash. Use -I /usr/include/bash/<version>
|
|
|
|
on the compilers command line.
|
|
|
|
|
|
|
|
%package -n bash-loadables
|
2009-12-14 23:28:55 +01:00
|
|
|
License: GPLv2+
|
2009-06-12 16:51:48 +02:00
|
|
|
Summary: Loadable bash builtins
|
|
|
|
Group: System/Shells
|
2011-03-08 13:18:13 +01:00
|
|
|
Version: 4.2
|
2011-06-22 10:46:38 +02:00
|
|
|
Release: 5
|
2009-06-12 16:51:48 +02:00
|
|
|
|
|
|
|
%description -n bash-loadables
|
|
|
|
This package contains the examples for the ready-to-dynamic-load
|
|
|
|
builtins found in the source tar ball of the bash:
|
|
|
|
|
|
|
|
basename Return non-directory portion of pathname.
|
|
|
|
|
|
|
|
cut cut(1) replacement.
|
|
|
|
|
|
|
|
dirname Return directory portion of pathname.
|
|
|
|
|
|
|
|
finfo Print file info.
|
|
|
|
|
|
|
|
getconf POSIX.2 getconf utility.
|
|
|
|
|
|
|
|
head Copy first part of files.
|
|
|
|
|
|
|
|
id POSIX.2 user identity.
|
|
|
|
|
|
|
|
ln Make links.
|
|
|
|
|
|
|
|
logname Print login name of current user.
|
|
|
|
|
|
|
|
mkdir Make directories.
|
|
|
|
|
|
|
|
pathchk Check pathnames for validity and portability.
|
|
|
|
|
|
|
|
print Loadable ksh-93 style print builtin.
|
|
|
|
|
|
|
|
printenv Minimal builtin clone of BSD printenv(1).
|
|
|
|
|
|
|
|
push Anyone remember TOPS-20?
|
|
|
|
|
|
|
|
realpath Canonicalize pathnames, resolving symlinks.
|
|
|
|
|
|
|
|
rmdir Remove directory.
|
|
|
|
|
|
|
|
sleep sleep for fractions of a second.
|
|
|
|
|
|
|
|
strftime Loadable builtin interface to strftime(3).
|
|
|
|
|
|
|
|
sync Sync the disks by forcing pending filesystem writes to
|
|
|
|
complete.
|
|
|
|
|
|
|
|
tee Duplicate standard input.
|
|
|
|
|
|
|
|
tty Return terminal name.
|
|
|
|
|
|
|
|
uname Print system information.
|
|
|
|
|
|
|
|
unlink Remove a directory entry.
|
|
|
|
|
|
|
|
whoami Print out username of current user.
|
|
|
|
|
|
|
|
|
2009-03-03 18:12:53 +01:00
|
|
|
%package -n libreadline6
|
2009-12-14 23:28:55 +01:00
|
|
|
License: GPLv2+
|
2006-12-15 18:03:59 +01:00
|
|
|
Summary: The Readline Library
|
|
|
|
Group: System/Libraries
|
2009-03-03 18:12:53 +01:00
|
|
|
Provides: bash:/%{_lib}/libreadline.so.%{rl_major}
|
2011-03-08 13:18:13 +01:00
|
|
|
Version: 6.2
|
2011-06-22 10:46:38 +02:00
|
|
|
Release: 5
|
2010-07-19 13:22:41 +02:00
|
|
|
%if %suse_version > 1020
|
2007-08-03 19:53:05 +02:00
|
|
|
Recommends: readline-doc = %{version}
|
2010-07-19 13:22:41 +02:00
|
|
|
%endif
|
2009-01-14 17:47:42 +01:00
|
|
|
# bug437293
|
|
|
|
%ifarch ppc64
|
|
|
|
Obsoletes: readline-64bit
|
|
|
|
%endif
|
|
|
|
#
|
2011-03-08 13:18:13 +01:00
|
|
|
Provides: readline = 6.2
|
|
|
|
Obsoletes: readline <= 6.1
|
2006-12-15 18:03:59 +01:00
|
|
|
|
2009-03-03 18:12:53 +01:00
|
|
|
%description -n libreadline6
|
2006-12-15 18:03:59 +01:00
|
|
|
The readline library is used by the Bourne Again Shell (bash, the
|
|
|
|
standard command interpreter) for easy editing of command lines. This
|
|
|
|
includes history and search functionality.
|
|
|
|
|
|
|
|
%package -n readline-devel
|
2009-12-14 23:28:55 +01:00
|
|
|
License: GPLv2+
|
2008-02-29 22:27:19 +01:00
|
|
|
Summary: Include Files and Libraries mandatory for Development
|
2006-12-15 18:03:59 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2007-12-12 22:07:41 +01:00
|
|
|
Provides: bash:%{_libdir}/libreadline.a
|
2011-03-08 13:18:13 +01:00
|
|
|
Version: 6.2
|
2011-06-22 10:46:38 +02:00
|
|
|
Release: 5
|
2009-03-03 18:12:53 +01:00
|
|
|
Requires: libreadline6 = %{version}
|
2007-08-04 08:35:21 +02:00
|
|
|
Requires: ncurses-devel
|
2010-07-19 13:22:41 +02:00
|
|
|
%if %suse_version > 1020
|
2007-08-03 17:30:00 +02:00
|
|
|
Recommends: readline-doc = %{version}
|
2010-07-19 13:22:41 +02:00
|
|
|
%endif
|
2009-01-14 17:47:42 +01:00
|
|
|
# bug437293
|
|
|
|
%ifarch ppc64
|
|
|
|
Obsoletes: readline-devel-64bit
|
|
|
|
%endif
|
|
|
|
#
|
2006-12-15 18:03:59 +01:00
|
|
|
|
|
|
|
%description -n readline-devel
|
|
|
|
This package contains all necessary include files and libraries needed
|
|
|
|
to develop applications that require these.
|
|
|
|
|
2007-08-03 17:30:00 +02:00
|
|
|
%package -n readline-doc
|
2009-12-14 23:28:55 +01:00
|
|
|
License: GPLv2+
|
2008-04-25 15:34:05 +02:00
|
|
|
Summary: Documentation how to Use and Program with the Readline Library
|
2007-08-03 17:30:00 +02:00
|
|
|
Group: System/Libraries
|
2007-12-12 22:07:41 +01:00
|
|
|
Provides: readline:%{_infodir}/readline.info.gz
|
|
|
|
PreReq: %install_info_prereq
|
2011-03-08 13:18:13 +01:00
|
|
|
Version: 6.2
|
2011-06-22 10:46:38 +02:00
|
|
|
Release: 5
|
2010-02-18 12:17:29 +01:00
|
|
|
%if %suse_version > 1120
|
2009-12-18 12:33:21 +01:00
|
|
|
BuildArch: noarch
|
2010-02-18 12:17:29 +01:00
|
|
|
%endif
|
2007-08-03 17:30:00 +02:00
|
|
|
|
|
|
|
%description -n readline-doc
|
|
|
|
This package contains the documentation for using the readline library
|
|
|
|
as well as programming with the interface of the readline library.
|
|
|
|
|
2006-12-15 18:03:59 +01:00
|
|
|
%prep
|
2011-03-08 13:18:13 +01:00
|
|
|
%setup -q -n bash-%{bash_vers}%{extend} -b1 -b2 -b3
|
2006-12-15 18:03:59 +01:00
|
|
|
for p in ../bash-%{bash_vers}-patches/*; do
|
|
|
|
test -e $p || break
|
2011-11-02 09:24:01 +01:00
|
|
|
test "${p##*/}" = "bash-4.2-pwd.patch" && continue
|
2006-12-15 18:03:59 +01:00
|
|
|
echo Patch $p
|
|
|
|
patch -s -p0 < $p
|
|
|
|
done
|
|
|
|
unset p
|
|
|
|
%patch1 -p0 -b .manual
|
|
|
|
%patch2 -p0 -b .security
|
|
|
|
%patch3 -p0 -b .2.4.4
|
|
|
|
%patch4 -p0 -b .evalexp
|
|
|
|
%patch5 -p0 -b .warnlc
|
2011-11-11 14:55:13 +01:00
|
|
|
%patch6 -p0 -b .endpw
|
2006-12-15 18:03:59 +01:00
|
|
|
%patch7 -p0 -b .decl
|
2009-09-10 12:39:25 +02:00
|
|
|
%patch8 -p0 -b .async
|
2006-12-15 18:03:59 +01:00
|
|
|
%patch9 -p0 -b .extended_quote
|
|
|
|
%patch10 -p0 -b .printf
|
|
|
|
%patch11 -p0 -b .plugins
|
2010-03-09 15:35:20 +01:00
|
|
|
%patch12 -p0 -b .completion
|
2011-11-11 16:29:47 +01:00
|
|
|
%patch13 -p0 -b .nscdunmap
|
2008-01-12 02:40:35 +01:00
|
|
|
%patch14 -p0 -b .sigrestart
|
2008-04-25 15:34:05 +02:00
|
|
|
%patch15 -p0 -b .longjmp
|
2008-12-03 16:18:51 +01:00
|
|
|
%patch16 -p0 -b .setlocale
|
2009-06-12 16:51:48 +02:00
|
|
|
%patch17 -p0 -b .headers
|
2006-12-15 18:03:59 +01:00
|
|
|
%patch21 -p0 -b .zerotty
|
|
|
|
%patch22 -p0 -b .wrap
|
|
|
|
%patch23 -p0 -b .conf
|
2009-09-30 13:42:55 +02:00
|
|
|
%patch24 -p0 -b .metamode
|
2011-11-11 14:55:13 +01:00
|
|
|
%patch25 -p0 -b .endpw
|
2010-02-18 12:17:29 +01:00
|
|
|
%patch40 -p0 -b .bashrc
|
2011-03-08 13:18:13 +01:00
|
|
|
%patch46 -p0 -b .notimestamp
|
|
|
|
%patch0 -p0 -b .0
|
|
|
|
pushd ../readline-%{rl_vers}%{extend}
|
2006-12-15 18:03:59 +01:00
|
|
|
for p in ../readline-%{rl_vers}-patches/*; do
|
|
|
|
test -e $p || break
|
|
|
|
echo Patch $p
|
|
|
|
patch -s -p0 < $p
|
|
|
|
done
|
|
|
|
%patch21 -p2 -b .zerotty
|
|
|
|
%patch22 -p2 -b .wrap
|
|
|
|
%patch23 -p2 -b .conf
|
2009-09-30 13:42:55 +02:00
|
|
|
%patch24 -p2 -b .metamode
|
2011-11-11 14:55:13 +01:00
|
|
|
%patch25 -p2 -b .endpw
|
2006-12-15 18:03:59 +01:00
|
|
|
%patch30 -p0 -b .destdir
|
2011-03-08 13:18:13 +01:00
|
|
|
%patch20 -p0 -b .0
|
2006-12-15 18:03:59 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
LANG=POSIX
|
|
|
|
LC_ALL=$LANG
|
|
|
|
unset LC_CTYPE
|
|
|
|
CPU=$(uname -m 2> /dev/null)
|
|
|
|
HOSTTYPE=${CPU}
|
|
|
|
MACHTYPE=${CPU}-suse-linux
|
|
|
|
export LANG LC_ALL HOSTTYPE MACHTYPE
|
2011-03-08 13:18:13 +01:00
|
|
|
pushd ../readline-%{rl_vers}%{extend}
|
2006-12-15 18:03:59 +01:00
|
|
|
%{?suse_update_config:%{suse_update_config -f support}}
|
|
|
|
autoconf
|
2008-04-25 15:34:05 +02:00
|
|
|
cflags ()
|
|
|
|
{
|
|
|
|
local flag=$1; shift
|
2010-07-19 13:22:41 +02:00
|
|
|
local var=$1; shift
|
|
|
|
test -n "${flag}" -a -n "${var}" || return
|
|
|
|
case "${!var}" in
|
2008-04-25 15:34:05 +02:00
|
|
|
*${flag}*) return
|
|
|
|
esac
|
2011-11-18 13:04:20 +01:00
|
|
|
set -o noclobber
|
2010-07-19 13:22:41 +02:00
|
|
|
case "$flag" in
|
|
|
|
-Wl,*)
|
2011-11-18 13:04:20 +01:00
|
|
|
if echo 'int main () { return 0; }' | \
|
|
|
|
${CC:-gcc} -Werror $flag -o /dev/null -xc - > /dev/null 2>&1 ; then
|
2010-07-19 13:22:41 +02:00
|
|
|
eval $var=\${$var:+\$$var\ }$flag
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
if ${CC:-gcc} -Werror $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then
|
|
|
|
eval $var=\${$var:+\$$var\ }$flag
|
|
|
|
fi
|
|
|
|
if ${CXX:-g++} -Werror $flag -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1 ; then
|
|
|
|
eval $var=\${$var:+\$$var\ }$flag
|
|
|
|
fi
|
|
|
|
esac
|
2011-11-18 13:04:20 +01:00
|
|
|
set +o noclobber
|
2008-04-25 15:34:05 +02:00
|
|
|
}
|
2009-02-19 17:52:11 +01:00
|
|
|
echo 'int main () { return !(sizeof(void*) >= 8); }' | gcc -x c -o test64 -
|
|
|
|
if ./test64 ; then
|
|
|
|
LARGEFILE=""
|
|
|
|
else
|
|
|
|
LARGEFILE="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
|
|
|
|
fi
|
|
|
|
rm -f ./test64
|
|
|
|
CFLAGS="$RPM_OPT_FLAGS $LARGEFILE -D_GNU_SOURCE -DRECYCLES_PIDS -Wall -g"
|
2008-11-03 11:56:52 +01:00
|
|
|
LDFLAGS=""
|
2008-04-25 15:34:05 +02:00
|
|
|
cflags -std=gnu89 CFLAGS
|
|
|
|
cflags -Wuninitialized CFLAGS
|
|
|
|
cflags -Wextra CFLAGS
|
|
|
|
cflags -Wno-unprototyped-calls CFLAGS
|
|
|
|
cflags -Wno-switch-enum CFLAGS
|
2009-03-03 18:12:53 +01:00
|
|
|
cflags -Wno-unused-variable CFLAGS
|
|
|
|
cflags -Wno-unused-parameter CFLAGS
|
2009-02-19 17:52:11 +01:00
|
|
|
cflags -ftree-loop-linear CFLAGS
|
2008-04-25 15:34:05 +02:00
|
|
|
cflags -pipe CFLAGS
|
2008-11-03 11:56:52 +01:00
|
|
|
cflags -Wl,--as-needed LDFLAGS
|
2009-05-15 21:21:59 +02:00
|
|
|
cflags -Wl,-O2 LDFLAGS
|
2011-11-18 13:04:20 +01:00
|
|
|
cflags -Wl,--hash-size=8599 LDFLAGS
|
|
|
|
cflags -Wl,-Bsymbolic-functions LDFLAGS
|
2009-06-12 16:51:48 +02:00
|
|
|
cflags -Wl,-rpath,%{_ldldir}/%{bash_vers} LDFLAGS
|
2008-04-25 15:34:05 +02:00
|
|
|
CC=gcc
|
|
|
|
CC_FOR_BUILD="$CC"
|
|
|
|
CFLAGS_FOR_BUILD="$CFLAGS"
|
2008-11-03 11:56:52 +01:00
|
|
|
LDFLAGS_FOR_BUILD="$LDFLAGS"
|
|
|
|
export CC_FOR_BUILD CFLAGS_FOR_BUILD LDFLAGS_FOR_BUILD CFLAGS LDFLAGS CC
|
2010-07-19 13:22:41 +02:00
|
|
|
./configure --disable-static --build=%{_target_cpu}-suse-linux \
|
2007-12-12 22:07:41 +01:00
|
|
|
--prefix=%{_prefix} \
|
2006-12-15 18:03:59 +01:00
|
|
|
--with-curses \
|
|
|
|
--mandir=%{_mandir} \
|
|
|
|
--infodir=%{_infodir} \
|
|
|
|
--libdir=%{_libdir}
|
|
|
|
make
|
|
|
|
make documentation
|
|
|
|
ln -sf shlib/libreadline.so.%{rl_vers} libreadline.so
|
2009-03-03 18:12:53 +01:00
|
|
|
ln -sf shlib/libreadline.so.%{rl_vers} libreadline.so.%{rl_major}
|
2006-12-15 18:03:59 +01:00
|
|
|
ln -sf shlib/libhistory.so.%{rl_vers} libhistory.so
|
2009-03-03 18:12:53 +01:00
|
|
|
ln -sf shlib/libhistory.so.%{rl_vers} libhistory.so.%{rl_major}
|
2011-03-08 13:18:13 +01:00
|
|
|
popd
|
2006-12-15 18:03:59 +01:00
|
|
|
# /proc is required for correct configuration
|
|
|
|
test -d /dev/fd || { echo "/proc is not mounted!" >&2; exit 1; }
|
|
|
|
ln -sf ../readline-%{rl_vers} readline
|
2011-11-18 13:04:20 +01:00
|
|
|
LD_LIBRARY_PATH=$PWD/../readline-%{rl_vers}
|
|
|
|
export LD_LIBRARY_PATH
|
|
|
|
LDFLAGS="${LDFLAGS/hash-size=8599/hash-size=16699}"
|
2008-04-25 15:34:05 +02:00
|
|
|
CC="gcc -I$PWD -L$PWD/../readline-%{rl_vers}"
|
2009-02-19 17:52:11 +01:00
|
|
|
%if %_minsh
|
|
|
|
cflags -Os CFLAGS
|
|
|
|
# cflags -U_FORTIFY_SOURCE CFLAGS
|
|
|
|
# cflags -funswitch-loops CFLAGS
|
|
|
|
# cflags -ftree-loop-im CFLAGS
|
|
|
|
# cflags -ftree-loop-ivcanon CFLAGS
|
|
|
|
# cflags -fprefetch-loop-arrays CFLAGS
|
|
|
|
# cflags -fno-stack-protector CFLAGS
|
|
|
|
# cflags -fno-unwind-tables CFLAGS
|
|
|
|
# cflags -fno-asynchronous-unwind-tables CFLAGS
|
|
|
|
%endif
|
2008-04-25 15:34:05 +02:00
|
|
|
CC_FOR_BUILD="$CC"
|
2006-12-15 18:03:59 +01:00
|
|
|
CFLAGS_FOR_BUILD="$CFLAGS"
|
2008-04-25 15:34:05 +02:00
|
|
|
export CC_FOR_BUILD CFLAGS_FOR_BUILD CFLAGS LDFLAGS CC
|
2006-12-15 18:03:59 +01:00
|
|
|
%{?suse_update_config:%{suse_update_config -f support}}
|
2008-04-25 15:34:05 +02:00
|
|
|
autoconf
|
2006-12-15 18:03:59 +01:00
|
|
|
#
|
|
|
|
# We have a malloc with our glibc
|
|
|
|
#
|
|
|
|
SYSMALLOC="
|
|
|
|
--without-gnu-malloc
|
2009-03-03 18:12:53 +01:00
|
|
|
--without-bash-malloc
|
2006-12-15 18:03:59 +01:00
|
|
|
"
|
|
|
|
#
|
|
|
|
# System readline library (comment out it not to be used)
|
|
|
|
#
|
|
|
|
READLINE="
|
|
|
|
--with-installed-readline
|
|
|
|
"
|
|
|
|
bash support/mkconffiles -v
|
2009-02-19 17:52:11 +01:00
|
|
|
%if %_minsh
|
|
|
|
./configure --build=%{_target_cpu}-suse-linux \
|
|
|
|
--prefix=%{_prefix} \
|
|
|
|
--mandir=%{_mandir} \
|
|
|
|
--infodir=%{_infodir} \
|
|
|
|
--libdir=%{_libdir} \
|
|
|
|
--with-curses \
|
2009-06-05 22:32:36 +02:00
|
|
|
--with-afs \
|
|
|
|
$SYSMALLOC \
|
2009-02-19 17:52:11 +01:00
|
|
|
--enable-minimal-config \
|
|
|
|
--enable-arith-for-command \
|
|
|
|
--enable-array-variables \
|
|
|
|
--enable-brace-expansion \
|
2009-03-03 18:12:53 +01:00
|
|
|
--enable-casemod-attributes \
|
|
|
|
--enable-casemod-expansion \
|
|
|
|
--enable-command-timing \
|
2009-02-19 17:52:11 +01:00
|
|
|
--enable-cond-command \
|
|
|
|
--enable-cond-regexp \
|
2009-03-03 18:12:53 +01:00
|
|
|
--enable-coprocesses \
|
2009-02-19 17:52:11 +01:00
|
|
|
--enable-directory-stack \
|
|
|
|
--enable-dparen-arithmetic \
|
|
|
|
--enable-extended-glob \
|
|
|
|
--enable-job-control \
|
|
|
|
--enable-net-redirections \
|
|
|
|
--enable-process-substitution \
|
|
|
|
--disable-strict-posix-default \
|
|
|
|
--enable-separate-helpfiles=%{_datadir}/bash/helpfiles \
|
|
|
|
$READLINE
|
|
|
|
make Program=sh sh
|
|
|
|
make distclean
|
|
|
|
%endif
|
2006-12-15 18:03:59 +01:00
|
|
|
./configure --build=%{_target_cpu}-suse-linux \
|
2007-12-12 22:07:41 +01:00
|
|
|
--prefix=%{_prefix} \
|
2006-12-15 18:03:59 +01:00
|
|
|
--mandir=%{_mandir} \
|
|
|
|
--infodir=%{_infodir} \
|
|
|
|
--libdir=%{_libdir} \
|
|
|
|
--with-curses \
|
2009-06-05 22:32:36 +02:00
|
|
|
--with-afs \
|
2006-12-15 18:03:59 +01:00
|
|
|
$SYSMALLOC \
|
|
|
|
--enable-job-control \
|
|
|
|
--enable-alias \
|
|
|
|
--enable-readline \
|
|
|
|
--enable-history \
|
|
|
|
--enable-bang-history \
|
|
|
|
--enable-directory-stack \
|
|
|
|
--enable-process-substitution \
|
|
|
|
--enable-prompt-string-decoding \
|
|
|
|
--enable-select \
|
|
|
|
--enable-help-builtin \
|
|
|
|
--enable-array-variables \
|
|
|
|
--enable-brace-expansion \
|
|
|
|
--enable-command-timing \
|
|
|
|
--enable-disabled-builtins \
|
2009-02-19 17:52:11 +01:00
|
|
|
--disable-strict-posix-default \
|
|
|
|
--enable-separate-helpfiles=%{_datadir}/bash/helpfiles \
|
2006-12-15 18:03:59 +01:00
|
|
|
$READLINE
|
2009-03-03 18:12:53 +01:00
|
|
|
make %{?do_profiling:CFLAGS="$CFLAGS %cflags_profile_generate"} \
|
|
|
|
all printenv recho zecho xcase
|
2010-07-19 13:22:41 +02:00
|
|
|
TMPDIR=$(mktemp -d /tmp/bash.XXXXXXXXXX) || exit 1
|
|
|
|
env -i HOME=$PWD TERM=$TERM LD_LIBRARY_PATH=$LD_LIBRARY_PATH TMPDIR=$TMPDIR make TESTSCRIPT=%{SOURCE4} check
|
2009-03-03 18:12:53 +01:00
|
|
|
make %{?do_profiling:CFLAGS="$CFLAGS %cflags_profile_feedback" clean} all
|
2006-12-15 18:03:59 +01:00
|
|
|
make -C examples/loadables/
|
|
|
|
make documentation
|
|
|
|
|
|
|
|
%install
|
2011-03-08 13:18:13 +01:00
|
|
|
pushd ../readline-%{rl_vers}%{extend}
|
2009-03-03 18:12:53 +01:00
|
|
|
make install htmldir=%{_defaultdocdir}/readline \
|
|
|
|
installdir=%{_defaultdocdir}/readline/examples DESTDIR=%{buildroot}
|
2007-12-12 22:07:41 +01:00
|
|
|
make install-shared libdir=/%{_lib} linkagedir=%{_libdir} DESTDIR=%{buildroot}
|
|
|
|
rm -rf %{buildroot}%{_defaultdocdir}/bash
|
|
|
|
mkdir -p %{buildroot}%{_defaultdocdir}/bash
|
|
|
|
chmod 0755 %{buildroot}/%{_lib}/libhistory.so.%{rl_vers}
|
|
|
|
chmod 0755 %{buildroot}/%{_lib}/libreadline.so.%{rl_vers}
|
2009-03-04 14:52:25 +01:00
|
|
|
rm -vf %{buildroot}/%{_lib}/libhistory.so.%{rl_vers}*old
|
|
|
|
rm -vf %{buildroot}/%{_lib}/libreadline.so.%{rl_vers}*old
|
|
|
|
rm -vf %{buildroot}/%{_lib}/libhistory.so
|
|
|
|
rm -vf %{buildroot}/%{_lib}/libreadline.so
|
|
|
|
ln -sf /%{_lib}/libhistory.so.%{rl_vers} %{buildroot}/%{_libdir}/libhistory.so
|
|
|
|
ln -sf /%{_lib}/libreadline.so.%{rl_vers} %{buildroot}/%{_libdir}/libreadline.so
|
2011-03-08 13:18:13 +01:00
|
|
|
popd
|
2007-12-12 22:07:41 +01:00
|
|
|
make install DESTDIR=%{buildroot}
|
2009-06-12 16:51:48 +02:00
|
|
|
make -C examples/loadables/ install-plugins DESTDIR=%{buildroot} libdir=/%{_lib}
|
|
|
|
make -C examples/loadables/ install-headers DESTDIR=%{buildroot}
|
2007-12-12 22:07:41 +01:00
|
|
|
mkdir -p %{buildroot}/bin
|
|
|
|
mv %{buildroot}%{_bindir}/bash %{buildroot}/bin/
|
2009-02-19 17:52:11 +01:00
|
|
|
%if %_minsh
|
|
|
|
install sh %{buildroot}/bin/sh
|
|
|
|
ln -sf ../../bin/sh %{buildroot}%{_bindir}/sh
|
|
|
|
%else
|
2007-12-12 22:07:41 +01:00
|
|
|
ln -sf bash %{buildroot}/bin/sh
|
|
|
|
ln -sf ../../bin/bash %{buildroot}%{_bindir}/sh
|
2009-02-19 17:52:11 +01:00
|
|
|
%endif
|
2007-12-12 22:07:41 +01:00
|
|
|
ln -sf ../../bin/bash %{buildroot}%{_bindir}/rbash
|
|
|
|
install -m 644 COMPAT NEWS %{buildroot}%{_defaultdocdir}/bash/
|
|
|
|
install -m 644 COPYING %{buildroot}%{_defaultdocdir}/bash/
|
|
|
|
install -m 644 doc/FAQ %{buildroot}%{_defaultdocdir}/bash/
|
|
|
|
install -m 644 doc/INTRO %{buildroot}%{_defaultdocdir}/bash/
|
|
|
|
install -m 644 doc/*.html %{buildroot}%{_defaultdocdir}/bash/
|
|
|
|
install -m 644 doc/builtins.1 %{buildroot}%{_mandir}/man1/bashbuiltins.1
|
|
|
|
install -m 644 doc/rbash.1 %{buildroot}%{_mandir}/man1/rbash.1
|
|
|
|
gzip -9f %{buildroot}%{_infodir}/*.inf*[^z] || true
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
|
|
|
|
sed 's/^|//' > %{buildroot}%{_defaultdocdir}/bash/BUGS <<\EOF
|
2006-12-15 18:03:59 +01:00
|
|
|
Known problems
|
|
|
|
--------------
|
|
|
|
|
|
|
|
|
This version of bash/readline supports multi byte handling
|
|
|
|
that is e.g. wide character support for UTF-8. This causes
|
|
|
|
problems in geting the current cursor position within the
|
|
|
|
readline runtime library:
|
|
|
|
|
|
|
|
|
bash-%{bash_vers}> LANG=ja_JP
|
|
|
|
bash-%{bash_vers}> echo -n "Hello"
|
|
|
|
bash-%{bash_vers}>
|
|
|
|
|
|
|
|
|
In other words the prompt overwrites the output of the
|
|
|
|
echo comand. The boolean variable byte-oriented
|
2007-12-12 22:07:41 +01:00
|
|
|
set in %{_sysconfdir}/inputrc or $HOME/.inputrc avoids this
|
2006-12-15 18:03:59 +01:00
|
|
|
but disables multi byte handling.
|
|
|
|
EOF
|
2007-12-12 22:07:41 +01:00
|
|
|
# remove unpackaged files
|
|
|
|
rm -fv %{buildroot}%{_libdir}/libhistory.so.*
|
|
|
|
rm -fv %{buildroot}%{_libdir}/libreadline.so.*
|
|
|
|
rm -fv %{buildroot}%{_infodir}/rluserman.info.gz
|
|
|
|
rm -fv %{buildroot}%{_mandir}/man3/history.3*
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/skel
|
|
|
|
install -m 644 %{S:5} %{buildroot}%{_sysconfdir}/skel/.bashrc
|
|
|
|
install -m 644 %{S:6} %{buildroot}%{_sysconfdir}/skel/.profile
|
|
|
|
touch -t 199605181720.50 %{buildroot}%{_sysconfdir}/skel/.bash_history
|
|
|
|
chmod 600 %{buildroot}%{_sysconfdir}/skel/.bash_history
|
|
|
|
%find_lang bash
|
2010-07-19 13:22:41 +02:00
|
|
|
%if %suse_version > 1020
|
2009-02-19 17:52:11 +01:00
|
|
|
%fdupes -s %{buildroot}%{_datadir}/bash/helpfiles
|
2010-07-19 13:22:41 +02:00
|
|
|
%endif
|
2007-08-03 17:30:00 +02:00
|
|
|
|
|
|
|
%post -n bash-doc
|
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/bash.info.gz
|
|
|
|
|
|
|
|
%postun -n bash-doc
|
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bash.info.gz
|
2006-12-15 18:03:59 +01:00
|
|
|
|
2009-03-03 18:12:53 +01:00
|
|
|
%post -n libreadline6 -p /sbin/ldconfig
|
2006-12-15 18:03:59 +01:00
|
|
|
|
2009-03-03 18:12:53 +01:00
|
|
|
%postun -n libreadline6 -p /sbin/ldconfig
|
2007-08-03 17:30:00 +02:00
|
|
|
|
|
|
|
%post -n readline-doc
|
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/history.info.gz
|
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/readline.info.gz
|
|
|
|
|
|
|
|
%postun -n readline-doc
|
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/history.info.gz
|
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/readline.info.gz
|
2006-12-15 18:03:59 +01:00
|
|
|
|
2008-11-03 11:56:52 +01:00
|
|
|
%clean
|
|
|
|
ldd -u -r %{buildroot}/bin/bash || true
|
|
|
|
ldd -u -r %{buildroot}%{_libdir}/libreadline.so || true
|
|
|
|
%{?buildroot: %{__rm} -rf %{buildroot}}
|
|
|
|
|
2009-06-12 16:51:48 +02:00
|
|
|
%files
|
2006-12-15 18:03:59 +01:00
|
|
|
%defattr(-,root,root)
|
2009-02-19 17:52:11 +01:00
|
|
|
%config %attr(600,root,root) %{_sysconfdir}/skel/.bash_history
|
|
|
|
%config %attr(644,root,root) %{_sysconfdir}/skel/.bashrc
|
|
|
|
%config %attr(644,root,root) %{_sysconfdir}/skel/.profile
|
2006-12-15 18:03:59 +01:00
|
|
|
/bin/bash
|
|
|
|
/bin/sh
|
2007-12-12 22:07:41 +01:00
|
|
|
%dir %{_sysconfdir}/bash_completion.d
|
|
|
|
%{_bindir}/bashbug
|
|
|
|
%{_bindir}/rbash
|
|
|
|
%{_bindir}/sh
|
2009-02-19 17:52:11 +01:00
|
|
|
%dir %{_datadir}/bash
|
|
|
|
%dir %{_datadir}/bash/helpfiles
|
|
|
|
%{_datadir}/bash/helpfiles/*
|
2007-08-03 17:30:00 +02:00
|
|
|
|
2009-06-12 16:51:48 +02:00
|
|
|
%files -n bash-lang -f bash.lang
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
2007-08-03 17:30:00 +02:00
|
|
|
%files -n bash-doc
|
|
|
|
%defattr(-,root,root)
|
2006-12-15 18:03:59 +01:00
|
|
|
%doc %{_infodir}/bash.info.gz
|
|
|
|
%doc %{_mandir}/man1/bash.1.gz
|
|
|
|
%doc %{_mandir}/man1/bashbuiltins.1.gz
|
|
|
|
%doc %{_mandir}/man1/bashbug.1.gz
|
|
|
|
%doc %{_mandir}/man1/rbash.1.gz
|
|
|
|
%doc %{_defaultdocdir}/bash/
|
2009-06-12 16:51:48 +02:00
|
|
|
|
|
|
|
%files -n bash-devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir /%{_includedir}/bash/
|
|
|
|
%dir /%{_includedir}/bash/%{bash_vers}/
|
|
|
|
%dir /%{_includedir}/bash/%{bash_vers}/builtins/
|
|
|
|
/%{_incdir}/bash/%{bash_vers}/*.h
|
|
|
|
/%{_incdir}/bash/%{bash_vers}/builtins/*.h
|
|
|
|
|
|
|
|
%files -n bash-loadables
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_ldldir}/
|
|
|
|
%dir %{_ldldir}/%{bash_vers}/
|
|
|
|
%{_ldldir}/%{bash_vers}/*
|
2006-12-15 18:03:59 +01:00
|
|
|
|
2009-03-03 18:12:53 +01:00
|
|
|
%files -n libreadline6
|
2006-12-15 18:03:59 +01:00
|
|
|
%defattr(-,root,root)
|
2009-03-03 18:12:53 +01:00
|
|
|
/%{_lib}/libhistory.so.%{rl_major}
|
2006-12-15 18:03:59 +01:00
|
|
|
/%{_lib}/libhistory.so.%{rl_vers}
|
2009-03-03 18:12:53 +01:00
|
|
|
/%{_lib}/libreadline.so.%{rl_major}
|
2006-12-15 18:03:59 +01:00
|
|
|
/%{_lib}/libreadline.so.%{rl_vers}
|
|
|
|
|
|
|
|
%files -n readline-devel
|
|
|
|
%defattr(-,root,root)
|
2007-12-12 22:07:41 +01:00
|
|
|
%{_incdir}/readline/
|
2006-12-15 18:03:59 +01:00
|
|
|
%{_libdir}/libhistory.so
|
|
|
|
%{_libdir}/libreadline.so
|
|
|
|
%doc %{_mandir}/man3/readline.3.gz
|
|
|
|
|
2007-08-03 17:30:00 +02:00
|
|
|
%files -n readline-doc
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc %{_infodir}/history.info.gz
|
|
|
|
%doc %{_infodir}/readline.info.gz
|
|
|
|
%doc %{_defaultdocdir}/readline/
|
2007-12-05 23:45:24 +01:00
|
|
|
|
2007-03-01 20:36:52 +01:00
|
|
|
%changelog
|