File dash.spec of Package dash

#
# spec file for package dash
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2013 Guido Berhoerster.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           dash
Summary:        POSIX-compliant Implementation of /bin/sh
License:        BSD-3-Clause
Group:          System/Shells
Version:        0.5.7
Release:        0
Url:            http://gondor.apana.org.au/~herbert/dash/
Source:         dash-%{version}.tar.gz
# PATCH-FIX-UPSTREAM dash-0.5.7-do-not-close-stderr.patch gber@opensuse.org -- Prevents closing stderr when /dev/tty fails to open (backported from upstream git)
Patch0:         dash-0.5.7-do-not-close-stderr.patch
# PATCH-FIX-UPSTREAM dash-remove-backslash-before-in-double-quotes-in-variable.patch gber@opensuse.org -- Remove backslash before } in double-quotes in variable as it prevents the closing brace from terminating the substitution (from FreeBSD/Debian)
Patch1:         dash-remove-backslash-before-in-double-quotes-in-variable.patch
BuildRequires:  libedit-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
DASH is a POSIX-compliant implementation of /bin/sh that aims to be as small as
possible without sacrificing speed where possible.

%prep
%setup -q
%patch0 -p1
%patch1 -p1

%build
%configure --with-libedit
make %{?_smp_mflags}

%install
%make_install
# compatibility symlink to /bin
mkdir -p %{buildroot}/bin
ln -s %{_bindir}/dash %{buildroot}/bin/dash

%files
%defattr(-,root,root,-)
%doc ChangeLog
%{_bindir}/dash
/bin/dash
%{_mandir}/man1/dash.1*

%changelog