source: packages/utils/bash/Makefile @ 20511

Last change on this file since 20511 was 20511, checked in by florian, 7 years ago

[package] also install rbash (#6927)

File size: 1.5 KB
Line 
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
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=bash
11PKG_VERSION:=3.2
12PKG_RELEASE:=2
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=@GNU/bash
16PKG_MD5SUM:=00bfa16d58e034e3c2aa27f390390d30
17
18include $(INCLUDE_DIR)/package.mk
19
20define Package/bash
21  SECTION:=utils
22  CATEGORY:=Utilities
23  TITLE:=The GNU Bourne Again SHell
24  DEPENDS:=+libncurses
25  URL:=http://www.gnu.org/software/bash/
26endef
27
28define Package/bash/description
29        Bash is an sh-compatible command language interpreter that executes
30        commands read from the standard input or from a file. Bash also
31        incorporates useful features from the Korn and C shells (ksh and csh).
32endef
33
34
35define Build/Configure
36        $(call Build/Configure/Default, \
37                --without-bash-malloc \
38                --bindir=/bin \
39        )
40endef
41
42
43define Build/Compile
44        $(MAKE) -C $(PKG_BUILD_DIR)/builtins LDFLAGS_FOR_BUILD= mkbuiltins
45        $(MAKE) -C $(PKG_BUILD_DIR) \
46                DESTDIR="$(PKG_INSTALL_DIR)" \
47                SHELL="/bin/bash" \
48                all install
49endef
50
51define Package/bash/postinst
52#!/bin/sh
53grep bash $${IPKG_INSTROOT}/etc/shells || \
54        echo "/bin/bash" >> $${IPKG_INSTROOT}/etc/shells
55        echo "/bin/rbash" >> $${IPKG_INSTROOT}/etc/shells
56endef
57
58define Package/bash/install
59        $(INSTALL_DIR) $(1)/bin
60        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/bash $(1)/bin/
61        ln -sf bash $(1)/bin/rbash
62endef
63
64$(eval $(call BuildPackage,bash))
65
Note: See TracBrowser for help on using the repository browser.