aboutsummaryrefslogtreecommitdiffstats
path: root/packages/dash
diff options
context:
space:
mode:
Diffstat (limited to 'packages/dash')
-rw-r--r--packages/dash/.mtn2git_empty0
-rw-r--r--packages/dash/dash_0.5.2.bb29
-rw-r--r--packages/dash/files/.mtn2git_empty0
-rw-r--r--packages/dash/files/makefile-build-cc.diff29
4 files changed, 58 insertions, 0 deletions
diff --git a/packages/dash/.mtn2git_empty b/packages/dash/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/dash/.mtn2git_empty
diff --git a/packages/dash/dash_0.5.2.bb b/packages/dash/dash_0.5.2.bb
index e69de29bb2..1dcf81caa9 100644
--- a/packages/dash/dash_0.5.2.bb
+++ b/packages/dash/dash_0.5.2.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "The Debian Almquist Shell is a POSIX compliant shell that is much smaller than 'bash'."
+PROVIDES = "virtual/sh"
+LICENSE = "BSD GPL"
+
+SRC_URI = "http://ftp.debian.org/debian/pool/main/d/dash/dash_${PV}.orig.tar.gz \
+ http://ftp.debian.org/debian/pool/main/d/dash/dash_${PV}-4.diff.gz;patch=1 \
+ file://makefile-build-cc.diff;patch=1"
+
+inherit autotools
+
+bindir = "/bin"
+PREFIX="${bindir}"
+
+# dont use update-alternatives class because since we are dealing with /bin/sh
+# we need to do the remove in pkg_prerm where the /bin/sh link still points
+# to something (postrm is a shell script)
+
+ALTERNATIVE_NAME = "sh"
+ALTERNATIVE_PATH = "${bindir}/dash"
+ALTERNATIVE_PRIORITY = "10"
+ALTERNATIVE_LINK = "${bindir}/${ALTERNATIVE_NAME}"
+
+pkg_postinst() {
+update-alternatives --install ${ALTERNATIVE_LINK} ${ALTERNATIVE_NAME} ${ALTERNATIVE_PATH} ${ALTERNATIVE_PRIORITY}
+}
+
+pkg_prerm() {
+update-alternatives --remove ${ALTERNATIVE_NAME} ${ALTERNATIVE_PATH}
+}
diff --git a/packages/dash/files/.mtn2git_empty b/packages/dash/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/dash/files/.mtn2git_empty
diff --git a/packages/dash/files/makefile-build-cc.diff b/packages/dash/files/makefile-build-cc.diff
index e69de29bb2..8ffd6c2c37 100644
--- a/packages/dash/files/makefile-build-cc.diff
+++ b/packages/dash/files/makefile-build-cc.diff
@@ -0,0 +1,29 @@
+--- dash-0.5.1/src/Makefile.am.orig 2004-07-03 05:13:27.000000000 +0200
++++ dash-0.5.1/src/Makefile.am 2005-01-11 11:14:11.896299544 +0100
+@@ -3,6 +3,7 @@
+ AM_CPPFLAGS = -include $(top_builddir)/config.h
+ AM_YFLAGS = -d
+
++BUILD_CC ?= gcc
+ CFLAGS = -g -O2 -Wall
+ DEFS = \
+ -DBSD=1 -DSMALL -DSHELL \
+@@ -35,6 +36,18 @@
+ mktokens mkbuiltins builtins.def mkinit.c \
+ mknodes.c nodetypes nodes.c.pat mksyntax.c mksignames.c
+
++mknodes:
++ $(BUILD_CC) mknodes.c -o mknodes
++
++mksyntax:
++ $(BUILD_CC) mksyntax.c -o mksyntax
++
++mkinit:
++ $(BUILD_CC) mkinit.c -o mkinit
++
++mksignames:
++ $(BUILD_CC) mksignames.c -o mksignames
++
+ token.h: mktokens
+ sh $^
+