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