|
|
5b36a8f |
%define _bindir /bin
|
|
|
5b36a8f |
|
|
|
5b36a8f |
Summary: MirBSD enhanced version of the Korn Shell
|
|
|
5b36a8f |
Name: mksh
|
|
|
bd3218d |
Version: 30
|
|
|
682175c |
Release: 1%{?dist}
|
|
|
5b36a8f |
License: BSD
|
|
|
5b36a8f |
Group: System Environment/Shells
|
|
|
5b36a8f |
URL: http://www.mirbsd.de/%{name}/
|
|
|
5b36a8f |
Source: http://www.mirbsd.org/MirOS/dist/mir/%{name}/%{name}-R%{version}.cpio.gz
|
|
|
5b36a8f |
Requires(post): grep
|
|
|
5b36a8f |
Requires(postun): coreutils, grep
|
|
|
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}
|
|
|
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
|
|
|
5b36a8f |
sh test.sh -v
|
|
|
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
|
|
|
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
|