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.

126 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.17
  10. PKG_RELEASE:=3
  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:=0447bdddc0baa81866e66f50f9a545d29d6eebb68b0ab46c98d8fddd2bf4e44d
  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:=http://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-included-gettext \
  50. --with-screen=ncurses \
  51. --without-gpm-mouse \
  52. --without-x \
  53. CONFIGURE_VARS += \
  54. ac_cv_search_addwstr=no \
  55. ifeq ($(CONFIG_MC_DIFFVIEWER),)
  56. CONFIGURE_ARGS += \
  57. --without-diff-viewer
  58. endif
  59. ifeq ($(CONFIG_MC_EDITOR),)
  60. CONFIGURE_ARGS += \
  61. --without-internal-edit
  62. endif
  63. ifeq ($(CONFIG_MC_SUBSHELL),)
  64. CONFIGURE_ARGS += \
  65. --without-subshell
  66. endif
  67. ifeq ($(CONFIG_MC_LARGEFILE),)
  68. CONFIGURE_ARGS += \
  69. --disable-largefile
  70. endif
  71. ifeq ($(CONFIG_MC_BACKGROUND),)
  72. CONFIGURE_ARGS += \
  73. --disable-background
  74. endif
  75. ifeq ($(CONFIG_MC_CHARSET),)
  76. CONFIGURE_ARGS += \
  77. --disable-charset
  78. endif
  79. ifeq ($(CONFIG_MC_VFS),)
  80. CONFIGURE_ARGS += \
  81. --disable-vfs
  82. endif
  83. define Package/$(PKG_NAME)/install
  84. $(INSTALL_DIR) $(1)/usr/bin
  85. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mc $(1)/usr/bin
  86. $(INSTALL_DIR) $(1)/etc/mc
  87. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.charsets $(1)/etc/mc
  88. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.default.keymap $(1)/etc/mc
  89. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.ext $(1)/etc/mc
  90. ifeq ($(CONFIG_MC_DIFFVIEWER),y)
  91. ln -sf mc $(1)/usr/bin/mcdiff
  92. endif
  93. ifeq ($(CONFIG_MC_EDITOR),y)
  94. ln -sf mc $(1)/usr/bin/mcedit
  95. endif
  96. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.menu $(1)/etc/mc
  97. $(INSTALL_DIR) $(1)/etc/mc/skins
  98. $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/skins/default.ini $(1)/etc/mc/skins
  99. $(INSTALL_DIR) $(1)/etc/mc/mcedit/Syntax
  100. endef
  101. define Package/$(PKG_NAME)/conffiles
  102. /etc/mc/mc.menu
  103. /etc/mc/skins/default.ini
  104. endef
  105. $(eval $(call BuildPackage,$(PKG_NAME)))