[dash] Install dash into /etc/shells and some cleanup

Petr Sabata psabata at fedoraproject.org
Thu May 19 15:31:12 UTC 2011


commit 5cd4ed841fa99e95ac2393f13ed842ce8e66bf06
Author: Petr Sabata <psabata at redhat.com>
Date:   Thu May 19 17:31:05 2011 +0200

    Install dash into /etc/shells and some cleanup

 dash.spec |   32 ++++++++++++++++++++------------
 1 files changed, 20 insertions(+), 12 deletions(-)
---
diff --git a/dash.spec b/dash.spec
index 6692135..f2bcdb9 100644
--- a/dash.spec
+++ b/dash.spec
@@ -1,13 +1,11 @@
 Name:           dash
 Version:        0.5.6
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Small and fast POSIX-compliant shell
-
 Group:          System Environment/Shells
 License:        BSD
 URL:            http://gondor.apana.org.au/~herbert/dash/
 Source0:        http://gondor.apana.org.au/~herbert/dash/files/dash-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 %description
 DASH is a POSIX-compliant implementation of /bin/sh that aims to be as small as
@@ -22,22 +20,32 @@ significantly faster than bash (the GNU Bourne-Again SHell) for most tasks.
 make %{?_smp_mflags}
 
 %install
-rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT/bin
-mv $RPM_BUILD_ROOT%{_bindir}/dash $RPM_BUILD_ROOT/bin/
-rm -rf $RPM_BUILD_ROOT%{_bindir}/
+make install DESTDIR=%{buildroot}
+mkdir -p %{buildroot}/bin
+mv %{buildroot}%{_bindir}/dash %{buildroot}/bin/
+rm -rf %{buildroot}%{_bindir}/
+
+%post
+if [ $1 -eq 1 ]; then
+    grep -qF /bin/dash /etc/shells || echo '/bin/dash' >> /etc/shells
+fi
 
-%clean
-rm -rf $RPM_BUILD_ROOT
+%postun
+if [ $1 -eq 0 ]; then
+    sed -i '/\/bin\/dash/d' /etc/shells
+fi
 
 %files
-%defattr(-,root,root,-)
-%doc
+%doc INSTALL COPYING ChangeLog
 /bin/dash
 %{_datadir}/man/man1/dash.1.gz
 
 %changelog
+* Thu May 19 2011 Petr Sabata <psabata at redhat.com> - 0.5.6-4
+- Install/remove dash from /etc/shells (#706138)
+- Buildroot and defattr cleanup
+- Add INSTALL, COPYING, ChangeLog to doc
+
 * Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.5.6-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 


More information about the scm-commits mailing list