- Added default configuration /etc/mkshrc & /etc/skel/.mkshrc as default

skel (like at bash; thanks to Michal Hlavinka)
- Corrected the license tag (thanks to Michal Hlavinka)
- Removed the arc4random.c file (upstream is phasing it out)
This commit is contained in:
Robert Scheck 2010-07-11 18:57:31 +00:00
parent c142085e31
commit e2f293dd3f
3 changed files with 26 additions and 14 deletions

8
dot-mkshrc Normal file
View File

@ -0,0 +1,8 @@
# .mkshrc
# Source global definitions
if [ -f /etc/mkshrc ]; then
. /etc/mkshrc
fi
# User specific aliases and functions

View File

@ -3,14 +3,15 @@
Summary: MirBSD enhanced version of the Korn Shell Summary: MirBSD enhanced version of the Korn Shell
Name: mksh Name: mksh
Version: 39c Version: 39c
Release: 1%{?dist} Release: 2%{?dist}
License: MirOS # BSD (setmode.c), ISC (strlcpy.c), MirOS (the rest)
License: MirOS and ISC and BSD
Group: System Environment/Shells Group: System Environment/Shells
URL: http://www.mirbsd.de/%{name}/ URL: http://www.mirbsd.de/%{name}.htm
Source0: http://www.mirbsd.org/MirOS/dist/mir/%{name}/%{name}-R%{version}.cpio.gz Source0: http://www.mirbsd.org/MirOS/dist/mir/%{name}/%{name}-R%{version}.cpio.gz
Source1: http://www.mirbsd.org/MirOS/dist/hosted/other/arc4random.c Source1: dot-mkshrc
Requires(post): grep Requires(post): grep
Requires(postun): coreutils, grep Requires(postun): sed
BuildRequires: util-linux, ed BuildRequires: util-linux, ed
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -27,7 +28,6 @@ bourne shell replacement, pdksh successor and an alternative to the C shell.
# rpm.org has no support for *.cpio.gz # rpm.org has no support for *.cpio.gz
gzip -dc %{SOURCE0} | cpio -imd gzip -dc %{SOURCE0} | cpio -imd
mv %{name}/* . && rm -rf %{name} mv %{name}/* . && rm -rf %{name}
cp -f %{SOURCE1} .
%build %build
CFLAGS="$RPM_OPT_FLAGS" sh Build.sh -r -combine CFLAGS="$RPM_OPT_FLAGS" sh Build.sh -r -combine
@ -36,6 +36,8 @@ CFLAGS="$RPM_OPT_FLAGS" sh Build.sh -r -combine
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
install -D -m 755 %{name} $RPM_BUILD_ROOT%{_bindir}/%{name} install -D -m 755 %{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
install -D -m 644 %{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1 install -D -m 644 %{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
install -D -p -m 644 dot.mkshrc $RPM_BUILD_ROOT%{_sysconfdir}/mkshrc
install -D -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/skel/.mkshrc
%check %check
echo > test.wait echo > test.wait
@ -48,17 +50,12 @@ while test -e test.wait; do
done done
%post %post
if [ ! -f %{_sysconfdir}/shells ]; then grep -q "^%{_bindir}/%{name}$" %{_sysconfdir}/shells 2>/dev/null || \
echo "%{_bindir}/%{name}" >> %{_sysconfdir}/shells echo "%{_bindir}/%{name}" >> %{_sysconfdir}/shells
else
grep -q "^%{_bindir}/%{name}$" %{_sysconfdir}/shells || \
echo "%{_bindir}/%{name}" >> %{_sysconfdir}/shells
fi
%postun %postun
if [ ! -x %{_bindir}/%{name} ]; then if [ ! -x %{_bindir}/%{name} ]; then
grep -v "^%{_bindir}/%{name}$" %{_sysconfdir}/shells > %{_sysconfdir}/shells.rpm sed -e 's@^%{_bindir}/%{name}$@POSTUNREMOVE@' -e '/^POSTUNREMOVE$/d' -i %{_sysconfdir}/shells
cat %{_sysconfdir}/shells.rpm > %{_sysconfdir}/shells && rm -f %{_sysconfdir}/shells.rpm
fi fi
%clean %clean
@ -68,9 +65,17 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc dot.mkshrc %doc dot.mkshrc
%{_bindir}/%{name} %{_bindir}/%{name}
%config(noreplace) %{_sysconfdir}/mkshrc
%config(noreplace) %{_sysconfdir}/skel/.mkshrc
%{_mandir}/man1/%{name}.1* %{_mandir}/man1/%{name}.1*
%changelog %changelog
* Sun Jul 11 2010 Robert Scheck <robert@fedoraproject.org> 39c-2
- Added default configuration /etc/mkshrc & /etc/skel/.mkshrc
as default skel (like at bash; thanks to Michal Hlavinka)
- Corrected the license tag (thanks to Michal Hlavinka)
- Removed the arc4random.c file (upstream is phasing it out)
* Sat Feb 27 2010 Robert Scheck <robert@fedoraproject.org> 39c-1 * Sat Feb 27 2010 Robert Scheck <robert@fedoraproject.org> 39c-1
- Upgrade to 39c and updated arc4random.c file - Upgrade to 39c and updated arc4random.c file

View File

@ -1,2 +1 @@
0c3cd172b47eefcdf9a302baa42f5092 mksh-R39c.cpio.gz 0c3cd172b47eefcdf9a302baa42f5092 mksh-R39c.cpio.gz
442f34c6c44a35d6d3daf393dcd4598a arc4random.c