Upgraded bash to 4.1
[librewrt/.git] / packages / utils / bash / Makefile
1 #
2 # Copyright (C) 2007-2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=bash
11 PKG_VERSION:=4.1
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@GNU/bash
16
17 include $(INCLUDE_DIR)/package.mk
18
19 define Package/bash
20   SECTION:=utils
21   CATEGORY:=Utilities
22   TITLE:=The GNU Bourne Again SHell
23   DEPENDS:=+libncurses
24   URL:=http://www.gnu.org/software/bash/
25 endef
26
27 define Package/bash/description
28         Bash is an sh-compatible command language interpreter that executes 
29         commands read from the standard input or from a file. Bash also 
30         incorporates useful features from the Korn and C shells (ksh and csh).
31 endef
32
33
34 define Build/Configure
35         $(call Build/Configure/Default, \
36                 --without-bash-malloc \
37                 --bindir=/bin \
38         )
39 endef
40
41
42 define Build/Compile
43         $(MAKE) -C $(PKG_BUILD_DIR)/builtins LDFLAGS_FOR_BUILD= mkbuiltins
44         $(MAKE) -C $(PKG_BUILD_DIR) \
45                 DESTDIR="$(PKG_INSTALL_DIR)" \
46                 SHELL="/bin/bash" \
47                 all install
48 endef
49
50 define Package/bash/postinst
51 #!/bin/sh
52 grep bash $${IPKG_INSTROOT}/etc/shells || \
53         echo "/bin/bash" >> $${IPKG_INSTROOT}/etc/shells
54         echo "/bin/rbash" >> $${IPKG_INSTROOT}/etc/shells
55 endef
56
57 define Package/bash/install
58         $(INSTALL_DIR) $(1)/bin
59         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/bash $(1)/bin/
60         ln -sf bash $(1)/bin/rbash
61 endef
62
63 $(eval $(call BuildPackage,bash))
64