0ec2a0
%define       releasedate   2009-05-05
cvsdist 7b811d
cvsdist 00f58d
Name:         ksh
cvsdist 7b811d
Summary:      The Original ATT Korn Shell
cvsdist 00f58d
URL:          http://www.kornshell.com/
64f1bf
Group:        System Environment/Shells
53ba2c
License:      CPL
0ec2a0
Version:      20090505
f532cf
Release:      2%{?dist}
cvsdist 7b811d
Source0:      http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{releasedate}.tgz
521d11
Source1:      http://www.research.att.com/~gsf/download/tgz/INIT.%{releasedate}.tgz
9d5844
Source3:      kshrc.rhs
9d5844
Source4:      dotkshrc
b30d35
b30d35
#don't use not wanted/needed builtins
b30d35
Patch1:       ksh-20070328-builtins.patch
b30d35
0f1664
BuildRoot:    %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
fd54fb
Conflicts:    pdksh
8a6e4f
Requires: coreutils, glibc-common, diffutils
a8955d
BuildRequires: bison
0f1664
Requires(post): grep, coreutils
0f1664
Requires(preun): grep, coreutils
cvsdist 00f58d
cvsdist 00f58d
%description
a8955d
KSH-93 is the most recent version of the KornShell by David Korn of
cvsdist 7b811d
AT&T Bell Laboratories.
cvsdist 7b811d
KornShell is a shell programming language, which is upward compatible
cvsdist 7b811d
with "sh" (the Bourne Shell).
cvsdist 7b811d
cvsdist 00f58d
%prep
cvsdist 7b811d
%setup -q -c
cvsdist 7b811d
%setup -q -T -D -a 1
b30d35
%patch1 -p1 -b .builtins
cvsdist 00f58d
cvsdist 00f58d
%build
cvsdist 7b811d
./bin/package "read" ||:
8a6e4f
export CCFLAGS="$RPM_OPT_FLAGS"
8a6e4f
export CC=gcc
8a6e4f
./bin/package "make"
cvsdist 7b811d
cp lib/package/LICENSES/ast LICENSE
cvsdist 00f58d
cvsdist 00f58d
%install
cvsdist 00f58d
rm -rf $RPM_BUILD_ROOT
b30d35
mkdir -p $RPM_BUILD_ROOT{/bin,%{_bindir},%{_mandir}/man1}
59272c
install -c -m 755 arch/*/bin/ksh $RPM_BUILD_ROOT/bin/ksh
cvsdist 7b811d
install -c -m 644 arch/*/man/man1/sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ksh.1
9d5844
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/skel
9d5844
install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/skel/.kshrc
9d5844
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/kshrc
cvsdist 00f58d
cvsdist 7b811d
%post
cvsdist 00f58d
if [ ! -f /etc/shells ]; then
cvsdist 00f58d
        echo "/bin/ksh" > /etc/shells
cvsdist 00f58d
else
cvsdist 00f58d
        if ! grep -q '^/bin/ksh$' /etc/shells ; then
cvsdist 00f58d
                echo "/bin/ksh" >> /etc/shells
cvsdist 00f58d
        fi
cvsdist 00f58d
fi
cvsdist 00f58d
cvsdist 7b811d
%postun
cvsdist 00f58d
if [ ! -f /bin/ksh ]; then
e9c80e
	sed -i '/^\/bin\/ksh$/ d' /etc/shells
cvsdist 00f58d
fi
cvsdist 00f58d
cvsdist 7b811d
%verifyscript
cvsdist 7b811d
echo -n "Looking for ksh in /etc/shells... "
cvsdist 7b811d
if ! grep '^/bin/ksh$' /etc/shells > /dev/null; then
cvsdist 7b811d
    echo "missing"
cvsdist 7b811d
    echo "ksh missing from /etc/shells" >&2
cvsdist 7b811d
else
cvsdist 7b811d
    echo "found"
