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.

148 lines
3.8 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.27
  8. PKG_RELEASE:=3
  9. PKG_MAINTAINER:=
  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:=31be59225ffa9920816e9a8b3be0ab225a16d19e4faf46890f25bdffa02a4ff4
  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)/usr/share/mc/syntax
  92. touch $(1)/usr/share/mc/syntax/Syntax
  93. ifeq ($(CONFIG_MC_DIFFVIEWER),y)
  94. ln -sf mc $(1)/usr/bin/mcdiff
  95. endif
  96. ifeq ($(CONFIG_MC_EDITOR),y)
  97. ln -sf mc $(1)/usr/bin/mcedit
  98. endif
  99. ifeq ($(CONFIG_MC_VFS),y)
  100. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/vfs/sfs/sfs.ini $(1)/etc/mc
  101. $(INSTALL_DIR) $(1)/usr/lib/mc/extfs.d
  102. endif
  103. endef
  104. define Package/mc/conffiles
  105. /etc/mc/mc.menu
  106. /etc/mc/skins/default.ini
  107. endef
  108. define Package/mc-skins
  109. TITLE:=Midnight Commander - a powerful visual file manager - skins
  110. URL:=https://www.midnight-commander.org/
  111. SECTION:=utils
  112. CATEGORY:=Utilities
  113. DEPENDS:=+mc
  114. endef
  115. define Package/mc-skins/install
  116. $(INSTALL_DIR) $(1)/etc/mc/skins
  117. $(CP) $(PKG_BUILD_DIR)/misc/skins/*.ini $(1)/etc/mc/skins/
  118. $(RM) $(1)/etc/mc/skins/default.ini
  119. endef
  120. define Package/mc-skins/conffiles
  121. /etc/mc/skins/
  122. endef
  123. $(eval $(call BuildPackage,mc))
  124. $(eval $(call BuildPackage,mc-skins))