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.23
  8. PKG_RELEASE:=1
  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:=dd7f7ce74183307b0df25b5c3e60ad3293fd3d3d27d2f37dd7a10efce13dff1c
  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-x \
  52. CONFIGURE_VARS += \
  53. ac_cv_search_addwstr=no \
  54. ifeq ($(CONFIG_MC_DIFFVIEWER),)
  55. CONFIGURE_ARGS += --without-diff-viewer
  56. endif
  57. ifeq ($(CONFIG_MC_EDITOR),)
  58. CONFIGURE_ARGS += --without-internal-edit
  59. endif
  60. ifeq ($(CONFIG_MC_SUBSHELL),)
  61. CONFIGURE_ARGS += --without-subshell
  62. endif
  63. ifeq ($(CONFIG_MC_LARGEFILE),)
  64. CONFIGURE_ARGS += --disable-largefile
  65. endif
  66. ifeq ($(CONFIG_MC_BACKGROUND),)
  67. CONFIGURE_ARGS += --disable-background
  68. endif
  69. ifeq ($(CONFIG_MC_CHARSET),)
  70. CONFIGURE_ARGS += --disable-charset
  71. endif
  72. ifeq ($(CONFIG_MC_VFS),)
  73. CONFIGURE_ARGS += --disable-vfs
  74. else
  75. TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/tirpc
  76. endif
  77. define Package/mc/install
  78. $(INSTALL_DIR) $(1)/usr/bin
  79. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mc $(1)/usr/bin
  80. $(INSTALL_DIR) $(1)/etc/mc
  81. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.charsets $(1)/etc/mc
  82. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.ext $(1)/etc/mc
  83. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.default.keymap $(1)/etc/mc/mc.keymap
  84. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/filehighlight.ini $(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/sfs/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))