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.

109 lines
2.4 KiB

  1. #
  2. # Copyright (C) 2007-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:=nano
  9. PKG_VERSION:=6.2
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GNU/nano
  13. PKG_HASH:=2bca1804bead6aaf4ad791f756e4749bb55ed860eec105a97fba864bc6a77cb3
  14. PKG_LICENSE:=GPL-3.0-or-later
  15. PKG_LICENSE_FILES:=COPYING
  16. PKG_MAINTAINER:=Hannu Nyman <hannu.nyman@iki.fi>
  17. PKG_CPE_ID:=cpe:/a:gnu:nano
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/nano/Default
  22. SUBMENU:=Editors
  23. SECTION:=utils
  24. CATEGORY:=Utilities
  25. URL:=https://www.nano-editor.org/
  26. DEPENDS:=+libncurses
  27. endef
  28. define Package/nano
  29. $(call Package/nano/Default)
  30. TITLE:=GNU nano text editor (minimal features)
  31. VARIANT:=tiny
  32. DEFAULT_VARIANT:=1
  33. endef
  34. define Package/nano-plus
  35. $(call Package/nano/Default)
  36. TITLE:=GNU nano text editor (more features, Unicode)
  37. VARIANT:=plus
  38. endef
  39. define Package/nano/description
  40. Nano is a small and simple text editor for use on the terminal.
  41. Nano started as an enhanced clone of the Pico text editor.
  42. Nowadays Nano wants to be a generally useful editor with sensible
  43. defaults (linewise scrolling, no automatic line breaking).
  44. Nano is an official GNU package.
  45. endef
  46. define Package/nano-plus/description
  47. nano-plus - Additional features enabled, larger size than default nano.
  48. (multibuffer, Unicode/UTF-8, help, justify, nanorc, some key bindings)
  49. $(call Package/nano/description)
  50. endef
  51. ifeq ($(BUILD_VARIANT),plus)
  52. # plus variant with more features included
  53. CONFIGURE_ARGS += \
  54. --enable-help \
  55. --enable-justify \
  56. --enable-linenumbers \
  57. --enable-multibuffer \
  58. --enable-nanorc \
  59. --enable-utf8 \
  60. --disable-browser \
  61. --disable-color \
  62. --disable-comment \
  63. --disable-extra \
  64. --disable-histories \
  65. --disable-libmagic \
  66. --disable-mouse \
  67. --disable-operatingdir \
  68. --disable-speller \
  69. --disable-tabcomp \
  70. --disable-wordcomp
  71. else
  72. # default tiny variant
  73. CONFIGURE_ARGS += \
  74. --enable-tiny \
  75. --enable-linenumbers \
  76. --disable-color \
  77. --disable-utf8
  78. endif
  79. CONFIGURE_VARS += \
  80. ac_cv_header_regex_h=no \
  81. define Package/nano/install
  82. $(INSTALL_DIR) $(1)/usr/bin
  83. $(CP) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/
  84. endef
  85. define Package/nano-plus/install
  86. $(call Package/nano/install,$1)
  87. endef
  88. $(eval $(call BuildPackage,nano))
  89. $(eval $(call BuildPackage,nano-plus))