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.

128 lines
3.3 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.26
  8. PKG_RELEASE:=1
  9. PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
  10. PKG_LICENSE:=GPL-3.0-or-later
  11. PKG_CPE_ID:=cpe:/a:midnight_commander:midnight_commander
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  13. PKG_SOURCE_URL:=http://ftp.midnight-commander.org/
  14. PKG_HASH:=c6deadc50595f2d9a22dc6c299a9f28b393e358346ebf6ca444a8469dc166c27
  15. PKG_BUILD_PARALLEL:=1
  16. PKG_FIXUP:=autoreconf gettext-version
  17. PKG_BUILD_DEPENDS:=MC_VFS:libtirpc
  18. PKG_CONFIG_DEPENDS := \
  19. CONFIG_PACKAGE_MC \
  20. CONFIG_MC_DIFFVIEWER \
  21. CONFIG_MC_EDITOR \
  22. CONFIG_MC_SUBSHELL \
  23. CONFIG_MC_LARGEFILE \
  24. CONFIG_MC_BACKGROUND \
  25. CONFIG_MC_CHARSET \
  26. CONFIG_MC_VFS
  27. include $(INCLUDE_DIR)/package.mk
  28. include $(INCLUDE_DIR)/nls.mk
  29. define Package/mc
  30. SECTION:=utils
  31. CATEGORY:=Utilities
  32. DEPENDS:=+glib2 +libncurses +libmount +MC_VFS:libssh2 $(ICONV_DEPENDS)
  33. TITLE:=Midnight Commander - a powerful visual file manager
  34. URL:=https://www.midnight-commander.org/
  35. MENU:=1
  36. endef
  37. define Package/mc/config
  38. source "$(SOURCE)/Config.in"
  39. endef
  40. define Package/mc/description
  41. GNU Midnight Commander is a visual file manager.
  42. It's a feature rich full-screen text mode application that allows you to copy,
  43. move and delete files and whole directory trees, search for files and run commands in the subshell.
  44. Internal viewer and editor are included as well.
  45. endef
  46. CONFIGURE_ARGS += \
  47. --enable-silent-rules \
  48. --disable-tests \
  49. --disable-doxygen-doc \
  50. --with-homedir=/etc/mc \
  51. --with-screen=ncurses \
  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.ext $(1)/etc/mc
  84. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.default.keymap $(1)/etc/mc/mc.keymap
  85. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/filehighlight.ini $(1)/etc/mc
  86. $(INSTALL_DIR) $(1)/usr/share/mc/help
  87. $(INSTALL_DATA) $(PKG_BUILD_DIR)/doc/hlp/mc.hlp $(1)/usr/share/mc/help
  88. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.menu $(1)/etc/mc
  89. $(INSTALL_DIR) $(1)/etc/mc/skins
  90. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/skins/default.ini $(1)/etc/mc/skins
  91. $(INSTALL_DIR) $(1)/etc/mc/mcedit/Syntax
  92. ifeq ($(CONFIG_MC_DIFFVIEWER),y)
  93. ln -sf mc $(1)/usr/bin/mcdiff
  94. endif
  95. ifeq ($(CONFIG_MC_EDITOR),y)
  96. ln -sf mc $(1)/usr/bin/mcedit
  97. endif
  98. ifeq ($(CONFIG_MC_VFS),y)
  99. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/vfs/sfs/sfs.ini $(1)/etc/mc
  100. $(INSTALL_DIR) $(1)/usr/lib/mc/extfs.d
  101. endif
  102. endef
  103. define Package/mc/conffiles
  104. /etc/mc/mc.menu
  105. /etc/mc/skins/default.ini
  106. endef
  107. $(eval $(call BuildPackage,mc))