Merge pull request #2941 from hojuruku/p_mini_snmpd
[feed/packages.git] / utils / mc / Makefile
1 #
2 # Copyright (C) 2006-2016 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.8.17
12 PKG_RELEASE:=3
13 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
14 PKG_LICENSE:=GPL-3.0+
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
17 PKG_SOURCE_URL:=http://ftp.midnight-commander.org/
18 PKG_MD5SUM:=0447bdddc0baa81866e66f50f9a545d29d6eebb68b0ab46c98d8fddd2bf4e44d
19 PKG_BUILD_PARALLEL:=1
20 PKG_FIXUP:=autoreconf gettext-version
21
22 PKG_CONFIG_DEPENDS := \
23 CONFIG_PACKAGE_MC \
24 CONFIG_MC_DIFFVIEWER \
25 CONFIG_MC_EDITOR \
26 CONFIG_MC_SUBSHELL \
27 CONFIG_MC_LARGEFILE \
28 CONFIG_MC_BACKGROUND \
29 CONFIG_MC_CHARSET \
30 CONFIG_MC_VFS
31
32 include $(INCLUDE_DIR)/package.mk
33 include $(INCLUDE_DIR)/nls.mk
34
35 define Package/$(PKG_NAME)
36 SECTION:=utils
37 CATEGORY:=Utilities
38 DEPENDS:=+glib2 +libncurses +libmount +MC_VFS:libssh2 $(LIBRPC_DEPENDS) $(ICONV_DEPENDS)
39 TITLE:=Midnight Commander - a powerful visual file manager
40 URL:=http://www.midnight-commander.org/
41 MENU:=1
42 endef
43
44 define Package/$(PKG_NAME)/config
45 source "$(SOURCE)/Config.in"
46 endef
47
48 define Package/$(PKG_NAME)/description
49 GNU Midnight Commander is a visual file manager.
50 It's a feature rich full-screen text mode application that allows you to copy,
51 move and delete files and whole directory trees, search for files and run commands in the subshell.
52 Internal viewer and editor are included as well.
53
54 endef
55
56 CONFIGURE_ARGS += \
57 --disable-doxygen-doc \
58 --with-homedir=/etc/mc \
59 --with-included-gettext \
60 --with-screen=ncurses \
61 --without-gpm-mouse \
62 --without-x \
63
64 CONFIGURE_VARS += \
65 ac_cv_search_addwstr=no \
66
67 ifeq ($(CONFIG_MC_DIFFVIEWER),)
68 CONFIGURE_ARGS += \
69 --without-diff-viewer
70 endif
71
72 ifeq ($(CONFIG_MC_EDITOR),)
73 CONFIGURE_ARGS += \
74 --without-internal-edit
75 endif
76
77 ifeq ($(CONFIG_MC_SUBSHELL),)
78 CONFIGURE_ARGS += \
79 --without-subshell
80 endif
81
82 ifeq ($(CONFIG_MC_LARGEFILE),)
83 CONFIGURE_ARGS += \
84 --disable-largefile
85 endif
86
87 ifeq ($(CONFIG_MC_BACKGROUND),)
88 CONFIGURE_ARGS += \
89 --disable-background
90 endif
91
92 ifeq ($(CONFIG_MC_CHARSET),)
93 CONFIGURE_ARGS += \
94 --disable-charset
95 endif
96
97 ifeq ($(CONFIG_MC_VFS),)
98 CONFIGURE_ARGS += \
99 --disable-vfs
100 endif
101
102 define Package/$(PKG_NAME)/install
103 $(INSTALL_DIR) $(1)/usr/bin
104 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mc $(1)/usr/bin
105 $(INSTALL_DIR) $(1)/etc/mc
106 $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.charsets $(1)/etc/mc
107 $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.default.keymap $(1)/etc/mc
108 $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.ext $(1)/etc/mc
109 ifeq ($(CONFIG_MC_DIFFVIEWER),y)
110 ln -sf mc $(1)/usr/bin/mcdiff
111 endif
112 ifeq ($(CONFIG_MC_EDITOR),y)
113 ln -sf mc $(1)/usr/bin/mcedit
114 endif
115 $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.menu $(1)/etc/mc
116 $(INSTALL_DIR) $(1)/etc/mc/skins
117 $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/skins/default.ini $(1)/etc/mc/skins
118 $(INSTALL_DIR) $(1)/etc/mc/mcedit/Syntax
119 endef
120
121 define Package/$(PKG_NAME)/conffiles
122 /etc/mc/mc.menu
123 /etc/mc/skins/default.ini
124 endef
125
126 $(eval $(call BuildPackage,$(PKG_NAME)))