2014-10-09 08:52:57 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2007-2011 OpenWrt.org
|
2014-10-08 23:22:06 +00:00
|
|
|
# Copyright (c) 2009-2014 Thorsten Glaser <tg@mirbsd.org>
|
2014-10-09 08:52:57 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=mksh
|
2020-11-29 00:31:44 +00:00
|
|
|
PKG_VERSION:=59c
|
treewide: remove AUTORELEASE
Automatically compute and substitute current values for all
$(AUTORELEASE) instances as this feature is deprecated and shouldn't be
used.
The following temporary change was made to the core:
diff --git a/rules.mk b/rules.mk
index 57d7995d4fa8..f16367de87a8 100644
--- a/rules.mk
+++ b/rules.mk
@@ -429,7 +429,7 @@ endef
abi_version_str = $(subst -,,$(subst _,,$(subst .,,$(1))))
COMMITCOUNT = $(if $(DUMP),0,$(call commitcount))
-AUTORELEASE = $(if $(DUMP),0,$(call commitcount,1))
+AUTORELEASE = $(if $(DUMP),0,$(shell sed -i "s/\$$(AUTORELEASE)/$(call commitcount,1)/" $(CURDIR)/Makefile))
all:
FORCE: ;
And this command used to fix affected packages:
for i in $(cd feeds/packages; git grep -l PKG_RELEASE:=.*AUTORELEASE | \
sed 's^.*/\([^/]*\)/Makefile^\1^';);
do
make package/$i/download
done
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2023-04-21 16:32:27 +00:00
|
|
|
PKG_RELEASE:=3
|
2014-10-09 08:52:57 +00:00
|
|
|
|
2022-02-28 18:12:01 +00:00
|
|
|
PKG_MAINTAINER:=Thorsten Glaser <tg@mirbsd.org>
|
2014-10-08 23:22:06 +00:00
|
|
|
PKG_LICENSE:=MirOS
|
|
|
|
|
2014-10-09 08:52:57 +00:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-R$(PKG_VERSION).tgz
|
2017-02-24 16:01:09 +00:00
|
|
|
PKG_SOURCE_URL:=http://www.mirbsd.org/MirOS/dist/mir/mksh \
|
2017-07-20 15:05:17 +00:00
|
|
|
http://pub.allbsd.org/MirOS/dist/mir/mksh
|
2020-11-29 00:31:44 +00:00
|
|
|
PKG_HASH:=77ae1665a337f1c48c61d6b961db3e52119b38e58884d1c89684af31f87bc506
|
2014-10-09 08:52:57 +00:00
|
|
|
|
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/mksh
|
2018-03-07 03:34:09 +00:00
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Utilities
|
|
|
|
SUBMENU:=Shells
|
2014-10-09 08:52:57 +00:00
|
|
|
TITLE:=MirBSD Korn Shell
|
|
|
|
DEPENDS:=$(DEP)
|
|
|
|
URL:=http://mirbsd.de/mksh
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/mksh/description
|
|
|
|
mksh is the MirBSD enhanced version of the Public Domain Korn
|
|
|
|
shell (pdksh), a Bourne-compatible shell which is largely si-
|
|
|
|
milar to the original AT&T Korn shell; mksh is the only pdksh
|
|
|
|
derivate currently being actively developed. It includes bug
|
|
|
|
fixes and feature improvements, in order to produce a modern,
|
|
|
|
robust shell good for interactive and especially script use.
|
|
|
|
mksh has UTF-8 support (in substring operations and the Emacs
|
2020-11-29 00:31:44 +00:00
|
|
|
editing mode) and - while R59 corresponds to OpenBSD 5.7-cur-
|
2014-10-09 08:52:57 +00:00
|
|
|
rent ksh (without GNU bash-like PS1 and fancy character clas-
|
|
|
|
ses) - adheres to SUSv4 and is much more robust. The code has
|
|
|
|
been cleaned up and simplified, bugs fixed, standards compli-
|
|
|
|
ance added, and several enhancements (for extended compatibi-
|
|
|
|
lity to other modern shells - as well as a couple of its own)
|
|
|
|
are available. It has sensible defaults as usual with BSD.
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
# -DMKSH_SMALL=1 ⇒ reduce functionality quite a lot
|
|
|
|
# -DMKSH_ASSUME_UTF8=0 ⇒ never automatically enable
|
|
|
|
# UTF-8 mode, neither use setlocale/nl_langinfo
|
|
|
|
# nor look at $LC_* and $LANG (not recommended)
|
2014-10-08 23:22:06 +00:00
|
|
|
# -DMKSH_BINSHPOSIX ⇒ enable POSIX mode if called as sh
|
|
|
|
#XXX maybe change to -DMKSH_ASSUME_UTF8=1 now (which
|
|
|
|
#XXX is always assume UTF-8 mode)
|
2014-10-09 08:52:57 +00:00
|
|
|
# HAVE_CAN_FSTACKPROTECTORALL=0 ⇒ nuke libssp dependency
|
2014-10-08 23:22:06 +00:00
|
|
|
# HAVE_CAN_FSTACKPROTECTORSTRONG=0 ⇒ same, for gcc 4.9+
|
2014-10-09 08:52:57 +00:00
|
|
|
cd $(PKG_BUILD_DIR); \
|
|
|
|
CC="$(TARGET_CC)" \
|
|
|
|
TARGET_OS="$(shell uname -s)" \
|
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
2020-11-29 00:31:44 +00:00
|
|
|
CPPFLAGS="$(TARGET_CPPFLAGS) -DMKSH_SMALL=1 -DMKSH_ASSUME_UTF8=0 -DMKSH_BINSHPOSIX -DMKSHRC_PATH=\\\"/etc/mkshrc\\\"" \
|
2014-10-09 08:52:57 +00:00
|
|
|
HAVE_CAN_FSTACKPROTECTORALL=0 \
|
2014-10-08 23:22:06 +00:00
|
|
|
HAVE_CAN_FSTACKPROTECTORSTRONG=0 \
|
2014-10-09 08:52:57 +00:00
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
2020-11-29 00:31:44 +00:00
|
|
|
$(BASH) Build.sh -Q -r
|
2014-10-09 08:52:57 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/mksh/postinst
|
|
|
|
#!/bin/sh
|
|
|
|
grep mksh $${IPKG_INSTROOT}/etc/shells || \
|
|
|
|
echo "/bin/mksh" >> $${IPKG_INSTROOT}/etc/shells
|
|
|
|
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
|
|
|
|
|
|
|
|
define Package/mksh/conffiles
|
|
|
|
/etc/mkshrc
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,mksh))
|