aboutsummaryrefslogtreecommitdiffstats
path: root/packages/bash
diff options
context:
space:
mode:
Diffstat (limited to 'packages/bash')
-rw-r--r--packages/bash/bash_2.05b.bb26
-rw-r--r--packages/bash/bash_3.0.bb41
2 files changed, 61 insertions, 6 deletions
diff --git a/packages/bash/bash_2.05b.bb b/packages/bash/bash_2.05b.bb
index 775bdf860c..7134e04d5a 100644
--- a/packages/bash/bash_2.05b.bb
+++ b/packages/bash/bash_2.05b.bb
@@ -1,9 +1,10 @@
DESCRIPTION = "An sh-compatible command language interpreter."
HOMEPAGE = "http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html"
DEPENDS = "ncurses"
+PROVIDES = "virtual/sh"
SECTION = "base/shell"
LICENSE = "GPL"
-PR = "r3"
+PR = "r4"
SRC_URI = "${GNU_MIRROR}/bash/bash-${PV}.tar.gz \
file://bashbug-editor.patch;patch=1;pnum=0 \
@@ -38,11 +39,7 @@ SRC_URI = "${GNU_MIRROR}/bash/bash-${PV}.tar.gz \
file://gcc34.patch;patch=1 \
file://signames-mipsel.diff;patch=1"
-inherit autotools update-alternatives
-
-PROVIDES = "virtual/sh"
-ALTERNATIVE_NAME = "sh"
-ALTERNATIVE_PATH = "${bindir}/bash"
+inherit autotools
bindir = "/bin"
sbindir = "/sbin"
@@ -61,3 +58,20 @@ do_configure () {
fi
autotools_do_configure
}
+
+# 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}/bash"
+ALTERNATIVE_PRIORITY = "30"
+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/bash/bash_3.0.bb b/packages/bash/bash_3.0.bb
index e69de29bb2..ba7b080670 100644
--- a/packages/bash/bash_3.0.bb
+++ b/packages/bash/bash_3.0.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "An sh-compatible command language interpreter."
+HOMEPAGE = "http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html"
+DEPENDS = "ncurses"
+SECTION = "base/shell"
+LICENSE = "GPL"
+PROVIDES = "virtual/sh"
+PR = "r2"
+
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI = "${GNU_MIRROR}/bash/bash-${PV}.tar.gz \
+ file://signames-mipsel.diff;patch=1"
+
+inherit autotools
+
+bindir = "/bin"
+sbindir = "/sbin"
+
+EXTRA_OECONF = "--with-curses"
+export CC_FOR_BUILD = "${BUILD_CC}"
+
+do_configure () {
+ oe_runconf
+}
+
+# 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}/bash"
+ALTERNATIVE_PRIORITY = "30"
+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}
+}