974f2da6f3bc60debfb183475d81ea16be86a2f5
[packages.git] / utils / mc / Makefile
1
2 # Copyright (C) 2006-2011 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=mc
11 PKG_VERSION:=4.7.5.2
12 PKG_RELEASE:=3
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.midnight-commander.org/downloads/
16 PKG_MD5SUM:=9fdfe7c0fcff362436eb35fcd1adf0fd
17
18 PKG_BUILD_PARALLEL:=1
19
20 include $(INCLUDE_DIR)/package.mk
21 include $(INCLUDE_DIR)/nls.mk
22
23 define Package/mc
24   SECTION:=utils
25   CATEGORY:=Utilities
26   DEPENDS:=+glib2 +libncurses +libiconv
27   TITLE:=midnight commander - a powerful file manager
28   URL:=http://www.midnight-commander.org/
29   SUBMENU:=filemanager
30   MAINTAINER:=Luka Perkov <openwrt@lukaperkov.net>
31 endef
32
33 define Package/mc/description
34  GNU Midnight Commander is a visual file manager, licensed under GNU General
35  Public License and therefore qualifies as Free Software. It's a feature rich
36  full-screen text mode application that allows you to copy, move and delete
37  files and whole directory trees, search for files and run commands in the
38  subshell.
39 endef
40
41 CONFIGURE_ARGS += \
42         --enable-utf8 \
43         --disable-vfs \
44         --with-screen=ncurses \
45         --without-edit \
46         --without-gpm-mouse \
47         --without-subshell \
48         --without-x \
49         ac_cv_search_addwstr=no
50
51 AM_HOST=$(firstword $(wildcard $(STAGING_DIR_HOST)/share/automake-*))
52
53 define Build/Prepare
54         $(Build/Prepare/Default)
55         for script in config.guess config.sub depcomp install-sh missing; do \
56                 rm -f $(PKG_BUILD_DIR)/config/$$$$script; \
57                 ln -s $(AM_HOST)/$$$$script $(PKG_BUILD_DIR)/config/$$$$script; \
58         done
59 endef
60
61 define Package/mc/install
62         $(INSTALL_DIR) $(1)/usr/bin
63         $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mc $(1)/usr/bin/
64         $(INSTALL_DIR) $(1)/etc/mc
65         $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.menu $(1)/etc/mc
66         $(INSTALL_DIR) $(1)/etc/mc/skins
67         $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/skins/default.ini $(1)/etc/mc/skins
68         $(INSTALL_DIR) $(1)/root/.mc
69 endef
70
71 define Package/mc/conffiles
72 /etc/mc/mc.menu
73 /etc/mc/skins/default.ini
74 endef
75
76 $(eval $(call BuildPackage,mc))