From: "Eugene San (eugenesan)" <eugene...@gmail.com>

Signed-off-by: Eugene San (eugenesan) <eugene...@gmail.com>
---
 utils/mc/Config.in |   20 +++++++++++++++++++
 utils/mc/Makefile  |   54 +++++++++++++++++++++++++++++++--------------------
 2 files changed, 53 insertions(+), 21 deletions(-)
 create mode 100644 utils/mc/Config.in

diff --git a/utils/mc/Config.in b/utils/mc/Config.in
new file mode 100644
index 0000000..1f503f8
--- /dev/null
+++ b/utils/mc/Config.in
@@ -0,0 +1,20 @@
+# mc package config
+
+menu "Configuration"
+       depends on PACKAGE_mc
+
+config MC_DISABLE_EDITOR
+       bool "Disable internal editor"
+       default y
+       help
+        Disables internal editor.
+        If unsure, choose the default Y.
+
+config MC_DISABLE_SUBSHELL
+       bool "Disable subshell"
+       default y
+       help
+        Disables background shell.
+        If unsure, choose the default Y.
+
+endmenu
diff --git a/utils/mc/Makefile b/utils/mc/Makefile
index 974f2da..0a162c6 100644
--- a/utils/mc/Makefile
+++ b/utils/mc/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mc
-PKG_VERSION:=4.7.5.2
+PKG_VERSION:=4.7.5.3
 PKG_RELEASE:=3
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.midnight-commander.org/downloads/
-PKG_MD5SUM:=9fdfe7c0fcff362436eb35fcd1adf0fd
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://www.midnight-commander.org/downloads/
+PKG_MD5SUM:=6a67e139e0032d8a871455a80d490941
 
 PKG_BUILD_PARALLEL:=1
 
@@ -21,32 +21,39 @@ include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
 
 define Package/mc
-  SECTION:=utils
-  CATEGORY:=Utilities
-  DEPENDS:=+glib2 +libncurses +libiconv
-  TITLE:=midnight commander - a powerful file manager
-  URL:=http://www.midnight-commander.org/
-  SUBMENU:=filemanager
-  MAINTAINER:=Luka Perkov <open...@lukaperkov.net>
+       SECTION:=utils
+       CATEGORY:=Utilities
+       DEPENDS:=+glib2 +libncurses +libiconv
+       TITLE:=midnight commander - a powerful file manager
+       URL:=http://www.midnight-commander.org/
+       SUBMENU:=Filemanager
+       MAINTAINER:=Luka Perkov <open...@lukaperkov.net>
+       MENU:=1
 endef
 
 define Package/mc/description
- GNU Midnight Commander is a visual file manager, licensed under GNU General
- Public License and therefore qualifies as Free Software. It's a feature rich
- full-screen text mode application that allows you to copy, move and delete
- files and whole directory trees, search for files and run commands in the
- subshell.
+       GNU Midnight Commander is a visual file manager, licensed under GNU 
General
+       Public License and therefore qualifies as Free Software. It's a feature 
rich
+       full-screen text mode application that allows you to copy, move and 
delete
+       files and whole directory trees, search for files and run commands in 
the
+       subshell.
 endef
 
+define Package/mc/config
+       source "$(SOURCE)/Config.in"
+endef
+
+mc-conf-args-$(CONFIG_MC_DISABLE_EDITOR) += --without-edit
+mc-conf-args-$(CONFIG_MC_DISABLE_SUBSHELL) += --without-subshell
+
 CONFIGURE_ARGS += \
        --enable-utf8 \
        --disable-vfs \
        --with-screen=ncurses \
-       --without-edit \
        --without-gpm-mouse \
-       --without-subshell \
        --without-x \
-       ac_cv_search_addwstr=no
+       ac_cv_search_addwstr=no \
+       $(mc-conf-args-y)
 
 AM_HOST=$(firstword $(wildcard $(STAGING_DIR_HOST)/share/automake-*))
 
@@ -61,6 +68,11 @@ endef
 define Package/mc/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mc $(1)/usr/bin/
+       ln -sf mc $(1)/usr/bin/mcview
+       ln -sf mc $(1)/usr/bin/mcdiff
+ifneq ($(CONFIG_MC_DISABLE_EDITOR),y)
+       ln -sf mc $(1)/usr/bin/mcedit
+endif
        $(INSTALL_DIR) $(1)/etc/mc
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.menu $(1)/etc/mc
        $(INSTALL_DIR) $(1)/etc/mc/skins
@@ -69,8 +81,8 @@ define Package/mc/install
 endef
 
 define Package/mc/conffiles
-/etc/mc/mc.menu
-/etc/mc/skins/default.ini
+       /etc/mc/mc.menu
+       /etc/mc/skins/default.ini
 endef
 
 $(eval $(call BuildPackage,mc))
-- 
1.7.6

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to