2008-07-05 12:25:32 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2007-2008 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
2007-03-16 20:47:13 +00:00
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=mksh
|
2008-07-05 12:25:32 +00:00
|
|
|
PKG_VERSION:=R33d
|
2007-03-16 20:47:13 +00:00
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).cpio.gz
|
|
|
|
PKG_SOURCE_URL:=http://www.mirbsd.org/MirOS/dist/mir/mksh
|
2008-07-05 12:25:32 +00:00
|
|
|
PKG_MD5SUM:=8ad2547ad55dc3a02b13554ab9b5c9c8
|
2007-03-16 20:47:13 +00:00
|
|
|
|
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
# This program seems to depend on libssp, but only for GCC 4
|
2007-03-16 20:50:57 +00:00
|
|
|
GCCVER:=$(if $(DUMP),4,$(word 1,$(subst ., ,$(subst ",,$(CONFIG_GCC_VERSION)))))
|
|
|
|
#"))))
|
2007-03-16 20:47:13 +00:00
|
|
|
ifeq ($(GCCVER),4)
|
|
|
|
DEP:=+libssp
|
|
|
|
else
|
|
|
|
DEP:=
|
|
|
|
endif
|
|
|
|
|
|
|
|
define Package/mksh
|
|
|
|
SECTION:=shells
|
|
|
|
CATEGORY:=Base system
|
|
|
|
TITLE:=mksh
|
|
|
|
DEPENDS:=$(DEP)
|
2007-10-14 04:32:56 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/mksh/description
|
|
|
|
MirBSD version of ksh
|
2007-03-16 20:47:13 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
cd $(PKG_BUILD_DIR); \
|
2007-04-05 22:08:36 +00:00
|
|
|
CC="$(TARGET_CC)" \
|
|
|
|
TARGET_OS="$(shell uname -s)" \
|
2007-03-16 20:47:13 +00:00
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
|
|
|
CPPFLAGS="-DMKSH_SMALL=1" \
|
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
2007-09-21 00:07:40 +00:00
|
|
|
$(BASH) Build.sh -Q -r
|
2007-03-16 20:47:13 +00:00
|
|
|
endef
|
|
|
|
|
2007-05-13 23:08:52 +00:00
|
|
|
define Package/mksh/postinst
|
|
|
|
#!/bin/sh
|
|
|
|
grep mksh $${IPKG_INSTROOT}/etc/shells || \
|
|
|
|
echo "/bin/mksh" >> $${IPKG_INSTROOT}/etc/shells
|
|
|
|
endef
|
|
|
|
|
2007-03-16 20:47:13 +00:00
|
|
|
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))
|