diff --git a/README.md b/README.md index 51da479..f6bf7f5 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ # dash +DASH is a POSIX-compliant implementation of /bin/sh that aims to be as small as possible. +It does this without sacrificing speed where possible. +In fact, it is significantly faster than bash (the GNU Bourne-Again SHell) for most tasks. + diff --git a/dash.spec b/dash.spec new file mode 100644 index 0000000..0738296 --- /dev/null +++ b/dash.spec @@ -0,0 +1,87 @@ +Name: dash +Version: 0.5.7 +Release: 4mamba +Summary: A lightweight POSIX-compliant implementation of /bin/sh +Group: Applications/Shells +Vendor: openmamba +Distribution: openmamba +Packager: Davide Madrisan +URL: http://gondor.apana.org.au/~herbert/dash/ +Source: http://gondor.apana.org.au/~herbert/dash/files/dash-%{version}.tar.gz +License: BSD +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +## AUTOBUILDREQ-END +Provides: /bin/sh +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +DASH is a POSIX-compliant implementation of /bin/sh that aims to be as small as possible. +It does this without sacrificing speed where possible. +In fact, it is significantly faster than bash (the GNU Bourne-Again SHell) for most tasks. + +%prep +%setup -q + +%build +%configure --bindir=/bin +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall + +ln -s dash.1 %{buildroot}%{_mandir}/man1/sh.1 + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -p /bin/dash +if [ $1 -ge 1 ]; then + sh=`readlink /bin/sh` + [ "$sh" != "/etc/alternatives/sh" -o ! -L /bin/sh ] && ln -sf dash /bin/sh + /usr/sbin/update-alternatives \ + --install /bin/sh sh /bin/dash 10 +fi +exit 0 + +%postun +if [ $1 -eq 0 ]; then + # remove legacy alternatives /usr/bin/ld + /usr/sbin/update-alternatives --remove sh /bin/dash 2>/dev/null +fi +exit 0 + +%posttrans -p /bin/dash +[ -e /bin/sh ] || ln -s /etc/alternatives/sh /bin/sh +exit 0 + +%files +%defattr(-,root,root) +/bin/dash +%{_mandir}/man1/dash.* +%{_mandir}/man1/sh.* +%doc COPYING +#ChangeLog + +%changelog +* Tue Oct 15 2013 Silvan Calarco 0.5.7-4mamba +- run scripts with /bin/dash to avoid damage due to /bin/sh disappearing + +* Tue Oct 15 2013 Silvan Calarco 0.5.7-3mamba +- configure /bin/sh as an alternative + +* Mon Sep 30 2013 Silvan Calarco 0.5.7-2mamba +- provide /bin/sh symlink replacing bash as default sh interpreter + +* Sat Jul 23 2011 Automatic Build System 0.5.7-1mamba +- automatic update to 3.0.3.0 by autodist + +* Wed Feb 02 2011 Automatic Build System 0.5.6.1-1mamba +- automatic update by autodist + +* Fri Jan 21 2011 Davide Madrisan 0.5.6-1mamba +- update to 0.5.6 + +* Mon Nov 17 2008 Aleph0 0.5.4-1mamba +- package created by autospec