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.

124 lines
3.1 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.20
  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:=017ee7f4f8ae420a04f4d6fcebaabe5b494661075c75442c76e9c8b1923d501c
  14. PKG_BUILD_PARALLEL:=1
  15. PKG_FIXUP:=autoreconf gettext-version
  16. PKG_CONFIG_DEPENDS := \
  17. CONFIG_PACKAGE_MC \
  18. CONFIG_MC_DIFFVIEWER \
  19. CONFIG_MC_EDITOR \
  20. CONFIG_MC_SUBSHELL \
  21. CONFIG_MC_LARGEFILE \
  22. CONFIG_MC_BACKGROUND \
  23. CONFIG_MC_CHARSET \
  24. CONFIG_MC_VFS
  25. include $(INCLUDE_DIR)/package.mk
  26. include $(INCLUDE_DIR)/nls.mk
  27. define Package/mc
  28. SECTION:=utils
  29. CATEGORY:=Utilities
  30. DEPENDS:=+glib2 +libncurses +libmount +MC_VFS:libssh2 $(LIBRPC_DEPENDS) $(ICONV_DEPENDS)
  31. TITLE:=Midnight Commander - a powerful visual file manager
  32. URL:=https://www.midnight-commander.org/
  33. MENU:=1
  34. endef
  35. define Package/mc/config
  36. source "$(SOURCE)/Config.in"
  37. endef
  38. define Package/mc/description
  39. GNU Midnight Commander is a visual file manager.
  40. It's a feature rich full-screen text mode application that allows you to copy,
  41. move and delete files and whole directory trees, search for files and run commands in the subshell.
  42. Internal viewer and editor are included as well.
  43. endef
  44. CONFIGURE_ARGS += \
  45. --enable-silent-rules \
  46. --disable-tests \
  47. --disable-doxygen-doc \
  48. --with-homedir=/etc/mc \
  49. --with-screen=ncurses \
  50. --without-gpm-mouse \
  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. endif
  75. define Package/mc/install
  76. $(INSTALL_DIR) $(1)/usr/bin
  77. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mc $(1)/usr/bin
  78. $(INSTALL_DIR) $(1)/etc/mc
  79. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.charsets $(1)/etc/mc
  80. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.default.keymap $(1)/etc/mc
  81. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.ext $(1)/etc/mc
  82. $(INSTALL_DIR) $(1)/usr/share/mc/help
  83. $(INSTALL_DATA) $(PKG_BUILD_DIR)/doc/hlp/mc.hlp $(1)/usr/share/mc/help
  84. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.menu $(1)/etc/mc
  85. $(INSTALL_DIR) $(1)/etc/mc/skins
  86. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/skins/default.ini $(1)/etc/mc/skins
  87. $(INSTALL_DIR) $(1)/etc/mc/mcedit/Syntax
  88. ifeq ($(CONFIG_MC_DIFFVIEWER),y)
  89. ln -sf mc $(1)/usr/bin/mcdiff
  90. endif
  91. ifeq ($(CONFIG_MC_EDITOR),y)
  92. ln -sf mc $(1)/usr/bin/mcedit
  93. endif
  94. ifeq ($(CONFIG_MC_VFS),y)
  95. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/vfs/extfs/helpers/sfs.ini $(1)/etc/mc
  96. $(INSTALL_DIR) $(1)/usr/lib/mc/extfs.d
  97. endif
  98. endef
  99. define Package/mc/conffiles
  100. /etc/mc/mc.menu
  101. /etc/mc/skins/default.ini
  102. endef
  103. $(eval $(call BuildPackage,mc))