[packages] bash: update to 4.2
[packages.git] / utils / bash / Makefile
index 23f034e..0c6f0d9 100644 (file)
@@ -1,23 +1,19 @@
 #
-# Copyright (C) 2007 OpenWrt.org
+# Copyright (C) 2007-2008 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id$
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bash
-PKG_VERSION:=3.2
+PKG_VERSION:=4.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=ftp://ftp.gnu.org/gnu/bash/
-PKG_MD5SUM:=00bfa16d58e034e3c2aa27f390390d30
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+PKG_SOURCE_URL:=@GNU/bash
+PKG_MD5SUM:=3fb927c7c33022f1c327f14a81c0d4b0
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -25,6 +21,7 @@ define Package/bash
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE:=The GNU Bourne Again SHell
+  DEPENDS:=+libncurses
   URL:=http://www.gnu.org/software/bash/
 endef
 
@@ -35,9 +32,8 @@ define Package/bash/description
 endef
 
 
-define Build/Configure 
+define Build/Configure
        $(call Build/Configure/Default, \
-               --disable-restricted \
                --without-bash-malloc \
                 --bindir=/bin \
        )
@@ -52,9 +48,17 @@ define Build/Compile
                all install
 endef
 
+define Package/bash/postinst
+#!/bin/sh
+grep bash $${IPKG_INSTROOT}/etc/shells || \
+       echo "/bin/bash" >> $${IPKG_INSTROOT}/etc/shells
+       echo "/bin/rbash" >> $${IPKG_INSTROOT}/etc/shells
+endef
+
 define Package/bash/install
        $(INSTALL_DIR) $(1)/bin
-       $(CP) $(PKG_INSTALL_DIR)/bin/bash $(1)/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/bash $(1)/bin/
+       ln -sf bash $(1)/bin/rbash
 endef
 
 $(eval $(call BuildPackage,bash))