expand helptext of dm
[buildroot.git] / package / mc / mc.mk
blobe2ae462bd4f5dac5cf6cfb29bec8217321f13b8c
1 #############################################################
3 # mc
5 #############################################################
6 MC_VERSION:=4.6.2~git20080311
7 MC_PATCH:=-4
8 MC_SOURCE:=mc_$(MC_VERSION).orig.tar.gz
9 MC_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/m/mc
10 MC_CAT:=$(ZCAT)
11 MC_DIR:=$(BUILD_DIR)/mc-$(MC_VERSION)
12 MC_BINARY:=src/mc
13 MC_TARGET_BINARY:=usr/bin/mc
16 ifneq ($(strip $(MC_PATCH)),)
17 MC_PATCH_FILE:=$(DL_DIR)/mc_$(MC_VERSION)$(MC_PATCH).diff.gz
18 $(MC_PATCH_FILE):
19 $(WGET) -P $(DL_DIR) $(MC_SITE)/$(notdir $@)
20 touch -c $@
21 endif
22 $(DL_DIR)/$(MC_SOURCE):
23 $(WGET) -P $(DL_DIR) $(MC_SITE)/$(MC_SOURCE)
24 touch -c $@
26 $(MC_DIR)/.unpacked: $(DL_DIR)/$(MC_SOURCE) $(MC_PATCH_FILE)
27 $(MC_CAT) $(DL_DIR)/$(MC_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
28 ifneq ($(MC_PATCH_FILE),)
29 (cd $(@D) && $(MC_CAT) $(MC_PATCH_FILE) | patch -p1)
30 if [ -d $(@D)/debian/patches ]; then \
31 toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches \*-\*; \
33 endif
34 #toolchain/patch-kernel.sh $(MC_DIR) package/mc \*.patch
35 $(CONFIG_UPDATE) $(@D)
36 -chmod +x $(@D)/configure
37 touch $@
39 MC_EXTRA_CONFIG=--with-included-gettext \
40 $(if $(BR2_PACKAGE_SLANG),,--with-included-slang) \
41 --with-subshell=no \
42 --with-terminfo \
44 $(MC_DIR)/.configured: $(MC_DIR)/.unpacked
45 (cd $(MC_DIR); rm -rf config.cache; \
46 $(AUTO_CONFIGURE_TARGET) \
47 --prefix=/usr \
48 --mandir=/usr/share/man \
49 --infodir=/usr/share/info \
50 $(DISABLE_NLS) \
51 $(DISABLE_LARGEFILE) \
52 --with-mmap \
53 --with-vfs \
54 --disable-glibtest \
55 $(if $(BR2_PACKAGE_GPM),--with-gpm-mouse,--without-gpm-mouse) \
56 $(if $(BR2_PACKAGE_MC_EDIT),--with-edit,--without-edit) \
57 $(if $(BR2_PACKAGE_XSERVER_none),--without-x,--with-x) \
58 $(if $(BR2_PACKAGE_SLANG),--with-screen=slang,$(if $(BR2_PACKAGE_NCURSES),--with-screen=ncurses)) \
60 touch $@
62 $(MC_DIR)/$(MC_BINARY): $(MC_DIR)/.configured
63 $(MAKE) -C $(MC_DIR)
65 $(TARGET_DIR)/$(MC_TARGET_BINARY): $(MC_DIR)/$(MC_BINARY)
66 $(MAKE) DESTDIR=$(TARGET_DIR) -C $(MC_DIR) install
67 ifneq ($(BR2_HAVE_MANPAGES),y)
68 rm -rf $(TARGET_DIR)/usr/share/man
69 endif
70 ifneq ($(BR2_HAVE_INFOPAGES),y)
71 rm -rf $(TARGET_DIR)/usr/share/info
72 endif
73 $(STRIPCMD) $(STRIP_STRIP_ALL) $@
75 mc: uclibc pkgconfig $(if $(BR2_PACKAGE_GPM),gpm) $(TARGET_DIR)/$(MC_TARGET_BINARY)
77 mc-source: $(DL_DIR)/$(MC_SOURCE)
79 mc-clean:
80 -$(MAKE) -C $(MC_DIR) clean
81 $(MAKE) DESTDIR=$(TARGET_DIR) -C $(MC_DIR) uninstall
83 mc-dirclean:
84 rm -rf $(MC_DIR)
86 #############################################################
88 # Toplevel Makefile options
90 #############################################################
91 ifeq ($(BR2_PACKAGE_MC),y)
92 TARGETS+=mc
93 endif