upgrade mc package
[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.3
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://www.midnight-commander.org/downloads/
16 PKG_MD5SUM:=6a67e139e0032d8a871455a80d490941
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   MENU:=1
32 endef
33
34 define Package/mc/config
35         source "$(SOURCE)/Config.in"
36 endef
37
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
43  subshell.
44 endef
45
46 CONFIGURE_ARGS += \
47         --enable-utf8 \
48         --disable-doxygen-doc \
49         --with-screen=ncurses \
50         --without-gpm-mouse \
51         --without-x \
52         ac_cv_search_addwstr=no
53
54 ifeq ($(CONFIG_MC_DIFF_VIEWER),n)
55 CONFIGURE_ARGS += \
56         --without-diff-viewer
57 endif
58
59 ifeq ($(CONFIG_MC_EDITOR),n)
60 CONFIGURE_ARGS += \
61         --without-edit
62 endif
63
64 ifeq ($(CONFIG_MC_SUBSHELL),n)
65 CONFIGURE_ARGS += \
66         --without-subshell
67 endif
68
69 ifeq ($(CONFIG_MC_DISABLE_VFS),y)
70 CONFIGURE_ARGS += \
71         --without-vfs
72 endif
73
74 AM_HOST=$(firstword $(wildcard $(STAGING_DIR_HOST)/share/automake-*))
75
76 define Build/Prepare
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; \
81         done
82 endef
83
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
90 endif
91 ifeq ($(CONFIG_MC_EDITOR),y)
92         ln -sf mc $(1)/usr/bin/mcedit
93 endif
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
98 endef
99
100 define Package/mc/conffiles
101 /etc/mc/mc.menu
102 /etc/mc/skins/default.ini
103 endef
104
105 $(eval $(call BuildPackage,mc))