1 #############################################################
5 #############################################################
6 MC_VERSION
:=4.6.2~git20080311
8 MC_SOURCE
:=mc_
$(MC_VERSION
).orig.
tar.gz
9 MC_SITE
:=$(BR2_DEBIAN_MIRROR
)/debian
/pool
/main
/m
/mc
11 MC_DIR
:=$(BUILD_DIR
)/mc-
$(MC_VERSION
)
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
19 $(WGET
) -P
$(DL_DIR
) $(MC_SITE
)/$(notdir $@
)
22 $(DL_DIR
)/$(MC_SOURCE
):
23 $(WGET
) -P
$(DL_DIR
) $(MC_SITE
)/$(MC_SOURCE
)
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 \
*-\
*; \
34 #toolchain/patch-kernel.sh $(MC_DIR) package/mc \*.patch
35 $(CONFIG_UPDATE
) $(@D
)
36 -chmod
+x
$(@D
)/configure
39 MC_EXTRA_CONFIG
=--with-included-gettext \
40 $(if
$(BR2_PACKAGE_SLANG
),,--with-included-slang
) \
44 $(MC_DIR
)/.configured
: $(MC_DIR
)/.unpacked
45 (cd
$(MC_DIR
); rm -rf config.cache
; \
46 $(AUTO_CONFIGURE_TARGET
) \
48 --mandir=/usr
/share
/man \
49 --infodir=/usr
/share
/info \
51 $(DISABLE_LARGEFILE
) \
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
)) \
62 $(MC_DIR
)/$(MC_BINARY
): $(MC_DIR
)/.configured
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
70 ifneq ($(BR2_HAVE_INFOPAGES
),y
)
71 rm -rf
$(TARGET_DIR
)/usr
/share
/info
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
)
80 -$(MAKE
) -C
$(MC_DIR
) clean
81 $(MAKE
) DESTDIR
=$(TARGET_DIR
) -C
$(MC_DIR
) uninstall
86 #############################################################
88 # Toplevel Makefile options
90 #############################################################
91 ifeq ($(BR2_PACKAGE_MC
),y
)