cvsdist 7b811d
fi
cvsdist 7b811d
cvsdist 7b811d
%files 
0f1664
%defattr(-, root, root,-)
cvsdist 7b811d
%doc README LICENSE
b30d35
/bin/ksh
cvsdist 00f58d
%{_mandir}/man1/*
9d5844
%config(noreplace) %{_sysconfdir}/skel/.kshrc
9d5844
%config(noreplace) %{_sysconfdir}/kshrc
cvsdist 7b811d
cvsdist 7b811d
%clean
cvsdist 7b811d
    rm -rf $RPM_BUILD_ROOT
cvsdist 00f58d
cvsdist 00f58d
%changelog
f532cf
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20090505-2
f532cf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
f532cf
0ec2a0
* Mon May 11 2009 Michal Hlavinka <mhalvink@redhat.com> - 20090505-1
0ec2a0
- updated to 2009-05-05
0ec2a0
9c0193
* Tue May 05 2009 Michal Hlavinka <mhalvink@redhat.com> - 20090501-1
9c0193
- updated to 2009-05-01
9c0193
895e24
* Tue Mar 10 2009 Michal Hlavinka <mhlavink@redhat.com> - 20081104-3
895e24
- fix typos in spec file
895e24
6bc5dc
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20081104-2
6bc5dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
6bc5dc
895e24
* Tue Jan 21 2009 Michal Hlavinka <mhlavink@redhat.com> 20081104-1
b30d35
- update to 2008-11-04
b30d35
- ast-ksh-locales are not useable remove them
b30d35
895e24
* Tue Oct 21 2008 Michal Hlavinka <mhlavink@redhat.com> 20080725-4
9d5844
- fix #467025 - Ksh fails to initialise environment when login from graphic console
9d5844
a8955d
* Wed Aug 06 2008 Tomas Smetana <tsmetana@redhat.com> 20080725-3
a8955d
- fix BuildRequires, rebuild
a8955d
53ba2c
* Tue Aug  5 2008 Tom "spot" Callaway <tcallawa@redhat.com> 20080725-2
53ba2c
- fix license tag
53ba2c
a66459
* Mon Jul 28 2008 Tomas Smetana <tsmetana@redhat.com> 20080725-1
a66459
- new upstream version
a66459
a66459
* Thu Jun 26 2008 Tomas Smetana <tsmetana@redhat.com> 20080624-1
a66459
- new upstream version
a66459
0f1170
* Mon Feb 11 2008 Tomas Smetana <tsmetana@redhat.com> 20080202-1
0f1170
- new upstream version
0f1170
98fd27
* Wed Jan 30 2008 Tomas Smetana <tsmetana@redhat.com> 20071105-3
98fd27
- fix #430602 - ksh segfaults after unsetting OPTIND
98fd27
64f1bf
* Mon Jan 07 2008 Tomas Smetana <tsmetana@redhat.com> 20071105-2
64f1bf
- fix #405381 - ksh will not handle $(xxx) when typeset -r IFS
64f1bf
- fix #386501 - bad group in spec file
64f1bf
485234
* Wed Nov 07 2007 Tomas Smetana <tsmetana@redhat.com> 20071105-1
485234
- new upstream version
485234
b472a5
* Wed Aug 22 2007 Tomas Smetana <tsmetana@redhat.com> 20070628-1.1
b472a5
- rebuild
b472a5
3de28b
* Thu Jul 12 2007 Tomas Smetana <tsmetana@redhat.com> 20070628-1
3de28b
- new upstream version
3de28b
- fix unaligned access messages (Related: #219420)
3de28b
8a6e4f
* Tue May 22 2007 Tomas Smetana <tsmetana@redhat.com> 20070328-2
8a6e4f
- fix wrong exit status of spawned process after SIGSTOP
8a6e4f
- fix building of debuginfo package, add %%{?dist} to release
8a6e4f
- fix handling of SIGTTOU in non-interactive shell
8a6e4f
- remove useless builtins
8a6e4f
521d11
* Thu Apr 19 2007 Tomas Smetana <tsmetana@redhat.com> 20070328-1
521d11
- new upstream source
521d11
- fix login shell invocation (#182397)
521d11
- fix memory leak
521d11
0f1664
* Wed Feb 21 2007 Karsten Hopp <karsten@redhat.com> 20070111-1
0f1664
- new upstream version
0f1664
- fix invalid write in uname function
0f1664
e275b3
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 20060214-1.1
e275b3
- rebuild
e275b3
a90929
* Thu Jun 01 2006 Karsten Hopp <karsten@redhat.de> 20060214-1
a90929
- new upstream source
a90929
6b025a
* Mon Feb 27 2006 Karsten Hopp <karsten@redhat.de> 20060124-3
e059c6
- PreReq grep, coreutils (#182835)
e059c6
a5bc96
* Tue Feb 14 2006 Karsten Hopp <karsten@redhat.de> 20060124-2
a5bc96
- make it build in chroots (#180561)
a5bc96
c0b80f
* Mon Feb 13 2006 Karsten Hopp <karsten@redhat.de> 20060124-1
c0b80f
- version 20060124
c0b80f
a9cc8b
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 20050202-5.1
a9cc8b
- bump again for double-long bug on ppc(64)
a9cc8b
d2c1e3
* Fri Feb 10 2006 Karsten Hopp <karsten@redhat.de> 20050202-5
d2c1e3
- rebuild
d2c1e3
ab8bcb
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 20050202-4.1
ab8bcb
- rebuilt for new gcc4.1 snapshot and glibc changes
ab8bcb
997da7
* Thu Feb 02 2006 Karsten Hopp <karsten@redhat.de> 20050202-4
fd54fb
- fix uname -i output
fd54fb
- fix loop (*-path.patch)
fd54fb
- conflict pdksh instead of obsoleting it
fd54fb
997da7
* Fri Dec 16 2005 Jesse Keating <jkeating@redhat.com> 20050202-3.1
2e9b9f
- rebuilt for new gcj
2e9b9f
6700d0
* Tue May 10 2005 Karsten Hopp <karsten@redhat.de> 20050202-3
6700d0
- enable debuginfo
6700d0
527ccd
* Tue Mar 15 2005 Karsten Hopp <karsten@redhat.de> 20050202-2
527ccd
- add /usr/bin/ksh link for compatibility with pdksh scripts (#151134)
527ccd
62e78e
* Wed Mar 02 2005 Karsten Hopp <karsten@redhat.de> 20050202-1 
62e78e
- update and rebuild with gcc-4
62e78e
f313d4
* Tue Mar 01 2005 Karsten Hopp <karsten@redhat.de> 20041225-2 
f313d4
- fix gcc4 build 
f313d4
c790c1
* Fri Jan 21 2005 Karsten Hopp <karsten@redhat.de> 20041225-1
c790c1
- rebuild with new ksh tarball (license change)
c790c1
954d49
* Tue Nov 02 2004 Karsten Hopp <karsten@redhat.de> 20040229-11
7e82c2
- disable ia64 for now
7e82c2
df9066
* Fri Oct 15 2004 Karsten Hopp <karsten@redhat.de> 20040229-9 
df9066
- rebuild
df9066
cvsdist 7b811d
* Thu Sep 02 2004 Nalin Dahyabhai <nalin@redhat.com> 20040229-8
cvsdist 7b811d
- remove '&' from summary
cvsdist 7b811d
cvsdist 7b811d
* Thu Sep 02 2004 Bill Nottingham <notting@redhat.com> 20040229-7
cvsdist 7b811d
- obsolete pdksh (#131303)
cvsdist 7b811d
cvsdist 7b811d
* Mon Aug 02 2004 Karsten Hopp <karsten@redhat.de> 20040229-6
cvsdist 7b811d
- obsolete ksh93, provide ksh93
cvsdist 7b811d
cvsdist 7b811d
* Mon Jul 05 2004 Karsten Hopp <karsten@redhat.de> 20040229-3 
cvsdist 7b811d
- add /bin/ksh to /etc/shells
cvsdist 7b811d
cvsdist 7b811d
* Wed Jun 16 2004 Karsten Hopp <karsten@redhat.de> 20040229-2 
cvsdist 7b811d
- add ppc64 patch to avoid ppc64 dot symbol problem
cvsdist 7b811d
cvsdist 7b811d
* Fri May 28 2004 Karsten Hopp <karsten@redhat.de> 20040229-1 
cvsdist 7b811d
- initial version
cvsdist 00f58d