2 # Copyright (C) 2006-2011 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://www.midnight-commander.org/downloads/
16 PKG_MD5SUM:=6a67e139e0032d8a871455a80d490941
20 include $(INCLUDE_DIR)/package.mk
21 include $(INCLUDE_DIR)/nls.mk
26 DEPENDS:=+glib2 +libncurses +libiconv
27 TITLE:=midnight commander - a powerful file manager
28 URL:=http://www.midnight-commander.org/
30 MAINTAINER:=Luka Perkov <openwrt@lukaperkov.net>
34 define Package/mc/config
35 source "$(SOURCE)/Config.in"
38 define Package/mc/description
39 GNU Midnight Commander is a visual file manager, licensed under GNU General
40 Public License and therefore qualifies as Free Software. It's a feature rich
41 full-screen text mode application that allows you to copy, move and delete
42 files and whole directory trees, search for files and run commands in the
48 --disable-doxygen-doc \
49 --with-screen=ncurses \
52 ac_cv_search_addwstr=no
54 ifeq ($(CONFIG_MC_DIFF_VIEWER),n)
59 ifeq ($(CONFIG_MC_EDITOR),n)
64 ifeq ($(CONFIG_MC_SUBSHELL),n)
69 ifeq ($(CONFIG_MC_DISABLE_VFS),y)
74 AM_HOST=$(firstword $(wildcard $(STAGING_DIR_HOST)/share/automake-*))
77 $(Build/Prepare/Default)
78 for script in config.guess config.sub depcomp install-sh missing; do \
79 rm -f $(PKG_BUILD_DIR)/config/$$$$script; \
80 ln -s $(AM_HOST)/$$$$script $(PKG_BUILD_DIR)/config/$$$$script; \
84 define Package/mc/install
85 $(INSTALL_DIR) $(1)/usr/bin
86 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mc $(1)/usr/bin
87 $(INSTALL_DIR) $(1)/etc/mc
88 ifeq ($(CONFIG_MC_DIFF_VIEWER),y)
89 ln -sf mc $(1)/usr/bin/mcdiff
91 ifeq ($(CONFIG_MC_EDITOR),y)
92 ln -sf mc $(1)/usr/bin/mcedit
94 $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.menu $(1)/etc/mc
95 $(INSTALL_DIR) $(1)/etc/mc/skins
96 $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/skins/default.ini $(1)/etc/mc/skins
97 $(INSTALL_DIR) $(1)/root/.mc
100 define Package/mc/conffiles
102 /etc/mc/skins/default.ini
105 $(eval $(call BuildPackage,mc))