]>
Commit | Line | Data |
---|---|---|
d71c985a ER |
1 | Summary: POSIX-compliant implementation of /bin/sh |
2 | Name: dash | |
3 | Version: 0.5.3 | |
4 | Release: 0.1 | |
5 | License: GPL v2+ | |
6 | Group: Applications/Shells | |
7 | Source0: http://gondor.apana.org.au/~herbert/dash/files/%{name}-%{version}.tar.gz | |
8 | # Source0-md5: 1a3cd6669459be4344ec55ec9d4914f8 | |
9 | URL: http://gondor.apana.org.au/~herbert/dash/ | |
eee38b54 ER |
10 | Requires(post): grep |
11 | Requires(preun): sed >= 4.0 | |
d71c985a ER |
12 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
13 | ||
14 | %define _bindir /bin | |
043b23ba | 15 | %define _shell %{_bindir}/%{name} |
d71c985a ER |
16 | |
17 | %description | |
18 | DASH is a POSIX-compliant implementation of /bin/sh that aims to be as | |
19 | small as possible. It does this without sacrificing speed where | |
20 | possible. In fact, it is significantly faster than bash (the GNU | |
21 | Bourne-Again SHell) for most tasks. | |
22 | ||
23 | DASH is a direct descendant of the NetBSD version of ash (the Almquist | |
24 | SHell) | |
25 | ||
26 | %prep | |
27 | %setup -q | |
28 | ||
29 | %build | |
30 | %configure | |
31 | %{__make} | |
32 | ||
33 | %install | |
34 | rm -rf $RPM_BUILD_ROOT | |
35 | ||
36 | %{__make} install \ | |
37 | DESTDIR=$RPM_BUILD_ROOT | |
38 | ||
39 | %clean | |
40 | rm -rf $RPM_BUILD_ROOT | |
41 | ||
42 | %post | |
43 | if [ ! -f /etc/shells ]; then | |
44 | umask 022 | |
45 | echo '%{_shell}' > /etc/shells | |
46 | else | |
47 | grep -q '^%{_shell}$' /etc/shells || echo '%{_shell}' >> /etc/shells | |
48 | fi | |
49 | ||
50 | %preun | |
51 | if [ "$1" = "0" ]; then | |
52 | %{__sed} -i -e '/^%(echo %{_shell} | sed -e 's,/,\\/,g')$/d' /etc/shells | |
53 | fi | |
54 | ||
55 | %files | |
56 | %defattr(644,root,root,755) | |
57 | %attr(755,root,root) %{_bindir}/dash | |
58 | %{_mandir}/man1/dash.1* |