80b0d369b2
git-svn-id: svn://svn.openwrt.org/openwrt/packages@6586 3c298f89-4303-0410-b956-a3cf2f4a3e73
50 lines
1.1 KiB
Makefile
50 lines
1.1 KiB
Makefile
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=mksh
|
|
PKG_VERSION:=R29b
|
|
PKG_RELEASE:=1
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).cpio.gz
|
|
PKG_SOURCE_URL:=http://www.mirbsd.org/MirOS/dist/mir/mksh
|
|
PKG_MD5SUM:=a21850403bd30bab461f2fc9f9b803b8
|
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
# This program seems to depend on libssp, but only for GCC 4
|
|
GCCVER:=$(if $(DUMP),4,$(word 1,$(subst ., ,$(subst ",,$(CONFIG_GCC_VERSION)))))
|
|
#"))))
|
|
ifeq ($(GCCVER),4)
|
|
DEP:=+libssp
|
|
else
|
|
DEP:=
|
|
endif
|
|
|
|
define Package/mksh
|
|
SECTION:=shells
|
|
CATEGORY:=Base system
|
|
TITLE:=mksh
|
|
DEPENDS:=$(DEP)
|
|
DESCRIPTION:=MirBSD version of ksh
|
|
endef
|
|
|
|
define Build/Compile
|
|
cd $(PKG_BUILD_DIR); \
|
|
CC=$(TARGET_CC) \
|
|
TARGET_OS=$(shell uname -s) \
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
|
CPPFLAGS="-DMKSH_SMALL=1" \
|
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
|
$(BASH) Build.sh -d -r
|
|
endef
|
|
|
|
define Package/mksh/install
|
|
$(INSTALL_DIR) $(1)/etc
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/dot.mkshrc $(1)/etc/mkshrc
|
|
$(INSTALL_DIR) $(1)/bin
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/mksh $(1)/bin/
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,mksh))
|