forked from openwrt/packages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
73 lines (57 loc) · 1.67 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#
# Copyright (C) 2007-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
BASE_VERSION:=4.3
PKG_NAME:=bash
PKG_VERSION:=$(BASE_VERSION).42
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(BASE_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/bash
PKG_MD5SUM:=81348932d5da294953e15d4814c74dd1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BASE_VERSION)
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=Marcel Denia <[email protected]>
PKG_CHECK_FORMAT_SECURITY:=0
include $(INCLUDE_DIR)/package.mk
define Package/bash
SECTION:=utils
CATEGORY:=Utilities
TITLE:=The GNU Bourne Again SHell
DEPENDS:=+libncurses
URL:=http://www.gnu.org/software/bash/
endef
define Package/bash/description
Bash is an sh-compatible command language interpreter that executes
commands read from the standard input or from a file. Bash also
incorporates useful features from the Korn and C shells (ksh and csh).
endef
define Build/Configure
$(call Build/Configure/Default, \
--without-bash-malloc \
--bindir=/bin \
)
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR)/builtins LDFLAGS_FOR_BUILD= mkbuiltins
$(MAKE) -C $(PKG_BUILD_DIR) \
DESTDIR="$(PKG_INSTALL_DIR)" \
SHELL="/bin/bash" \
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
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/bash $(1)/bin/
ln -sf bash $(1)/bin/rbash
endef
$(eval $(call BuildPackage,bash))