b424c24ea34c1c79cd8279dd53bb6a02cf72ff89
[feed/packages.git] / utils / bash / Makefile
1 #
2 # Copyright (C) 2007-2015 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 BASE_VERSION:=4.3
11
12 PKG_NAME:=bash
13 PKG_VERSION:=$(BASE_VERSION).42
14 PKG_RELEASE:=1
15
16 PKG_SOURCE:=$(PKG_NAME)-$(BASE_VERSION).tar.gz
17 PKG_SOURCE_URL:=@GNU/bash
18 PKG_MD5SUM:=81348932d5da294953e15d4814c74dd1
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BASE_VERSION)
20
21 PKG_LICENSE:=GPL-3.0+
22 PKG_LICENSE_FILES:=COPYING
23 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
24
25 PKG_CHECK_FORMAT_SECURITY:=0
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/bash
29 SECTION:=utils
30 CATEGORY:=Utilities
31 TITLE:=The GNU Bourne Again SHell
32 DEPENDS:=+libncurses
33 URL:=http://www.gnu.org/software/bash/
34 endef
35
36 define Package/bash/description
37 Bash is an sh-compatible command language interpreter that executes
38 commands read from the standard input or from a file. Bash also
39 incorporates useful features from the Korn and C shells (ksh and csh).
40 endef
41
42
43 define Build/Configure
44 $(call Build/Configure/Default, \
45 --without-bash-malloc \
46 --bindir=/bin \
47 )
48 endef
49
50
51 define Build/Compile
52 $(MAKE) -C $(PKG_BUILD_DIR)/builtins LDFLAGS_FOR_BUILD= mkbuiltins
53 $(MAKE) -C $(PKG_BUILD_DIR) \
54 DESTDIR="$(PKG_INSTALL_DIR)" \
55 SHELL="/bin/bash" \
56 all install
57 endef
58
59 define Package/bash/postinst
60 #!/bin/sh
61 grep bash $${IPKG_INSTROOT}/etc/shells || \
62 echo "/bin/bash" >> $${IPKG_INSTROOT}/etc/shells
63 echo "/bin/rbash" >> $${IPKG_INSTROOT}/etc/shells
64 endef
65
66 define Package/bash/install
67 $(INSTALL_DIR) $(1)/bin
68 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/bash $(1)/bin/
69 ln -sf bash $(1)/bin/rbash
70 endef
71
72
73 $(eval $(call BuildPackage,bash))