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.

92 lines
2.7 KiB

  1. #
  2. # Copyright (C) 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:=klish
  9. PKG_VERSION:=2.2.0
  10. PKG_RELEASE:=4
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=http://libcode.org/attachments/download/77/
  13. PKG_HASH:=a069ef06bb485e15b2ff27b856e46cd76fee1eac7e0f62a8d8ac0ad413694614
  14. PKG_MAINTAINER:=Takashi Umeno <umeno.takashi@gmail.com>
  15. PKG_LICENSE:=BSD-3-Clause
  16. PKG_LICENSE_FILES:=LICENCE
  17. PKG_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/nls.mk
  21. define Package/klish/default
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. SUBMENU:=Shells
  25. TITLE:=Kommand Line Interface SHell ($(1))
  26. URL:=https://libcode.org/projects/klish/
  27. endef
  28. define Package/klish
  29. $(call Package/klish/default,main tool)
  30. DEPENDS:=+libxml2
  31. endef
  32. define Package/klish/description
  33. The klish is a framework for implementing a CISCO-like CLI on a UNIX
  34. systems. It is configurable by XML files. The KLISH stands for Kommand
  35. Line Interface Shell.
  36. The klish is a fork of clish 0.7.3 developed by Graeme McKerrell.
  37. It defines new features but it's compatible (as much as possible) with
  38. clish's XML configuration files.
  39. klish is able to run using clish XML configuration files although
  40. current clish users may expect some changes in behavior.
  41. Konf and konfd are klish utilities that are used to store configuration
  42. informations in a way which is similar to what's found on CISCO devices.
  43. More information about these tools is to be found on the klish web site.
  44. endef
  45. CONFIGURE_ARGS += --with-libxml2
  46. TARGET_CFLAGS += -D_GNU_SOURCE
  47. define Package/klish/install
  48. $(INSTALL_DIR) $(1)/usr/bin
  49. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clish $(1)/usr/bin/
  50. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/konf $(1)/usr/bin/
  51. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/konfd $(1)/usr/bin/
  52. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sigexec $(1)/usr/bin/
  53. $(INSTALL_DIR) $(1)/usr/lib
  54. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  55. endef
  56. $(eval $(call BuildPackage,klish))
  57. define Package/klish-xml-files
  58. SECTION:=utils
  59. CATEGORY:=Utilities
  60. DEPENDS:=klish
  61. TITLE:=klish sample XML files
  62. URL:=https://libcode.org/projects/klish/
  63. endef
  64. define Package/klish-xml-files/description
  65. This is a set of sample XML files for klish.
  66. endef
  67. define Package/klish-xml-files/install
  68. $(INSTALL_DIR) $(1)/etc/clish
  69. $(CP) $(PKG_BUILD_DIR)/xml-examples/clish $(1)/etc/clish/
  70. $(CP) $(PKG_BUILD_DIR)/xml-examples/klish $(1)/etc/clish/
  71. $(CP) $(PKG_BUILD_DIR)/xml-examples/lua $(1)/etc/clish/
  72. $(CP) $(PKG_BUILD_DIR)/xml-examples/test $(1)/etc/clish/
  73. endef
  74. $(eval $(call BuildPackage,klish-xml-files))