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.0 KiB

  1. #
  2. # Copyright (C) 2006-2016 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.18
  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_MD5SUM:=f7636815c987c1719c4f5de2dcd156a0e7d097b1d10e4466d2bdead343d5bece
  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/$(PKG_NAME)
  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/$(PKG_NAME)/config
  38. source "$(SOURCE)/Config.in"
  39. endef
  40. define Package/$(PKG_NAME)/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. --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 += \
  56. --without-diff-viewer
  57. endif
  58. ifeq ($(CONFIG_MC_EDITOR),)
  59. CONFIGURE_ARGS += \
  60. --without-internal-edit
  61. endif
  62. ifeq ($(CONFIG_MC_SUBSHELL),)
  63. CONFIGURE_ARGS += \
  64. --without-subshell
  65. endif
  66. ifeq ($(CONFIG_MC_LARGEFILE),)
  67. CONFIGURE_ARGS += \
  68. --disable-largefile
  69. endif
  70. ifeq ($(CONFIG_MC_BACKGROUND),)
  71. CONFIGURE_ARGS += \
  72. --disable-background
  73. endif
  74. ifeq ($(CONFIG_MC_CHARSET),)
  75. CONFIGURE_ARGS += \
  76. --disable-charset
  77. endif
  78. ifeq ($(CONFIG_MC_VFS),)
  79. CONFIGURE_ARGS += \
  80. --disable-vfs
  81. endif
  82. define Package/$(PKG_NAME)/install
  83. $(INSTALL_DIR) $(1)/usr/bin
  84. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mc $(1)/usr/bin
  85. $(INSTALL_DIR) $(1)/etc/mc
  86. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.charsets $(1)/etc/mc
  87. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.default.keymap $(1)/etc/mc
  88. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.ext $(1)/etc/mc
  89. $(INSTALL_DIR) $(1)/usr/share/mc/help
  90. $(INSTALL_DATA) $(PKG_BUILD_DIR)/doc/hlp/mc.hlp $(1)/usr/share/mc/help
  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. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.menu $(1)/etc/mc
  98. $(INSTALL_DIR) $(1)/etc/mc/skins
  99. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/skins/default.ini $(1)/etc/mc/skins
  100. $(INSTALL_DIR) $(1)/etc/mc/mcedit/Syntax
  101. endef
  102. define Package/$(PKG_NAME)/conffiles
  103. /etc/mc/mc.menu
  104. /etc/mc/skins/default.ini
  105. endef
  106. $(eval $(call BuildPackage,$(PKG_NAME)))