mksh/mksh.spec

73 lines
2.1 KiB
RPMSpec
Raw Normal View History

2007-06-18 06:07:05 +00:00
%define _bindir /bin
Summary: MirBSD enhanced version of the Korn Shell
Name: mksh
2007-07-28 11:30:15 +00:00
Version: 30
2007-06-18 13:58:25 +00:00
Release: 1%{?dist}
2007-06-18 06:07:05 +00:00
License: BSD
Group: System Environment/Shells
URL: http://www.mirbsd.de/%{name}/
Source: http://www.mirbsd.org/MirOS/dist/mir/%{name}/%{name}-R%{version}.cpio.gz
Requires(post): grep
Requires(postun): coreutils, grep
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
mksh is the MirBSD enhanced version of the Public Domain Korn shell (pdksh),
a bourne-compatible shell which is largely similar to the original AT&T Korn
shell. It includes bug fixes and feature improvements in order to produce a
modern, robust shell good for interactive and especially script use, being a
bourne shell replacement, pdksh successor and an alternative to the C shell.
%prep
%setup -q -T -c
# RPM 4.4.2 has no support for *.cpio.gz
gzip -dc %{SOURCE0} | cpio -imd
mv %{name}/* . && rm -rf %{name}
%build
2007-07-28 11:30:15 +00:00
CFLAGS="$RPM_OPT_FLAGS" sh Build.sh -r -Q
2007-06-18 06:07:05 +00:00
%install
rm -rf $RPM_BUILD_ROOT
install -D -m 755 %{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
install -D -m 644 %{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
%check
sh test.sh -v
%post
if [ ! -f %{_sysconfdir}/shells ]; then
echo "%{_bindir}/%{name}" >> %{_sysconfdir}/shells
else
grep -q "^%{_bindir}/%{name}$" %{_sysconfdir}/shells || \
echo "%{_bindir}/%{name}" >> %{_sysconfdir}/shells
fi
%postun
if [ ! -x %{_bindir}/%{name} ]; then
grep -v "^%{_bindir}/%{name}$" %{_sysconfdir}/shells > %{_sysconfdir}/shells.rpm
cat %{_sysconfdir}/shells.rpm > %{_sysconfdir}/shells && rm -f %{_sysconfdir}/shells.rpm
fi
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc copyright dot.mkshrc
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*
%changelog
2007-07-28 11:30:15 +00:00
* Sat Jul 28 2007 Robert Scheck <robert@fedoraproject.org> 30-1
- Upgrade to 30
2007-07-14 13:48:04 +00:00
* Sat Jul 14 2007 Robert Scheck <robert@fedoraproject.org> 29g-1
- Upgrade to 29g
2007-06-18 06:07:05 +00:00
* Sun Jun 03 2007 Robert Scheck <robert@fedoraproject.org> 29f-1
- Upgrade to 29f
- Initial spec file for Fedora and Red Hat Enterprise Linux