You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

127 lines
3.2 KiB

  1. #
  2. # This is free software, licensed under the GNU General Public License v2.
  3. # See /LICENSE for more information.
  4. #
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=mc
  7. PKG_VERSION:=4.8.21
  8. PKG_RELEASE:=2
  9. PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
  10. PKG_LICENSE:=GPL-3.0+
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=http://ftp.midnight-commander.org/
  13. PKG_HASH:=8f37e546ac7c31c9c203a03b1c1d6cb2d2f623a300b86badfd367e5559fe148c
  14. PKG_BUILD_PARALLEL:=1
  15. PKG_FIXUP:=autoreconf gettext-version
  16. PKG_BUILD_DEPENDS:=MC_VFS:libtirpc
  17. PKG_CONFIG_DEPENDS := \
  18. CONFIG_PACKAGE_MC \
  19. CONFIG_MC_DIFFVIEWER \
  20. CONFIG_MC_EDITOR \
  21. CONFIG_MC_SUBSHELL \
  22. CONFIG_MC_LARGEFILE \
  23. CONFIG_MC_BACKGROUND \
  24. CONFIG_MC_CHARSET \
  25. CONFIG_MC_VFS
  26. include $(INCLUDE_DIR)/package.mk
  27. include $(INCLUDE_DIR)/nls.mk
  28. define Package/mc
  29. SECTION:=utils
  30. CATEGORY:=Utilities
  31. DEPENDS:=+glib2 +libncurses +libmount +MC_VFS:libssh2 $(ICONV_DEPENDS)
  32. TITLE:=Midnight Commander - a powerful visual file manager
  33. URL:=https://www.midnight-commander.org/
  34. MENU:=1
  35. endef
  36. define Package/mc/config
  37. source "$(SOURCE)/Config.in"
  38. endef
  39. define Package/mc/description
  40. GNU Midnight Commander is a visual file manager.
  41. It's a feature rich full-screen text mode application that allows you to copy,
  42. move and delete files and whole directory trees, search for files and run commands in the subshell.
  43. Internal viewer and editor are included as well.
  44. endef
  45. CONFIGURE_ARGS += \
  46. --enable-silent-rules \
  47. --disable-tests \
  48. --disable-doxygen-doc \
  49. --with-homedir=/etc/mc \
  50. --with-screen=ncurses \
  51. --without-gpm-mouse \
  52. --without-x \
  53. CONFIGURE_VARS += \
  54. ac_cv_search_addwstr=no \
  55. ifeq ($(CONFIG_MC_DIFFVIEWER),)
  56. CONFIGURE_ARGS += --without-diff-viewer
  57. endif
  58. ifeq ($(CONFIG_MC_EDITOR),)
  59. CONFIGURE_ARGS += --without-internal-edit
  60. endif
  61. ifeq ($(CONFIG_MC_SUBSHELL),)
  62. CONFIGURE_ARGS += --without-subshell
  63. endif
  64. ifeq ($(CONFIG_MC_LARGEFILE),)
  65. CONFIGURE_ARGS += --disable-largefile
  66. endif
  67. ifeq ($(CONFIG_MC_BACKGROUND),)
  68. CONFIGURE_ARGS += --disable-background
  69. endif
  70. ifeq ($(CONFIG_MC_CHARSET),)
  71. CONFIGURE_ARGS += --disable-charset
  72. endif
  73. ifeq ($(CONFIG_MC_VFS),)
  74. CONFIGURE_ARGS += --disable-vfs
  75. else
  76. TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/tirpc
  77. endif
  78. define Package/mc/install
  79. $(INSTALL_DIR) $(1)/usr/bin
  80. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mc $(1)/usr/bin
  81. $(INSTALL_DIR) $(1)/etc/mc
  82. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.charsets $(1)/etc/mc
  83. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.default.keymap $(1)/etc/mc
  84. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.ext $(1)/etc/mc
  85. $(INSTALL_DIR) $(1)/usr/share/mc/help
  86. $(INSTALL_DATA) $(PKG_BUILD_DIR)/doc/hlp/mc.hlp $(1)/usr/share/mc/help
  87. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.menu $(1)/etc/mc
  88. $(INSTALL_DIR) $(1)/etc/mc/skins
  89. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/skins/default.ini $(1)/etc/mc/skins
  90. $(INSTALL_DIR) $(1)/etc/mc/mcedit/Syntax
  91. ifeq ($(CONFIG_MC_DIFFVIEWER),y)
  92. ln -sf mc $(1)/usr/bin/mcdiff
  93. endif
  94. ifeq ($(CONFIG_MC_EDITOR),y)
  95. ln -sf mc $(1)/usr/bin/mcedit
  96. endif
  97. ifeq ($(CONFIG_MC_VFS),y)
  98. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/vfs/extfs/helpers/sfs.ini $(1)/etc/mc
  99. $(INSTALL_DIR) $(1)/usr/lib/mc/extfs.d
  100. endif
  101. endef
  102. define Package/mc/conffiles
  103. /etc/mc/mc.menu
  104. /etc/mc/skins/default.ini
  105. endef
  106. $(eval $(call BuildPackage,mc))