lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

Makefile (1725B)


      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   SUBMENU:=Shells
     32   TITLE:=The GNU Bourne Again SHell
     33   DEPENDS:=+libncurses
     34   URL:=http://www.gnu.org/software/bash/
     35 endef
     36 
     37 define Package/bash/description
     38   Bash is an sh-compatible command language interpreter that executes
     39   commands read from the standard input or from a file. Bash also
     40   incorporates useful features from the Korn and C shells (ksh and csh).
     41 endef
     42 
     43 
     44 define Build/Configure
     45 	$(call Build/Configure/Default, \
     46 		--without-bash-malloc \
     47                 --bindir=/bin \
     48 	)
     49 endef
     50 
     51 
     52 define Build/Compile
     53 	$(MAKE) -C $(PKG_BUILD_DIR)/builtins LDFLAGS_FOR_BUILD= mkbuiltins
     54 	$(MAKE) -C $(PKG_BUILD_DIR) \
     55 		DESTDIR="$(PKG_INSTALL_DIR)" \
     56 		SHELL="/bin/bash" \
     57 		all install
     58 endef
     59 
     60 define Package/bash/postinst
     61 #!/bin/sh
     62 grep bash $${IPKG_INSTROOT}/etc/shells || \
     63 	echo "/bin/bash" >> $${IPKG_INSTROOT}/etc/shells
     64 	echo "/bin/rbash" >> $${IPKG_INSTROOT}/etc/shells
     65 endef
     66 
     67 define Package/bash/install
     68 	$(INSTALL_DIR) $(1)/bin
     69 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/bash $(1)/bin/
     70 	ln -sf bash $(1)/bin/rbash
     71 endef
     72 
     73 
     74 $(eval $(call BuildPackage,bash))