summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-14 07:55:59 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-14 07:56:18 +0900
commit2be0428bb6cbaf6e8f60f923fd0d62e6131cac8c (patch)
tree44295f9bd477db567f501bedc697dac4a9551dca
parent1274e49054dd920222ecb519f26302a1e023ae35 (diff)
downloaddash-2be0428bb6cbaf6e8f60f923fd0d62e6131cac8c.tar.gz
dash-2be0428bb6cbaf6e8f60f923fd0d62e6131cac8c.tar.bz2
dash-2be0428bb6cbaf6e8f60f923fd0d62e6131cac8c.zip
Change-Id: I94b9a6d64469443e8ac4d8f89ad3b10a158d255c Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
-rw-r--r--packaging/dash.manifest5
-rw-r--r--packaging/dash.spec46
2 files changed, 51 insertions, 0 deletions
diff --git a/packaging/dash.manifest b/packaging/dash.manifest
new file mode 100644
index 0000000..017d22d
--- /dev/null
+++ b/packaging/dash.manifest
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/dash.spec b/packaging/dash.spec
new file mode 100644
index 0000000..e2e7ad4
--- /dev/null
+++ b/packaging/dash.spec
@@ -0,0 +1,46 @@
+Name: dash
+Version: 0.5.11.5
+Release: 0
+Summary: Small and fast POSIX-compliant shell
+Group: Base/Utilities
+License: BSD-3-Clause and GPL-2.0+
+URL: http://gondor.apana.org.au/~herbert/dash/
+Source0: http://gondor.apana.org.au/~herbert/dash/files/dash-%{version}.tar.gz
+Source1001: dash.manifest
+
+%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
+cp %{SOURCE1001} .
+
+%build
+export CFLAGS+=" -fPIC"
+export LDFLAGS+=" -pie"
+%configure
+make %{?_smp_mflags}
+
+%install
+make install DESTDIR=%{buildroot}
+mkdir -p %{buildroot}/bin
+mv %{buildroot}%{_bindir}/dash %{buildroot}/bin/
+rm -rf %{buildroot}%{_bindir}/
+
+%post
+grep -q '^/bin/dash$' /etc/shells || echo '/bin/dash' >> /etc/shells
+
+%postun
+if [ $1 -eq 0 ]; then
+ sed -i '/^\/bin\/dash$/d' /etc/shells
+fi
+
+%docs_package
+
+%files
+%manifest %{name}.manifest
+%license COPYING
+/bin/dash
+