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.

129 lines
3.0 KiB

  1. #
  2. # Copyright (C) 2006-2017 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=mc
  9. PKG_VERSION:=4.8.19
  10. PKG_RELEASE:=1
  11. PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
  12. PKG_LICENSE:=GPL-3.0+
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  14. PKG_SOURCE_URL:=http://ftp.midnight-commander.org/
  15. PKG_HASH:=eb9e56bbb5b2893601d100d0e0293983049b302c5ab61bfb544ad0ee2cc1f2df
  16. PKG_BUILD_PARALLEL:=1
  17. PKG_FIXUP:=autoreconf gettext-version
  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 $(LIBRPC_DEPENDS) $(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-gpm-mouse \
  53. --without-x \
  54. CONFIGURE_VARS += \
  55. ac_cv_search_addwstr=no \
  56. ifeq ($(CONFIG_MC_DIFFVIEWER),)
  57. CONFIGURE_ARGS += \
  58. --without-diff-viewer
  59. endif
  60. ifeq ($(CONFIG_MC_EDITOR),)
  61. CONFIGURE_ARGS += \
  62. --without-internal-edit
  63. endif
  64. ifeq ($(CONFIG_MC_SUBSHELL),)
  65. CONFIGURE_ARGS += \
  66. --without-subshell
  67. endif
  68. ifeq ($(CONFIG_MC_LARGEFILE),)
  69. CONFIGURE_ARGS += \
  70. --disable-largefile
  71. endif
  72. ifeq ($(CONFIG_MC_BACKGROUND),)
  73. CONFIGURE_ARGS += \
  74. --disable-background
  75. endif
  76. ifeq ($(CONFIG_MC_CHARSET),)
  77. CONFIGURE_ARGS += \
  78. --disable-charset
  79. endif
  80. ifeq ($(CONFIG_MC_VFS),)
  81. CONFIGURE_ARGS += \
  82. --disable-vfs
  83. endif
  84. define Package/mc/install
  85. $(INSTALL_DIR) $(1)/usr/bin
  86. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mc $(1)/usr/bin
  87. $(INSTALL_DIR) $(1)/etc/mc
  88. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.charsets $(1)/etc/mc
  89. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.default.keymap $(1)/etc/mc
  90. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.ext $(1)/etc/mc
  91. $(INSTALL_DIR) $(1)/usr/share/mc/help
  92. $(INSTALL_DATA) $(PKG_BUILD_DIR)/doc/hlp/mc.hlp $(1)/usr/share/mc/help
  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. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.menu $(1)/etc/mc
  100. $(INSTALL_DIR) $(1)/etc/mc/skins
  101. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/skins/default.ini $(1)/etc/mc/skins
  102. $(INSTALL_DIR) $(1)/etc/mc/mcedit/Syntax
  103. endef
  104. define Package/mc/conffiles
  105. /etc/mc/mc.menu
  106. /etc/mc/skins/default.ini
  107. endef
  108. $(eval $(call BuildPackage,mc))