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