From e2f293dd3fe05d74c9e31eb1bfa6163fe0e5b3ea Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Jul 11 2010 18:57:31 +0000 Subject: - 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) --- diff --git a/dot-mkshrc b/dot-mkshrc new file mode 100644 index 0000000..b5839c9 --- /dev/null +++ b/dot-mkshrc @@ -0,0 +1,8 @@ +# .mkshrc + +# Source global definitions +if [ -f /etc/mkshrc ]; then + . /etc/mkshrc +fi + +# User specific aliases and functions diff --git a/mksh.spec b/mksh.spec index 602870d..f9973c5 100644 --- a/mksh.spec +++ b/mksh.spec @@ -3,14 +3,15 @@ Summary: MirBSD enhanced version of the Korn Shell Name: mksh Version: 39c -Release: 1%{?dist} -License: MirOS +Release: 2%{?dist} +# BSD (setmode.c), ISC (strlcpy.c), MirOS (the rest) +License: MirOS and ISC and BSD 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 -Source1: http://www.mirbsd.org/MirOS/dist/hosted/other/arc4random.c +Source1: dot-mkshrc Requires(post): grep -Requires(postun): coreutils, grep +Requires(postun): sed BuildRequires: util-linux, ed 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 gzip -dc %{SOURCE0} | cpio -imd mv %{name}/* . && rm -rf %{name} -cp -f %{SOURCE1} . %build 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 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 -p -m 644 dot.mkshrc $RPM_BUILD_ROOT%{_sysconfdir}/mkshrc +install -D -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/skel/.mkshrc %check echo > test.wait @@ -48,17 +50,12 @@ while test -e test.wait; do done %post -if [ ! -f %{_sysconfdir}/shells ]; then +grep -q "^%{_bindir}/%{name}$" %{_sysconfdir}/shells 2>/dev/null || \ 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 + sed -e 's@^%{_bindir}/%{name}$@POSTUNREMOVE@' -e '/^POSTUNREMOVE$/d' -i %{_sysconfdir}/shells fi %clean @@ -68,9 +65,17 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %doc dot.mkshrc %{_bindir}/%{name} +%config(noreplace) %{_sysconfdir}/mkshrc +%config(noreplace) %{_sysconfdir}/skel/.mkshrc %{_mandir}/man1/%{name}.1* %changelog +* Sun Jul 11 2010 Robert Scheck 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 39c-1 - Upgrade to 39c and updated arc4random.c file diff --git a/sources b/sources index 45ba576..1bdf906 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ 0c3cd172b47eefcdf9a302baa42f5092 mksh-R39c.cpio.gz -442f34c6c44a35d6d3daf393dcd4598a arc4random.c