psss / rpms / ksh

Forked from rpms/ksh 6 years ago
Clone
cvsdist 7b811d5
%define       releasedate   2004-02-29
7e82c20
ExcludeArch:  ia64
cvsdist 7b811d5
cvsdist 00f58df
Name:         ksh
cvsdist 7b811d5
Summary:      The Original ATT Korn Shell
cvsdist 00f58df
URL:          http://www.kornshell.com/
cvsdist 7b811d5
Group:        Applications/Shells
cvsdist 7b811d5
License:      AT&T Open Source
cvsdist 7b811d5
Version:      20040229
7e82c20
Release:      10
cvsdist 7b811d5
Source0:      http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{releasedate}.tgz
cvsdist 7b811d5
Source1:      http://www.research.att.com/~gsf/download/tgz/INIT.%{releasedate}.tgz
cvsdist 7b811d5
Source2:      http://www.research.att.com/~gsf/download/tgz/ast-base-locale.%{releasedate}.tgz
cvsdist 7b811d5
Patch0:       ksh-2004-02-29-ppc64.patch
cvsdist 7b811d5
cvsdist 7b811d5
#   build information
cvsdist 7b811d5
BuildRoot:    %{_tmppath}/%{name}-%{version}-root
cvsdist 7b811d5
Provides:     ksh93
cvsdist 7b811d5
Obsoletes:    ksh93
cvsdist 7b811d5
Provides:     pdksh
cvsdist 00f58df
Obsoletes:    pdksh
cvsdist 00f58df
cvsdist 00f58df
%description
cvsdist 7b811d5
KSH-93 is the most recent version of the KornShell by David Korn of 
cvsdist 7b811d5
AT&T Bell Laboratories.
cvsdist 7b811d5
KornShell is a shell programming language, which is upward compatible
cvsdist 7b811d5
with "sh" (the Bourne Shell).
cvsdist 7b811d5
cvsdist 7b811d5
Proprietary Notice:
cvsdist 7b811d5
This  product  contains   certain  software  code  or  other
cvsdist 7b811d5
information  ("AT&T  Software")  proprietary  to  AT&T  Corp.
cvsdist 7b811d5
("AT&T"). The  AT&T Software is provided  to you "AS IS". YOU
cvsdist 7b811d5
ASSUME  TOTAL RESPONSIBILITY  AND  RISK FOR  USE OF  THE AT&T
cvsdist 7b811d5
SOFTWARE. AT&T  DOES NOT  MAKE, AND EXPRESSLY  DISCLAIMS, ANY
cvsdist 7b811d5
EXPRESS  OR  IMPLIED   WARRANTIES  OF  ANY  KIND  WHATSOEVER,
cvsdist 7b811d5
INCLUDING,  WITHOUT  LIMITATION,  THE  IMPLIED WARRANTIES  OF
cvsdist 7b811d5
MERCHANTABILITY   OR  FITNESS   FOR  A   PARTICULAR  PURPOSE,
cvsdist 7b811d5
WARRANTIES OF  TITLE OR NON-INFRINGEMENT  OF ANY INTELLECTUAL
cvsdist 7b811d5
PROPERTY RIGHTS,  ANY WARRANTIES  ARISING BY USAGE  OF TRADE,
cvsdist 7b811d5
COURSE OF  DEALING OR COURSE OF  PERFORMANCE, OR ANY WARRANTY
cvsdist 7b811d5
THAT  THE AT&T  SOFTWARE IS  "ERROR FREE"  OR WILL  MEET YOUR
cvsdist 7b811d5
REQUIREMENTS.
cvsdist 00f58df
cvsdist 00f58df
%prep
cvsdist 7b811d5
%setup -q -c
cvsdist 7b811d5
%setup -q -T -D -a 1
cvsdist 7b811d5
%setup -q -T -D -a 2
cvsdist 7b811d5
%patch0 -p1 -b .ppc64
cvsdist 00f58df
cvsdist 00f58df
%build
cvsdist 7b811d5
./bin/package "read" ||:
cvsdist 7b811d5
./bin/package "make"
cvsdist 7b811d5
cp lib/package/LICENSES/ast LICENSE
cvsdist 00f58df
cvsdist 00f58df
%install
cvsdist 00f58df
rm -rf $RPM_BUILD_ROOT
cvsdist 7b811d5
mkdir -p $RPM_BUILD_ROOT{/bin,%{_mandir}/man1}
cvsdist 7b811d5
mkdir -p $RPM_BUILD_ROOT%{_datadir}/locale/{C,pt,fr,de,it,es}/LC_MESSAGES
cvsdist 7b811d5
install -c -s -m 755 arch/*/bin/ksh $RPM_BUILD_ROOT/bin/ksh
cvsdist 7b811d5
install -c -m 644 arch/*/man/man1/sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ksh.1
cvsdist 7b811d5
for i in C pt fr de it es; do
cvsdist 7b811d5
install -m 644 share/lib/locale/$i/LC_MESSAGES/* \
cvsdist 7b811d5
               $RPM_BUILD_ROOT%{_datadir}/locale/$i/LC_MESSAGES/
cvsdist 7b811d5
done
cvsdist 00f58df
cvsdist 7b811d5
%post
cvsdist 00f58df
if [ ! -f /etc/shells ]; then
cvsdist 00f58df
        echo "/bin/ksh" > /etc/shells
cvsdist 00f58df
else
cvsdist 00f58df
        if ! grep -q '^/bin/ksh$' /etc/shells ; then
cvsdist 00f58df
                echo "/bin/ksh" >> /etc/shells
cvsdist 00f58df
        fi
cvsdist 00f58df
fi
cvsdist 00f58df
cvsdist 7b811d5
%postun
cvsdist 00f58df
if [ ! -f /bin/ksh ]; then
cvsdist 7b811d5
        grep -v '^/bin/ksh$' /etc/shells >/etc/shells.new
cvsdist 00f58df
        mv /etc/shells.new /etc/shells
cvsdist 7b811d5
        chmod 644 /etc/shells
cvsdist 00f58df
fi
cvsdist 00f58df
cvsdist 7b811d5
%verifyscript
cvsdist 7b811d5
echo -n "Looking for ksh in /etc/shells... "
cvsdist 7b811d5
if ! grep '^/bin/ksh$' /etc/shells > /dev/null; then
cvsdist 7b811d5
    echo "missing"
cvsdist 7b811d5
    echo "ksh missing from /etc/shells" >&2
cvsdist 7b811d5
else
cvsdist 7b811d5
    echo "found"
cvsdist 7b811d5
fi
cvsdist 7b811d5
cvsdist 7b811d5
%files 
cvsdist 7b811d5
%defattr(-, root, root)
cvsdist 7b811d5
%doc "-- *NOTICE*"
cvsdist 7b811d5
%doc README LICENSE
cvsdist 7b811d5
/bin/*
cvsdist 7b811d5
%{_datadir}/locale/*/LC_MESSAGES/*
cvsdist 00f58df
%{_mandir}/man1/*
cvsdist 7b811d5
cvsdist 7b811d5
%clean
cvsdist 7b811d5
    rm -rf $RPM_BUILD_ROOT
cvsdist 00f58df
cvsdist 00f58df
%changelog
7e82c20
* Tue Nov 02 2004 Karsten Hopp <karsten@redhat.de> 20040229-10
7e82c20
- disable ia64 for now
7e82c20
df9066f
* Fri Oct 15 2004 Karsten Hopp <karsten@redhat.de> 20040229-9 
df9066f
- rebuild
df9066f
cvsdist 7b811d5
* Thu Sep 02 2004 Nalin Dahyabhai <nalin@redhat.com> 20040229-8
cvsdist 7b811d5
- remove '&' from summary
cvsdist 7b811d5
cvsdist 7b811d5
* Thu Sep 02 2004 Bill Nottingham <notting@redhat.com> 20040229-7
cvsdist 7b811d5
- obsolete pdksh (#131303)
cvsdist 7b811d5
cvsdist 7b811d5
* Mon Aug 02 2004 Karsten Hopp <karsten@redhat.de> 20040229-6
cvsdist 7b811d5
- obsolete ksh93, provide ksh93
cvsdist 7b811d5
cvsdist 7b811d5
* Mon Jul 05 2004 Karsten Hopp <karsten@redhat.de> 20040229-3 
cvsdist 7b811d5
- add /bin/ksh to /etc/shells
cvsdist 7b811d5
cvsdist 7b811d5
* Wed Jun 16 2004 Karsten Hopp <karsten@redhat.de> 20040229-2 
cvsdist 7b811d5
- add ppc64 patch to avoid ppc64 dot symbol problem
cvsdist 7b811d5
cvsdist 7b811d5
* Fri May 28 2004 Karsten Hopp <karsten@redhat.de> 20040229-1 
cvsdist 7b811d5
- initial version
cvsdist 00f58df