From: Felix Fietkau Date: Fri, 16 Mar 2007 20:47:13 +0000 (+0000) Subject: add mksh (based on patch from #1470) X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=20cd98890cae746d52129c2cf65ea134917481e8;p=openwrt%2Fsvn-archive%2Fpackages.git add mksh (based on patch from #1470) SVN-Revision: 6585 --- diff --git a/utils/mksh/Makefile b/utils/mksh/Makefile new file mode 100644 index 000000000..9206c1e6c --- /dev/null +++ b/utils/mksh/Makefile @@ -0,0 +1,48 @@ +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 ., ,$(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)) diff --git a/utils/mksh/patches/100-dot_mkshrc b/utils/mksh/patches/100-dot_mkshrc new file mode 100644 index 000000000..a3f6b9760 --- /dev/null +++ b/utils/mksh/patches/100-dot_mkshrc @@ -0,0 +1,19 @@ +--- mksh.old/dot.mkshrc 2007-03-04 06:21:11.000000000 +0000 ++++ mksh.dev/dot.mkshrc 2007-03-05 22:11:49.000000000 +0000 +@@ -1,6 +1,6 @@ + # $MirOS: src/bin/mksh/dot.mkshrc,v 1.8 2007/03/04 06:20:48 tg Exp $ + +-: ${EDITOR:=/bin/ed} ${HOSTNAME:=$(hostname -s 2>/dev/null || hostname)} ++: ${EDITOR:=/bin/ed} ${HOSTNAME:=$(