2007-01-12 17:45:13 +01:00
|
|
|
#
|
2011-04-05 08:31:12 +02:00
|
|
|
# spec file for package ksh
|
2007-01-12 17:45:13 +01:00
|
|
|
#
|
2012-01-20 18:45:26 +01:00
|
|
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-12 17:45:13 +01:00
|
|
|
#
|
2008-09-24 17:01:34 +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.
|
|
|
|
|
2007-01-12 17:45:13 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2008-02-15 01:27:23 +01:00
|
|
|
|
2007-01-12 17:45:13 +01:00
|
|
|
Name: ksh
|
2010-03-08 17:20:52 +01:00
|
|
|
BuildRequires: bind-utils bison flex gdbm-devel glibc-devel ncurses-devel procps psmisc pwdutils zlib-devel
|
2009-12-11 16:15:17 +01:00
|
|
|
%if %suse_version > 1020
|
2010-03-08 17:20:52 +01:00
|
|
|
BuildRequires: bind-libs libbz2-devel
|
2009-12-11 16:15:17 +01:00
|
|
|
%endif
|
2010-03-07 10:57:52 +01:00
|
|
|
%if %suse_version > 1120
|
|
|
|
BuildRequires: update-alternatives
|
|
|
|
%endif
|
2012-01-20 18:45:26 +01:00
|
|
|
# /bin/ex and /bin/ed required for build
|
|
|
|
BuildRequires: ed
|
|
|
|
BuildRequires: vim
|
2007-10-03 01:02:00 +02:00
|
|
|
Url: http://www.research.att.com/~gsf/download/
|
2011-12-06 18:22:04 +01:00
|
|
|
License: CPL-1.0
|
2007-01-12 17:45:13 +01:00
|
|
|
Group: System/Shells
|
2010-04-14 15:17:22 +02:00
|
|
|
Requires(post): /bin/ln /bin/rm /etc/bash.bashrc /bin/true
|
|
|
|
Requires(postun): /bin/ln /bin/rm /etc/bash.bashrc /bin/true
|
2010-03-07 10:57:52 +01:00
|
|
|
%if %suse_version > 1120
|
2010-04-14 15:17:22 +02:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(preun): update-alternatives
|
2010-03-07 10:57:52 +01:00
|
|
|
%endif
|
2007-10-03 01:02:00 +02:00
|
|
|
AutoReqProv: on
|
2011-09-02 14:19:30 +02:00
|
|
|
Version: 93u
|
|
|
|
Release: 1
|
2007-01-12 17:45:13 +01:00
|
|
|
Summary: Korn Shell
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2012-01-20 18:45:26 +01:00
|
|
|
Source: INIT.2012-01-01.tar.bz2
|
|
|
|
Source1: ast-ksh.2012-01-01.tar.bz2
|
|
|
|
Source2: ast-msgcc.2012-01-01.tar.bz2
|
2010-10-11 14:37:47 +02:00
|
|
|
Source3: CPL
|
2009-08-13 17:23:42 +02:00
|
|
|
Source10: leak1.sh
|
|
|
|
Source11: leak2.sh
|
2010-10-11 16:30:14 +02:00
|
|
|
Source12: ifs-crash.sh
|
2008-02-15 01:27:23 +01:00
|
|
|
Source20: Agreement
|
|
|
|
Source21: Warning
|
2007-05-25 17:26:52 +02:00
|
|
|
Source30: rpmlintrc
|
2010-03-10 15:26:16 +01:00
|
|
|
Source42: sigexec.c
|
2007-01-12 17:45:13 +01:00
|
|
|
Patch: ksh93.dif
|
|
|
|
Patch1: workaround-stupid-build-system.diff
|
|
|
|
Patch2: ksh-qemu.patch
|
|
|
|
Patch3: ksh93-shift_ijs.dif
|
|
|
|
Patch4: ksh93-gmt2utc.dif
|
|
|
|
Patch5: ksh93-uname.dif
|
|
|
|
Patch6: ksh93-vi.dif
|
|
|
|
Patch7: ksh93-profile.dif
|
2007-04-03 21:36:49 +02:00
|
|
|
Patch8: ksh93-test.dif
|
|
|
|
Patch9: ksh93-compat.dif
|
|
|
|
Patch10: ksh93-suid_exec.dif
|
2008-02-15 01:27:23 +01:00
|
|
|
Patch11: ksh93-signals.dif
|
|
|
|
Patch12: ksh93-limits.dif
|
2011-09-02 14:19:30 +02:00
|
|
|
Patch13: ksh93-unset-f.dif
|
2008-12-18 15:28:49 +01:00
|
|
|
Patch14: ksh93-ia64.dif
|
|
|
|
Patch15: ksh93-s390.dif
|
2011-09-02 14:19:30 +02:00
|
|
|
Patch16: ksh93-gcc.dif
|
|
|
|
Patch17: ksh93-heredoc.dif
|
|
|
|
Patch18: ksh93-jobs.dif
|
|
|
|
Patch19: ksh93-reg.dif
|
2012-01-20 18:45:26 +01:00
|
|
|
Patch20: ksh93-aso.dif
|
|
|
|
Patch21: ksh93-vm.dif
|
2011-07-07 15:17:49 +02:00
|
|
|
Patch42: ksh-locale.patch
|
2008-09-24 17:01:34 +02:00
|
|
|
%global use_suid_exe 0
|
2011-07-05 17:32:26 +02:00
|
|
|
%global use_locale 0
|
2009-08-13 17:23:42 +02:00
|
|
|
%global debug_memleak 0
|
2007-01-12 17:45:13 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
The original Korn Shell. The ksh is an sh-compatible command
|
|
|
|
interpreter that executes commands read from standard input or from a
|
|
|
|
file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
David Korn <dgk@research.att.com>
|
|
|
|
Glenn Fowler <gsf@research.att.com>
|
|
|
|
Phong Vo <kpv@research.att.com>
|
|
|
|
|
|
|
|
%package -n ksh-devel
|
2011-12-06 18:22:04 +01:00
|
|
|
License: CPL-1.0
|
2007-01-12 17:45:13 +01:00
|
|
|
Summary: Korn Shell development environment
|
|
|
|
Group: Development/Libraries/C and C++
|
2007-05-25 17:26:52 +02:00
|
|
|
Requires: ksh = %{version}-%{release}
|
2007-10-03 01:02:00 +02:00
|
|
|
AutoReqProv: on
|
2007-01-12 17:45:13 +01:00
|
|
|
|
|
|
|
%description -n ksh-devel
|
|
|
|
The package includes C header files and the static libraries together
|
|
|
|
with the shared libraries for linking with other projects. Please be
|
|
|
|
aware that the CPL licensed code can not be used within GPL licensed
|
|
|
|
project.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
David Korn <dgk@research.att.com>
|
|
|
|
Glenn Fowler <gsf@research.att.com>
|
|
|
|
Phong Vo <kpv@research.att.com>
|
|
|
|
|
|
|
|
%prep
|
2009-05-28 00:37:00 +02:00
|
|
|
%setup -q -n ksh93 -T -c -a 0 -a 1 -a 2
|
2008-02-15 01:27:23 +01:00
|
|
|
find share/ \( -name chef -o -name fudd -o -name piglatin -o -name valley \) -a -type d |\
|
|
|
|
xargs -r rm -vrf
|
|
|
|
find share/ ! \( -name libast -o -name libcmd -o -name libdll -o -name libshell \) -a -type f |\
|
|
|
|
xargs -r rm -vf
|
|
|
|
find share/ -type d -a -empty | xargs -r rm -vrf
|
|
|
|
find share/ -type d -a -empty | xargs -r rm -vrf
|
2007-01-12 17:45:13 +01:00
|
|
|
%patch
|
2011-07-07 15:17:49 +02:00
|
|
|
%patch42
|
2007-01-12 17:45:13 +01:00
|
|
|
%patch1
|
|
|
|
%ifarch %arm
|
|
|
|
%patch2
|
|
|
|
%endif
|
|
|
|
%patch3
|
|
|
|
%patch4
|
|
|
|
%patch5
|
|
|
|
%patch6
|
|
|
|
%patch7
|
|
|
|
%patch8
|
|
|
|
%patch9
|
|
|
|
%patch10
|
2007-10-03 01:02:00 +02:00
|
|
|
%patch11
|
|
|
|
%patch12
|
2010-04-14 15:17:22 +02:00
|
|
|
%patch13
|
2008-12-18 15:28:49 +01:00
|
|
|
%ifarch ia64
|
|
|
|
%patch14
|
|
|
|
%endif
|
|
|
|
%patch15
|
2010-06-29 16:10:04 +02:00
|
|
|
%patch16
|
2010-10-08 14:55:02 +02:00
|
|
|
%patch17
|
2010-10-19 13:12:50 +02:00
|
|
|
%patch18
|
2010-10-21 12:37:38 +02:00
|
|
|
%patch19
|
2012-01-20 18:45:26 +01:00
|
|
|
%patch20
|
|
|
|
%patch21
|
|
|
|
find -type f -a -name Mamfile | \
|
|
|
|
xargs sed -ri '/exec.*-I-D/{s@(-I)(-D)([^0]*)(0[^[:blank:]]+)@\1\3@}'
|
2007-01-12 17:45:13 +01:00
|
|
|
|
|
|
|
%build
|
2012-01-20 18:45:26 +01:00
|
|
|
#
|
|
|
|
# Check for a clean signal environment for runtime tests
|
|
|
|
#
|
2010-03-08 17:20:52 +01:00
|
|
|
typeset -i IGNORED=0x$(ps --no-headers -o ignored $$)
|
2012-01-20 18:45:26 +01:00
|
|
|
typeset -i SIGMASK=0x0
|
|
|
|
|
|
|
|
let "SIGMASK|=(1<<($(kill -l PIPE)-1))"
|
|
|
|
let "SIGMASK|=(1<<($(kill -l URG) -1))"
|
|
|
|
let "SIGMASK|=(1<<($(kill -l XFSZ)-1))"
|
|
|
|
|
|
|
|
if ((IGNORED & SIGMASK)) ; then
|
2012-01-23 15:16:26 +01:00
|
|
|
${CC:-gcc} ${RPM_OPT_FLAGS} -o sigexec %{S:42} -lutil
|
2010-03-10 15:26:16 +01:00
|
|
|
for fd in /proc/$$/fd/*; do
|
|
|
|
test -s $fd -a ! -c $fd && break || true
|
|
|
|
done
|
|
|
|
set -- $(readlink $fd)
|
|
|
|
exec -a $SHELL ./sigexec $SHELL ${1+"$@"}
|
2010-03-08 17:20:52 +01:00
|
|
|
fi
|
2012-01-23 15:16:26 +01:00
|
|
|
|
|
|
|
AR="ar"
|
|
|
|
CC=gcc
|
|
|
|
PATH=${PWD}:$PATH
|
|
|
|
LANG=POSIX
|
|
|
|
TMPDIR=$(mktemp -d /tmp/ksh-build.XXXXXX) || exit 1
|
|
|
|
SUSE_ASNEEDED=0
|
|
|
|
export AR CC PATH LANG TMPDIR SUSE_ASNEEDED
|
|
|
|
#
|
|
|
|
# Remove optimizer which cause runtime leaks in ksh
|
|
|
|
#
|
|
|
|
RPM_OPT_FLAGS="${RPM_OPT_FLAGS//-funwind-tables/}"
|
|
|
|
RPM_OPT_FLAGS="${RPM_OPT_FLAGS//-fasynchronous-unwind-tables/}"
|
2011-05-24 18:36:50 +02:00
|
|
|
nobuiltin=${TMPDIR:-/tmp}/nobuiltin
|
2010-03-10 15:26:16 +01:00
|
|
|
set -C
|
2010-04-14 15:17:22 +02:00
|
|
|
(cat<<-EOF
|
|
|
|
-fno-builtin-putenv
|
2010-03-10 15:26:16 +01:00
|
|
|
-fno-builtin-setenv
|
|
|
|
-fno-builtin-strftime
|
|
|
|
-fno-builtin-strlcat
|
|
|
|
-fno-builtin-strlcpy
|
|
|
|
-fno-builtin-strptime
|
|
|
|
-fno-builtin-strtod
|
|
|
|
-fno-builtin-strtol
|
|
|
|
-fno-builtin-strtold
|
|
|
|
-fno-builtin-strtoll
|
|
|
|
-fno-builtin-strtoul
|
|
|
|
-fno-builtin-strtoull
|
|
|
|
EOF
|
2010-04-14 15:17:22 +02:00
|
|
|
find src/lib/ -name '*.h' | xargs \
|
|
|
|
sed -nr '\@^extern[[:blank:]].*[[:blank:]](str|mem|(get|put|set)env|(c|m|re|v)alloc).*\(@{
|
|
|
|
s@[[:blank:]]+_ARG_@@
|
|
|
|
s@[a-zA-Z_\*]+[[:blank:]]+@@g
|
|
|
|
s@([^\(\)]+)\(.*\);$@-fno-builtin-\1@; p}') | \
|
|
|
|
sort -u > $nobuiltin
|
|
|
|
set +C
|
2009-08-06 17:44:17 +02:00
|
|
|
# This package failed when testing with -Wl,-as-needed being default.
|
2010-03-08 17:20:52 +01:00
|
|
|
# So we disable it here, if you want to retest, just delete this
|
|
|
|
# comment and the line below.
|
2008-02-15 01:27:23 +01:00
|
|
|
test -n "${!LC_*}" && unset "${!LC_*}"
|
2008-09-24 17:01:34 +02:00
|
|
|
cflags ()
|
|
|
|
{
|
|
|
|
local flag=$1; shift
|
2010-03-08 17:20:52 +01:00
|
|
|
local var=$1; shift
|
|
|
|
test -n "${flag}" -a -n "${var}" || return
|
|
|
|
case "${!var}" in
|
2008-09-24 17:01:34 +02:00
|
|
|
*${flag}*) return
|
|
|
|
esac
|
2012-01-20 18:45:26 +01:00
|
|
|
set -o noclobber
|
2009-12-11 16:15:17 +01:00
|
|
|
case "$flag" in
|
|
|
|
-Wl,*)
|
2012-01-20 18:45:26 +01:00
|
|
|
if echo 'int main () { return 0; }' | \
|
|
|
|
${CC:-gcc} -Werror $flag -o /dev/null -xc - > /dev/null 2>&1 ; then
|
2009-12-11 16:15:17 +01:00
|
|
|
eval $var=\${$var:+\$$var\ }$flag
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
2012-01-20 18:45:26 +01:00
|
|
|
if ${CC:-gcc} -Werror $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then
|
2009-12-11 16:15:17 +01:00
|
|
|
eval $var=\${$var:+\$$var\ }$flag
|
|
|
|
fi
|
|
|
|
esac
|
2012-01-20 18:45:26 +01:00
|
|
|
set +o noclobber
|
2008-09-24 17:01:34 +02:00
|
|
|
}
|
|
|
|
#
|
2007-01-12 17:45:13 +01:00
|
|
|
# If _you_ are knowing how to fix this in the autogenerated
|
|
|
|
# sources of ksh/ast without breaking them, then let me know.
|
|
|
|
#
|
2010-03-08 17:20:52 +01:00
|
|
|
cflags -Wno-missing-braces IGNORE
|
|
|
|
cflags -Wno-unknown-pragmas IGNORE
|
|
|
|
cflags -Wno-parentheses IGNORE
|
|
|
|
cflags -Wno-char-subscripts IGNORE
|
|
|
|
cflags -Wno-uninitialized IGNORE
|
|
|
|
cflags -Wno-implicit IGNORE
|
|
|
|
cflags -Wno-unused-value IGNORE
|
|
|
|
cflags -Wno-type-limits IGNORE
|
2007-01-12 17:45:13 +01:00
|
|
|
#
|
2007-10-03 01:02:00 +02:00
|
|
|
# Do not use -DSHOPT_SPAWN=1 and/or -DSHOPT_AMP=1 this would cause
|
|
|
|
# errors due race conditions while executing the test suite.
|
2007-01-12 17:45:13 +01:00
|
|
|
#
|
2011-05-24 18:36:50 +02:00
|
|
|
feature=${TMPDIR:-/tmp}/feature.h
|
2010-03-07 10:57:52 +01:00
|
|
|
set -C
|
|
|
|
(cat > $feature)<<-'EOF'
|
2011-06-08 15:18:04 +02:00
|
|
|
#define SHOPT_FS_3D 0
|
2010-03-07 10:57:52 +01:00
|
|
|
#define SHOPT_SYSRC 1
|
|
|
|
#define SHOPT_REMOTE 1
|
|
|
|
#define SHOPT_CMDLIB_BLTIN 1
|
|
|
|
#define SHOPT_CMDLIB_DIR 1
|
|
|
|
#define SH_CMDLIB_DIR "/%{_lib}/ast/bin"
|
|
|
|
#define THISPROG "/%{_lib}/ast/bin/suid_exec"
|
|
|
|
#define _AST_std_malloc 0
|
|
|
|
#define _map_malloc 1
|
|
|
|
EOF
|
|
|
|
set +C
|
|
|
|
FEATURE="-include $feature"
|
|
|
|
cat $feature
|
2007-01-12 17:45:13 +01:00
|
|
|
#
|
|
|
|
#
|
2011-06-10 17:31:51 +02:00
|
|
|
LARGEFILE="$(getconf LFS_CFLAGS)"
|
2011-05-24 18:36:50 +02:00
|
|
|
case "$RPM_ARCH" in
|
2011-06-10 17:31:51 +02:00
|
|
|
i[3456]86)
|
2012-01-20 18:45:26 +01:00
|
|
|
RPM_OPT_FLAGS="${RPM_OPT_FLAGS//-O[s0-9]/-O2}"
|
|
|
|
cflags -m32 RPM_OPT_FLAGS
|
2011-06-10 17:31:51 +02:00
|
|
|
HOSTTYPE=linux.i386
|
|
|
|
;;
|
|
|
|
x86_64)
|
2012-01-20 18:45:26 +01:00
|
|
|
RPM_OPT_FLAGS="${RPM_OPT_FLAGS//-O[s0-9]/-O2}"
|
|
|
|
cflags -m64 RPM_OPT_FLAGS
|
2011-06-10 17:31:51 +02:00
|
|
|
HOSTTYPE=linux.i386-64
|
|
|
|
;;
|
|
|
|
ia64)
|
|
|
|
RPM_OPT_FLAGS="${RPM_OPT_FLAGS//-O[s0-9]/-O}"
|
2012-01-20 18:45:26 +01:00
|
|
|
cflags -mlp64 RPM_OPT_FLAGS
|
|
|
|
cflags -mno-volatile-asm-stop RPM_OPT_FLAGS
|
2011-06-10 17:31:51 +02:00
|
|
|
HOSTTYPE=linux.ia64
|
|
|
|
;;
|
|
|
|
s390)
|
2012-01-20 18:45:26 +01:00
|
|
|
RPM_OPT_FLAGS="${RPM_OPT_FLAGS//-O[s0-9]/-O}"
|
|
|
|
cflags -m31 RPM_OPT_FLAGS
|
2011-06-10 17:31:51 +02:00
|
|
|
HOSTTYPE=linux.s390
|
|
|
|
;;
|
|
|
|
s390*)
|
2012-01-20 18:45:26 +01:00
|
|
|
RPM_OPT_FLAGS="${RPM_OPT_FLAGS//-O[s0-9]/-O}"
|
|
|
|
cflags -m64 RPM_OPT_FLAGS
|
2011-06-10 17:31:51 +02:00
|
|
|
HOSTTYPE=linux.s390-64
|
|
|
|
;;
|
2011-05-24 18:36:50 +02:00
|
|
|
ppc|powerpc)
|
2012-01-20 18:45:26 +01:00
|
|
|
RPM_OPT_FLAGS="${RPM_OPT_FLAGS//-O[s0-9]/-O}"
|
|
|
|
cflags -mno-powerpc64 RPM_OPT_FLAGS
|
2011-06-10 17:31:51 +02:00
|
|
|
HOSTTYPE=linux.powerpc
|
|
|
|
;;
|
|
|
|
ppc64|powerpc64)
|
2012-01-20 18:45:26 +01:00
|
|
|
RPM_OPT_FLAGS="${RPM_OPT_FLAGS//-O[s0-9]/-O}"
|
|
|
|
cflags -mpowerpc64 RPM_OPT_FLAGS
|
2011-06-10 17:31:51 +02:00
|
|
|
HOSTTYPE=linux.powerpc64
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
RPM_OPT_FLAGS="${RPM_OPT_FLAGS//-O[s0-9]/-O}"
|
|
|
|
HOSTTYPE=linux.$RPM_ARCH
|
|
|
|
;;
|
2011-05-24 18:36:50 +02:00
|
|
|
esac
|
|
|
|
RPM_OPT_FLAGS=$(echo "${RPM_OPT_FLAGS}"|sed -r 's/[[:blank:]]+-g[0-9]?/ -g2/g')
|
2008-12-18 15:28:49 +01:00
|
|
|
UNIVERSE=att
|
2009-08-13 17:23:42 +02:00
|
|
|
LDFLAGS="-lm"
|
2009-12-11 16:15:17 +01:00
|
|
|
LDSOFLG=""
|
2011-05-24 18:36:50 +02:00
|
|
|
cflags -std=gnu99 RPM_OPT_FLAGS
|
|
|
|
cflags -fPIC RPM_OPT_FLAGS
|
|
|
|
cflags @$nobuiltin RPM_OPT_FLAGS
|
2012-01-23 15:16:26 +01:00
|
|
|
cflags -fno-unwind-tables RPM_OPT_FLAGS
|
2011-05-24 18:36:50 +02:00
|
|
|
cflags -fno-strict-aliasing RPM_OPT_FLAGS
|
|
|
|
cflags -fno-zero-initialized-in-bss RPM_OPT_FLAGS
|
|
|
|
cflags -fno-delete-null-pointer-checks RPM_OPT_FLAGS
|
2012-01-23 15:16:26 +01:00
|
|
|
cflags -fno-asynchronous-unwind-tables RPM_OPT_FLAGS
|
|
|
|
cflags -fno-unsafe-loop-optimizations RPM_OPT_FLAGS
|
|
|
|
cflags -fno-reorder-blocks-and-partition RPM_OPT_FLAGS
|
2012-01-20 18:45:26 +01:00
|
|
|
cflags -fsigned-bitfields RPM_OPT_FLAGS
|
|
|
|
cflags -fsigned-chars RPM_OPT_FLAGS
|
|
|
|
cflags -fsigned-zeros RPM_OPT_FLAGS
|
2012-01-24 19:43:43 +01:00
|
|
|
case "$(gcc --version | head -n 1)" in
|
|
|
|
*4.3.*) cflags -fno-tree-sink RPM_OPT_FLAGS ;;
|
|
|
|
*4.6.*) cflags -ftree-loop-linear RPM_OPT_FLAGS ;;
|
|
|
|
esac
|
2011-05-24 18:36:50 +02:00
|
|
|
cflags -g2 RPM_OPT_FLAGS
|
|
|
|
cflags -pipe RPM_OPT_FLAGS
|
|
|
|
cflags -Wl,-O2 LDFLAGS
|
|
|
|
cflags -Wl,--hash-size=16699 LDFLAGS
|
|
|
|
cflags -Wl,-O2 LDSOFLG
|
|
|
|
cflags -Wl,-warn-common LDSOFLG
|
|
|
|
cflags -Wl,--as-needed LDSOFLG
|
|
|
|
cflags -Wl,--hash-size=8599 LDSOFLG
|
2012-01-20 18:45:26 +01:00
|
|
|
cflags -Wl,-Bsymbolic-functions LDSOFLG
|
2011-05-24 18:36:50 +02:00
|
|
|
cflags -Wl,-rpath,/%{_lib}/ast LDSOFLG
|
2008-12-18 15:28:49 +01:00
|
|
|
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE $LARGEFILE"
|
|
|
|
RPM_OPT_FLAGS="$RPM_OPT_FLAGS $IGNORE $FEATURE"
|
2007-01-12 17:45:13 +01:00
|
|
|
mam_cc_L=use
|
2008-12-18 15:28:49 +01:00
|
|
|
mam_cc_OPTIMIZE=-pipe
|
|
|
|
export mam_cc_L mam_cc_OPTIMIZE HOSTTYPE LDFLAGS RPM_OPT_FLAGS UNIVERSE
|
2011-07-07 15:17:49 +02:00
|
|
|
printenv
|
2012-01-20 18:45:26 +01:00
|
|
|
getconf PAGESIZE
|
|
|
|
|
2011-07-07 15:17:49 +02:00
|
|
|
bin/package make CCFLAGS="$RPM_OPT_FLAGS" HOSTTYPE="$HOSTTYPE" AR="$AR" CC="$CC"
|
2007-01-12 17:45:13 +01:00
|
|
|
root=$(echo ${PWD}/arch/linux*)
|
|
|
|
test -d $root || exit 1
|
|
|
|
log=${root}/lib/package/gen/make.out
|
|
|
|
test -s $log || exit 1
|
|
|
|
for lib in libast libcmd libdll libshell ; do
|
2009-12-11 16:15:17 +01:00
|
|
|
test -s ${root}/lib/${lib}.a || exit 1
|
|
|
|
obj=$(ar t ${root}/lib/${lib}.a)
|
2007-01-12 17:45:13 +01:00
|
|
|
test $? -eq 0 || exit 1
|
|
|
|
case "$lib" in
|
|
|
|
libshell)
|
|
|
|
base=src/cmd/ksh93
|
|
|
|
vers=$(grep ^VERSION ${base}/Makefile | sed "s@.*\([0-9]\+\.[0-9]\+\).*@\1@")
|
2009-12-21 23:11:48 +01:00
|
|
|
link="-L${root}/lib/ -Wl,-rpath-link,${root}/lib -Wl,-rpath,/%{_lib}/ast $LDSOFLG $LDFLAGS -ldll -lcmd -last -lm -ldl"
|
2007-01-12 17:45:13 +01:00
|
|
|
;;
|
|
|
|
libdll)
|
|
|
|
base=src/lib/$lib
|
|
|
|
vers=$(grep :LIBRARY: ${base}/Makefile | sed "s@.*\([0-9]\+\.[0-9]\+\).*@\1@")
|
2009-12-21 23:11:48 +01:00
|
|
|
link="-L${root}/lib/ -Wl,-rpath-link,${root}/lib -Wl,-rpath,/%{_lib}/ast $LDSOFLG -ldl -last"
|
2007-01-12 17:45:13 +01:00
|
|
|
;;
|
|
|
|
libcmd)
|
|
|
|
base=src/lib/$lib
|
|
|
|
vers=$(grep :LIBRARY: ${base}/Makefile | sed "s@.*\([0-9]\+\.[0-9]\+\).*@\1@")
|
2009-12-21 23:11:48 +01:00
|
|
|
link="-L${root}/lib/ -Wl,-rpath-link,${root}/lib -Wl,-rpath,/%{_lib}/ast $LDSOFLG -last"
|
2007-01-12 17:45:13 +01:00
|
|
|
;;
|
|
|
|
libast)
|
|
|
|
base=src/lib/$lib
|
|
|
|
vers=$(grep :LIBRARY: ${base}/Makefile | sed "s@.*\([0-9]\+\.[0-9]\+\).*@\1@")
|
2009-12-21 23:11:48 +01:00
|
|
|
link="-L${root}/lib/ -Wl,-rpath-link,${root}/lib -Wl,-rpath,/%{_lib}/ast $LDSOFLG"
|
2007-01-12 17:45:13 +01:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
soname="-Wl,-soname,${lib}.so.${vers%.*},-stats"
|
|
|
|
pushd ${root}/${base}
|
|
|
|
$CC -shared $soname -o ${root}/lib/${lib}.so.${vers} ${obj} $link
|
|
|
|
ln -sf ${lib}.so.${vers} ${root}/lib/${lib}.so.${vers%.*}
|
|
|
|
ln -sf ${lib}.so.${vers} ${root}/lib/${lib}.so
|
|
|
|
popd
|
|
|
|
done
|
2008-09-24 17:01:34 +02:00
|
|
|
nm -D ${root}/lib/libast.so | \
|
|
|
|
grep -E 'T[[:blank:]](str|mem|(get|put|set)env|(c|m|re|v)alloc)' | \
|
|
|
|
awk '{print "-fno-builtin-"$3}' | \
|
|
|
|
sort -u | \
|
2010-04-14 15:17:22 +02:00
|
|
|
diff -u $nobuiltin - || true
|
2007-01-12 17:45:13 +01:00
|
|
|
base=src/cmd/ksh93
|
|
|
|
test=${PWD}/${base}/tests
|
|
|
|
pushd ${root}/${base}
|
|
|
|
rm -f libshell.a
|
|
|
|
rm -f ${root}/bin/ksh
|
|
|
|
rm -f ${root}/bin/shcomp
|
|
|
|
ksh=$(grep -e '-o ksh' $log | tail -n 1 |\
|
2010-03-07 10:57:52 +01:00
|
|
|
sed "s@+ g\?cc@$CC@;s@-o ksh@-o ${root}/bin/ksh@;s@[a-zA-Z0-9_/\.-]*lib\([a-z]\+\)\.a@-l\1@g;s@'@@g")
|
2009-12-11 16:15:17 +01:00
|
|
|
ksht=$(grep -e '-o ksh' $log | tail -n 1 |\
|
2010-03-07 10:57:52 +01:00
|
|
|
sed "s@+ g\?cc@$CC@;s@-o ksh@-o ${root}/bin/ksh.test@;s@[a-zA-Z0-9_/\.-]*lib\([a-z]\+\)\.a@-l\1@g;s@'@@g")
|
2008-02-15 01:27:23 +01:00
|
|
|
test -n "${ksh}" || { echo build of ksh failed; exit 1; }
|
2007-01-12 17:45:13 +01:00
|
|
|
shcomp=$(grep -e '-o shcomp' $log | tail -n 1 |\
|
2010-03-07 10:57:52 +01:00
|
|
|
sed "s@+ g\?cc@$CC@;s@-o shcomp@-o ${root}/bin/shcomp@;s@[a-zA-Z0-9_/\.-]*lib\([a-z]\+\)\.a@-l\1@g;s@'@@g")
|
2009-12-11 16:15:17 +01:00
|
|
|
shcompt=$(grep -e '-o shcomp' $log | tail -n 1 |\
|
2010-03-07 10:57:52 +01:00
|
|
|
sed "s@+ g\?cc@$CC@;s@-o shcomp@-o ${root}/bin/shcomp.test@;s@[a-zA-Z0-9_/\.-]*lib\([a-z]\+\)\.a@-l\1@g;s@'@@g")
|
2008-02-15 01:27:23 +01:00
|
|
|
test -n "${shcomp}" || { echo build of shcomp failed; exit 1; }
|
2007-04-03 21:36:49 +02:00
|
|
|
suidex=$(grep -e '-o suid_exec' $log | tail -n 1 |\
|
2010-03-07 10:57:52 +01:00
|
|
|
sed "s@+ g\?cc@$CC@;s@-o shcomp@-o ${root}/bin/suid_exec@;s@[a-zA-Z0-9_/\.-]*lib\([a-z]\+\)\.a@-l\1@g;s@'@@g")
|
2008-02-15 01:27:23 +01:00
|
|
|
test -n "${suidex}" || { echo build of suidex failed; exit 1; }
|
2009-12-11 16:15:17 +01:00
|
|
|
${ksht} -Wl,-rpath,${root}/lib
|
|
|
|
${shcompt} -Wl,-rpath,${root}/lib
|
|
|
|
${ksh} -Wl,-rpath-link,${root}/lib -Wl,-rpath,/%{_lib}/ast
|
|
|
|
${shcomp} -Wl,-rpath-link,${root}/lib -Wl,-rpath,/%{_lib}/ast
|
|
|
|
${suidex} -Wl,-rpath-link,${root}/lib -Wl,-rpath,/%{_lib}/ast
|
2007-01-12 17:45:13 +01:00
|
|
|
popd
|
2011-07-07 15:17:49 +02:00
|
|
|
OPATH=$PATH
|
|
|
|
OSHELL=$SHELL
|
|
|
|
PATH=$PATH:${root}/bin
|
|
|
|
SHELL=${root}/bin/ksh.test
|
|
|
|
SHCOMP=${root}/bin/shcomp.test
|
|
|
|
export PATH SHCOMP SHELL
|
2011-12-26 19:08:14 +01:00
|
|
|
%if !0%{?qemu_user_space_build:1}
|
2011-07-07 15:17:49 +02:00
|
|
|
pushd ${test}
|
|
|
|
typeset -i failed=0
|
|
|
|
ln -sf ${root}/lib ${test}/../
|
2011-09-02 14:19:30 +02:00
|
|
|
rm -f pty.sh
|
2011-07-07 15:17:49 +02:00
|
|
|
${root}/bin/ksh.test shtests
|
|
|
|
${root}/bin/ksh.test %{S:10}
|
|
|
|
${root}/bin/ksh.test %{S:11}
|
|
|
|
${root}/bin/ksh.test %{S:12}
|
|
|
|
if test $((IGNORED & SIGPIPE)) -eq 0 ; then
|
|
|
|
# This may fail in current factory (aka next 11.3)
|
|
|
|
${root}/bin/ksh.test -c 'g="false"; trap "print -u2 PIPED; \$g && exit 0 ; g=true" PIPE ; while true ; do echo hello ; done' | head -n 10
|
|
|
|
fi
|
|
|
|
killall -q -s 9 ${root}/bin/ksh.test || true
|
|
|
|
popd
|
2011-12-26 19:08:14 +01:00
|
|
|
%endif
|
2011-07-07 15:17:49 +02:00
|
|
|
mkdir -p share/locale/C/LC_MESSAGES
|
2012-01-20 18:45:26 +01:00
|
|
|
includes="-I$(cpp -print-search-dirs | sed -rn 's@^install:[[:blank:]]@@p')include"
|
|
|
|
includes="$includes $(find $root -name FEATURE -printf ' -I%h')"
|
|
|
|
includes="$includes -I/usr/include/linux"
|
2011-07-07 15:17:49 +02:00
|
|
|
sed -rn "\@mamake -C cmd/ksh93@,\@mamake -C@ {
|
2012-01-20 18:45:26 +01:00
|
|
|
s@^\+ g?cc@$SHELL msgcc -M-set=ast $includes@
|
2011-07-07 15:17:49 +02:00
|
|
|
s@[[:blank:]]-c[[:blank:]]([^[:blank:]\.]+/([^[:blank:]\.\/]+))\.c@ -c \1\.c -o msgs/\2\.mso@p
|
|
|
|
}" ${root}/lib/package/gen/make.out > src/cmd/ksh93/doit
|
|
|
|
pushd src/cmd/ksh93
|
|
|
|
mkdir msgs
|
2012-01-20 18:45:26 +01:00
|
|
|
${root}/lib/probe/C/pp/probe $(type -p gcc) > pp_default.h
|
|
|
|
$SHELL ./doit
|
|
|
|
$SHELL msgcc -o libshell.msg msgs/*.mso
|
2011-07-07 15:17:49 +02:00
|
|
|
rm -rf msgs/
|
|
|
|
popd
|
|
|
|
msggen share/locale/C/LC_MESSAGES/libshell src/cmd/ksh93/libshell.msg
|
|
|
|
pushd ${root}/bin
|
|
|
|
PATH=$PATH:.
|
|
|
|
set -- $(shcomp.test --version 2>&1)
|
|
|
|
eval version=\${$#}
|
|
|
|
shcomp.test --nroff 2>&1 | sed 's/\(\.TH .*\)/\1 "2003-03-02" "" "Korn shell utilities"/' > ../man/man1/shcomp.1
|
|
|
|
rm -v ksh.test shcomp.test
|
|
|
|
popd
|
|
|
|
SHELL=$OSHELL
|
|
|
|
PATH=$OPATH
|
2007-01-12 17:45:13 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
root=$(echo ${PWD}/arch/linux*)
|
|
|
|
test -d $root || exit 1
|
|
|
|
pushd $root || exit 1
|
2007-04-03 21:36:49 +02:00
|
|
|
mkdir -p %{buildroot}/bin
|
2007-05-25 17:26:52 +02:00
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
2007-04-03 21:36:49 +02:00
|
|
|
mkdir -p %{buildroot}/%{_lib}/ast/bin
|
2007-05-25 17:26:52 +02:00
|
|
|
mkdir -p %{buildroot}%{_includedir}/ast
|
2007-04-03 21:36:49 +02:00
|
|
|
mkdir -p %{buildroot}%{_libdir}/ast
|
|
|
|
mkdir -p %{buildroot}%{_mandir}
|
|
|
|
mkdir %{buildroot}%{_mandir}/man1
|
|
|
|
mkdir %{buildroot}%{_mandir}/man3
|
2011-09-02 14:19:30 +02:00
|
|
|
%if %use_locale
|
2008-02-15 01:27:23 +01:00
|
|
|
mkdir -p %{buildroot}%{_datadir}/locale
|
2011-09-02 14:19:30 +02:00
|
|
|
%endif
|
2008-09-24 17:01:34 +02:00
|
|
|
mkdir -p %{buildroot}%{_datadir}/ksh/fun
|
2007-04-03 21:36:49 +02:00
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/permissions.d
|
|
|
|
install bin/ksh %{buildroot}/%{_lib}/ast/bin/
|
|
|
|
install bin/shcomp %{buildroot}/%{_lib}/ast/bin/
|
2008-09-24 17:01:34 +02:00
|
|
|
%if %use_suid_exe
|
|
|
|
install bin/suid_exec %{buildroot}/%{_lib}/ast/bin/
|
|
|
|
%endif
|
2010-03-07 10:57:52 +01:00
|
|
|
ln -sf bin/ksh %{buildroot}/%{_lib}/ast/ksh
|
|
|
|
# create ghost files
|
|
|
|
ln -sf /bin/true %{buildroot}/bin/ksh
|
|
|
|
ln -sf /bin/true %{buildroot}%{_bindir}/ksh
|
|
|
|
%if %suse_version > 1120
|
|
|
|
ln -sf ../man1/ksh93.1.gz %{buildroot}/%{_mandir}/man1/ksh.1.gz
|
|
|
|
ln -sf /%{_lib}/ast/bin/ksh %{buildroot}/bin/ksh93
|
|
|
|
ln -sf /%{_lib}/ast/bin/ksh %{buildroot}%{_bindir}/ksh93
|
|
|
|
%endif
|
2007-05-25 17:26:52 +02:00
|
|
|
ln -sf /%{_lib}/ast/bin/ksh %{buildroot}%{_bindir}/rksh
|
|
|
|
ln -sf /%{_lib}/ast/bin/shcomp %{buildroot}%{_bindir}/shcomp
|
2009-12-11 16:15:17 +01:00
|
|
|
ln -sf ast %{buildroot}/%{_lib}/ksh
|
|
|
|
cp -a lib/*.so* %{buildroot}/%{_lib}/ast/
|
|
|
|
cp -a fun/* %{buildroot}%{_datadir}/ksh/fun/
|
2007-04-03 21:36:49 +02:00
|
|
|
for so in %{buildroot}/%{_lib}/ast/*.so.*.* ; do
|
2007-01-12 17:45:13 +01:00
|
|
|
so=${so##*/}
|
2007-04-03 21:36:49 +02:00
|
|
|
ln -sf /%{_lib}/ast/$so %{buildroot}%{_libdir}/ast/${so%%%%.*}.so
|
2007-01-12 17:45:13 +01:00
|
|
|
done
|
2007-04-03 21:36:49 +02:00
|
|
|
rm -f %{buildroot}%{_libdir}/ast/*.so.*
|
2011-07-07 15:17:49 +02:00
|
|
|
sed -rn '/^\.de Af/,/^\.\./p;/^\.de aF/,/^\.\./p' man/man3/int.3 > af.man
|
|
|
|
for man in $(grep -l '\.}S' man/man[138]/*.[138]); do
|
|
|
|
sed -ri '1r af.man' $man
|
|
|
|
done
|
|
|
|
for man in man/man[138]/*.[138] ; do
|
|
|
|
sed -ri 's/\\f5/\\fB/g;s/^\.H/\.P\n\.H/g;s/\.}S/\.aF/;s/^\.LI/\.LR/;s/\\\(le/\\\(<=/' $man
|
2010-10-11 14:37:47 +02:00
|
|
|
done
|
2007-05-25 17:26:52 +02:00
|
|
|
install -m 0644 lib/*.a %{buildroot}%{_libdir}/ast/
|
2010-03-07 10:57:52 +01:00
|
|
|
%if %suse_version > 1120
|
|
|
|
install -m 0644 man/man1/sh.1 %{buildroot}%{_mandir}/man1/ksh93.1
|
|
|
|
%else
|
2007-05-25 17:26:52 +02:00
|
|
|
install -m 0644 man/man1/sh.1 %{buildroot}%{_mandir}/man1/ksh.1
|
2010-03-07 10:57:52 +01:00
|
|
|
%endif
|
2007-05-25 17:26:52 +02:00
|
|
|
install -m 0644 man/man1/shcomp.1 %{buildroot}%{_mandir}/man1/shcomp.1
|
2007-01-12 17:45:13 +01:00
|
|
|
for man in man/man3/*.3 ; do
|
|
|
|
man=${man##*/}
|
|
|
|
ast=${man}ast
|
2007-05-25 17:26:52 +02:00
|
|
|
install -m 0644 man/man3/${man} %{buildroot}%{_mandir}/man3/${ast}
|
2007-01-12 17:45:13 +01:00
|
|
|
done
|
2007-05-25 17:26:52 +02:00
|
|
|
install -m 0644 include/ast/* %{buildroot}%{_includedir}/ast/
|
2007-01-12 17:45:13 +01:00
|
|
|
popd
|
2008-10-09 18:50:19 +02:00
|
|
|
%if %use_locale
|
2011-07-07 15:17:49 +02:00
|
|
|
for msg in share/locale/* ; do
|
|
|
|
test -d $msg || continue
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/locale/${msg##*/}/LC_MESSAGES
|
|
|
|
cp -vp ${msg}/LC_MESSAGES/* %{buildroot}%{_datadir}/locale/${msg##*/}/LC_MESSAGES/
|
|
|
|
done
|
2008-02-15 01:27:23 +01:00
|
|
|
echo %%dir %{_datadir}/locale/C > ksh.lang
|
|
|
|
echo %%dir %{_datadir}/locale/C/LC_MESSAGES >> ksh.lang
|
2011-09-02 14:19:30 +02:00
|
|
|
%endif
|
2008-02-15 01:27:23 +01:00
|
|
|
find %{buildroot}/ -type f -o -type l | sed -r '
|
|
|
|
s:%{buildroot}::
|
|
|
|
s:(%{_datadir}/locale/)([^/_]+)(.*$):%%lang\(\2\) \1\2\3:
|
|
|
|
s:^([^%%].*)::
|
|
|
|
s:%%lang\(C\) ::
|
|
|
|
/^ *$/d' >> ksh.lang
|
2010-10-11 14:37:47 +02:00
|
|
|
if test -s lib/package/LICENSES/ast ; then
|
|
|
|
cp lib/package/LICENSES/ast LICENSE
|
|
|
|
else
|
|
|
|
cp %{S:3} LICENSE
|
|
|
|
fi
|
2007-01-12 17:45:13 +01:00
|
|
|
mv src/cmd/ksh93/OBSOLETE src/cmd/ksh93/OBSOLETE.mm
|
2011-07-07 15:17:49 +02:00
|
|
|
echo '.VERBON 22' > grep.mm
|
|
|
|
sed -rn '/function grep/,/^}/p' src/cmd/ksh93/tests/grep.sh >> grep.mm
|
|
|
|
echo '.VERBOFF' >> grep.mm
|
|
|
|
tdevice=ascii8
|
|
|
|
troff -Tascii8 < /dev/null > /dev/null 2>&1 || tdevice=utf8
|
|
|
|
cat src/cmd/ksh93/builtins.mm | sed 's/\\f5/\\fB/g;s/^\.H/\.P\n\.H/g' | troff -T$tdevice -t -mm | grotty -bou > Builtins
|
|
|
|
cat src/cmd/ksh93/PROMO.mm | sed 's/\\f5/\\fB/g;s/^\.H/\.P\n\.H/g' | troff -T$tdevice -t -mm | grotty -bou > PROMO
|
|
|
|
cat src/cmd/ksh93/OBSOLETE.mm | sed 's/\\f5/\\fB/g;s/^\.H/\.P\n\.H/g' | troff -T$tdevice -t -mm | grotty -bou > OBSOLETE
|
|
|
|
cat src/cmd/ksh93/sh.memo | sed 's/\\f5/\\fB/g;s/^\.H/\.P\n\.H/g' | troff -T$tdevice -t -mm | grotty -bou > MEMORANDUM
|
2008-02-15 01:27:23 +01:00
|
|
|
cp %{S:21} .
|
2008-09-24 17:01:34 +02:00
|
|
|
%if %use_suid_exe
|
2011-05-24 18:36:50 +02:00
|
|
|
set -C
|
2008-09-24 17:01:34 +02:00
|
|
|
(cat > %{buildroot}%{_sysconfdir}/permissions.d/ksh) <<-EOF
|
|
|
|
/%{_lib}/ast/bin/suid_exec root:root 4755
|
|
|
|
EOF
|
|
|
|
(cat > %{buildroot}%{_sysconfdir}/permissions.d/ksh.paranoid) <<-EOF
|
|
|
|
/%{_lib}/ast/bin/suid_exec root:root 0755
|
|
|
|
EOF
|
2011-05-24 18:36:50 +02:00
|
|
|
set +C
|
2008-09-24 17:01:34 +02:00
|
|
|
%endif
|
2007-01-12 17:45:13 +01:00
|
|
|
|
|
|
|
%post
|
|
|
|
test -e etc/bash.bashrc && ln -sf bash.bashrc etc/ksh.kshrc || true
|
2010-03-07 10:57:52 +01:00
|
|
|
%if %suse_version > 1120
|
|
|
|
%{_sbindir}/update-alternatives \
|
2012-01-20 18:45:26 +01:00
|
|
|
%if %suse_version > 1210
|
|
|
|
--force \
|
|
|
|
%endif
|
2010-03-07 10:57:52 +01:00
|
|
|
--install /bin/ksh ksh /%{_lib}/ast/bin/ksh 20 \
|
|
|
|
--slave %{_bindir}/ksh usr-bin-ksh /%{_lib}/ast/bin/ksh \
|
|
|
|
--slave %{_mandir}/man1/ksh.1.gz ksh.1.gz %{_mandir}/man1/ksh93.1.gz
|
|
|
|
%else
|
2007-04-03 21:36:49 +02:00
|
|
|
if test -x %{_lib}/ast/bin/ksh ; then
|
2007-01-12 17:45:13 +01:00
|
|
|
rm -f bin/ksh
|
2007-04-03 21:36:49 +02:00
|
|
|
ln -sf /%{_lib}/ast/bin/ksh bin/ksh
|
2010-03-07 10:57:52 +01:00
|
|
|
rm -f %{_exec_prefix}/bin/ksh
|
|
|
|
ln -sf /%{_lib}/ast/bin/ksh %{_exec_prefix}/bin/ksh
|
|
|
|
fi
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %suse_version > 1120
|
|
|
|
|
|
|
|
%preun
|
2010-03-08 17:20:52 +01:00
|
|
|
if test $1 -eq 0 ; then
|
|
|
|
%{_sbindir}/update-alternatives --remove ksh /%{_lib}/ast/bin/ksh
|
2007-01-12 17:45:13 +01:00
|
|
|
fi
|
2010-03-07 10:57:52 +01:00
|
|
|
%endif
|
2010-03-07 09:01:54 +01:00
|
|
|
|
2007-01-12 17:45:13 +01:00
|
|
|
%postun
|
2008-03-19 12:59:19 +01:00
|
|
|
if test ! -x %{_lib}/ast/bin/ksh ; then
|
2007-01-12 17:45:13 +01:00
|
|
|
if test ! -x bin/pdksh ; then
|
|
|
|
rm -f etc/ksh.kshrc
|
|
|
|
fi
|
2010-03-07 10:57:52 +01:00
|
|
|
%if %suse_version <= 1120
|
2007-01-12 17:45:13 +01:00
|
|
|
if test ! -e bin/ksh ; then
|
2010-03-07 10:57:52 +01:00
|
|
|
rm -f bin/ksh %{_exec_prefix}/bin/ksh
|
2007-01-12 17:45:13 +01:00
|
|
|
fi
|
2010-03-07 10:57:52 +01:00
|
|
|
%endif
|
2007-01-12 17:45:13 +01:00
|
|
|
fi
|
|
|
|
|
2008-02-15 01:27:23 +01:00
|
|
|
%files -f ksh.lang
|
2007-01-12 17:45:13 +01:00
|
|
|
%defattr(-,root,root)
|
2008-09-24 17:01:34 +02:00
|
|
|
%if %use_suid_exe
|
|
|
|
%{_sysconfdir}/permissions.d/ksh
|
|
|
|
%{_sysconfdir}/permissions.d/ksh.paranoid
|
|
|
|
%endif
|
2007-01-12 17:45:13 +01:00
|
|
|
%doc LICENSE src/cmd/ksh93/COMPATIBILITY src/cmd/ksh93/RELEASE*
|
|
|
|
%doc Builtins PROMO OBSOLETE MEMORANDUM
|
2010-03-07 10:57:52 +01:00
|
|
|
%doc %{_mandir}/man1/shcomp.1.gz
|
2007-01-12 17:45:13 +01:00
|
|
|
%ghost %verify(not link) /bin/ksh
|
2007-05-25 17:26:52 +02:00
|
|
|
%ghost %verify(not link) %{_bindir}/ksh
|
2010-03-07 10:57:52 +01:00
|
|
|
%if %suse_version > 1120
|
|
|
|
%ghost %verify(not link) %{_mandir}/man1/ksh.1.gz
|
|
|
|
%doc %{_mandir}/man1/ksh93.1.gz
|
|
|
|
/bin/ksh93
|
|
|
|
%{_bindir}/ksh93
|
|
|
|
%else
|
|
|
|
%doc %{_mandir}/man1/ksh.1.gz
|
|
|
|
%endif
|
2007-05-25 17:26:52 +02:00
|
|
|
%{_bindir}/rksh
|
|
|
|
%{_bindir}/shcomp
|
2007-04-03 21:36:49 +02:00
|
|
|
%dir /%{_lib}/ast
|
|
|
|
%dir /%{_lib}/ast/bin
|
2008-03-26 16:18:52 +01:00
|
|
|
/%{_lib}/ast/ksh
|
2007-04-03 21:36:49 +02:00
|
|
|
/%{_lib}/ast/bin/ksh
|
|
|
|
/%{_lib}/ast/bin/shcomp
|
2008-09-24 17:01:34 +02:00
|
|
|
%if %use_suid_exe
|
|
|
|
%attr(4755,root,root) /%{_lib}/ast/bin/suid_exec
|
|
|
|
%endif
|
2009-12-11 16:15:17 +01:00
|
|
|
/%{_lib}/ast/*.so*
|
|
|
|
/%{_lib}/ksh
|
2008-09-24 17:01:34 +02:00
|
|
|
%dir %{_datadir}/ksh
|
|
|
|
%dir %{_datadir}/ksh/fun
|
|
|
|
%{_datadir}/ksh/fun/*
|
2007-01-12 17:45:13 +01:00
|
|
|
|
|
|
|
%files -n ksh-devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc LICENSE Warning
|
|
|
|
%dir %{_libdir}/ast/
|
|
|
|
%{_libdir}/ast/*.so
|
|
|
|
%{_libdir}/ast/*.a
|
|
|
|
%doc %{_mandir}/man3/*
|
2007-05-25 17:26:52 +02:00
|
|
|
%{_includedir}/ast/
|
2007-11-23 02:11:50 +01:00
|
|
|
|
2007-03-29 00:44:12 +02:00
|
|
|
%changelog
|