psss / rpms / mksh

Forked from rpms/mksh 5 years ago
Clone
5b36a8f
%define _bindir   /bin
5b36a8f
5b36a8f
Summary:          MirBSD enhanced version of the Korn Shell
5b36a8f
Name:             mksh
ae09076
Version:          32
37ffe68
Release:          1%{?dist}
278be4e
License:          BSD with advertising
5b36a8f
Group:            System Environment/Shells
5b36a8f
URL:              http://www.mirbsd.de/%{name}/
df4ee1d
Source0:          http://www.mirbsd.org/MirOS/dist/mir/%{name}/%{name}-R%{version}.cpio.gz
df4ee1d
Source1:          http://www.mirbsd.org/MirOS/dist/hosted/other/arc4random.c
5b36a8f
Requires(post):   grep
5b36a8f
Requires(postun): coreutils, grep
df4ee1d
BuildRequires:    util-linux, ed
5b36a8f
BuildRoot:        %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
5b36a8f
5b36a8f
%description
5b36a8f
mksh is the MirBSD enhanced version of the Public Domain Korn shell (pdksh),
5b36a8f
a bourne-compatible shell which is largely similar to the original AT&T Korn
5b36a8f
shell. It includes bug fixes and feature improvements in order to produce a
5b36a8f
modern, robust shell good for interactive and especially script use, being a
5b36a8f
bourne shell replacement, pdksh successor and an alternative to the C shell.
5b36a8f
5b36a8f
%prep
5b36a8f
%setup -q -T -c
5b36a8f
5b36a8f
# RPM 4.4.2 has no support for *.cpio.gz
5b36a8f
gzip -dc %{SOURCE0} | cpio -imd
5b36a8f
mv %{name}/* . && rm -rf %{name}
df4ee1d
cp -f %{SOURCE1} .
5b36a8f
5b36a8f
%build
bd3218d
CFLAGS="$RPM_OPT_FLAGS" sh Build.sh -r -Q
5b36a8f
5b36a8f
%install
5b36a8f
rm -rf $RPM_BUILD_ROOT
5b36a8f
install -D -m 755 %{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
5b36a8f
install -D -m 644 %{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
5b36a8f
5b36a8f
%check
ae09076
echo > test.wait
ae09076
script -qc './test.sh -v; x=$?; rm -f test.wait; exit $x'
ae09076
maxwait=0
ae09076
while test -e test.wait; do
ae09076
  sleep 1
ae09076
  maxwait=$(expr $maxwait + 1)
ae09076
  test $maxwait -lt 900 || break
ae09076
done
5b36a8f
5b36a8f
%post
5b36a8f
if [ ! -f %{_sysconfdir}/shells ]; then
5b36a8f
  echo "%{_bindir}/%{name}" >> %{_sysconfdir}/shells
5b36a8f
else
5b36a8f
  grep -q "^%{_bindir}/%{name}$" %{_sysconfdir}/shells || \
5b36a8f
  echo "%{_bindir}/%{name}" >> %{_sysconfdir}/shells
5b36a8f
fi
5b36a8f
5b36a8f
%postun
5b36a8f
if [ ! -x %{_bindir}/%{name} ]; then
5b36a8f
  grep -v "^%{_bindir}/%{name}$" %{_sysconfdir}/shells > %{_sysconfdir}/shells.rpm
5b36a8f
  cat %{_sysconfdir}/shells.rpm > %{_sysconfdir}/shells && rm -f %{_sysconfdir}/shells.rpm
5b36a8f
fi
5b36a8f
5b36a8f
%clean
5b36a8f
rm -rf $RPM_BUILD_ROOT
5b36a8f
5b36a8f
%files
5b36a8f
%defattr(-,root,root)
5b36a8f
%doc copyright dot.mkshrc
5b36a8f
%{_bindir}/%{name}
5b36a8f
%{_mandir}/man1/%{name}.1*
5b36a8f
5b36a8f
%changelog
ae09076
* Sat Nov 10 2007 Robert Scheck <robert@fedoraproject.org> 32-1
ae09076
- Upgrade to 32
ae09076
- Solved fork problems in %%check (thanks to Thorsten Glaser)
ae09076
ca273b6
* Mon Oct 15 2007 Robert Scheck <robert@fedoraproject.org> 31d-1
ca273b6
- Upgrade to 31d
ca273b6
df4ee1d
* Wed Sep 12 2007 Robert Scheck <robert@fedoraproject.org> 31c-1
df4ee1d
- Upgrade to 31c
df4ee1d
- Added a buildrequirement to ed, added arc4random.c file
df4ee1d
7f472df
* Tue Sep 11 2007 Robert Scheck <robert@fedoraproject.org> 31b-1
7f472df
- Upgrade to 31b
7f472df
- Use script to get %%check happy (thanks to Thorsten Glaser)
7f472df
37ffe68
* Sat Sep 08 2007 Robert Scheck <robert@fedoraproject.org> 31-1
37ffe68
- Upgrade to 31
37ffe68
278be4e
* Tue Aug 28 2007 Robert Scheck <robert@fedoraproject.org> 30-2
278be4e
- Updated the license tag according to the guidelines
278be4e
bd3218d
* Sat Jul 28 2007 Robert Scheck <robert@fedoraproject.org> 30-1
bd3218d
- Upgrade to 30
bd3218d
7bb583b
* Sat Jul 14 2007 Robert Scheck <robert@fedoraproject.org> 29g-1
7bb583b
- Upgrade to 29g
7bb583b
5b36a8f
* Sun Jun 03 2007 Robert Scheck <robert@fedoraproject.org> 29f-1
5b36a8f
- Upgrade to 29f
5b36a8f
- Initial spec file for Fedora and Red Hat Enterprise Linux