VARIANT:=plus
endef
+define Package/nano-full
+ $(call Package/nano/Default)
+ TITLE:=GNU nano text editor (all features, Unicode)
+ VARIANT:=full
+endef
+
define Package/nano/description
Nano is a small and simple text editor for use on the terminal.
$(call Package/nano/description)
endef
-ifeq ($(BUILD_VARIANT),plus)
-# plus variant with more features included
+define Package/nano-full/description
+ nano-full - all features, including syntax highlighting (also uci),
+ multibuffer, Unicode/UTF-8, nanorc, some key bindings.
+ (libmagic-based file type detection is disabled)
+
+ Example /etc/nanorc is included. nanorc documentation at
+ https://www.nano-editor.org/dist/latest/nanorc.5.html
+
+ $(call Package/nano/description)
+endef
+
+ifeq ($(BUILD_VARIANT),full)
+# full variant with almost all features included
+ CONFIGURE_ARGS += \
+ --disable-extra \
+ --disable-libmagic \
+ --enable-utf8
+else ifeq ($(BUILD_VARIANT),plus)
+# plus variant with some features included
CONFIGURE_ARGS += \
--enable-help \
--enable-justify \
CONFIGURE_VARS += \
ac_cv_header_regex_h=no \
+define Package/nano-plus/conffiles
+/etc/nanorc
+endef
+
+define Package/nano-full/conffiles
+/etc/nanorc
+endef
+
define Package/nano/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/
$(call Package/nano/install,$1)
endef
+define Package/nano-full/install
+ $(call Package/nano/install,$1)
+ $(INSTALL_DIR) $(1)/etc $(1)/usr/share/nano
+ $(INSTALL_CONF) ./files/nanorc $(1)/etc/nanorc
+ $(INSTALL_DATA) ./files/uci.nanorc $(1)/usr/share/nano
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/nano/* $(1)/usr/share/nano
+endef
+
$(eval $(call BuildPackage,nano))
$(eval $(call BuildPackage,nano-plus))
+$(eval $(call BuildPackage,nano-full))