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.

91 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:=3
  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. define Package/klish/default
  21. SECTION:=utils
  22. CATEGORY:=Utilities
  23. SUBMENU:=Shells
  24. TITLE:=Kommand Line Interface SHell ($(1))
  25. URL:=https://libcode.org/projects/klish/
  26. endef
  27. define Package/klish
  28. $(call Package/klish/default,main tool)
  29. DEPENDS:=+libxml2
  30. endef
  31. define Package/klish/description
  32. The klish is a framework for implementing a CISCO-like CLI on a UNIX
  33. systems. It is configurable by XML files. The KLISH stands for Kommand
  34. Line Interface Shell.
  35. The klish is a fork of clish 0.7.3 developed by Graeme McKerrell.
  36. It defines new features but it's compatible (as much as possible) with
  37. clish's XML configuration files.
  38. klish is able to run using clish XML configuration files although
  39. current clish users may expect some changes in behavior.
  40. Konf and konfd are klish utilities that are used to store configuration
  41. informations in a way which is similar to what's found on CISCO devices.
  42. More information about these tools is to be found on the klish web site.
  43. endef
  44. CONFIGURE_ARGS += --with-libxml2
  45. TARGET_CFLAGS += -D_GNU_SOURCE
  46. define Package/klish/install
  47. $(INSTALL_DIR) $(1)/usr/bin
  48. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clish $(1)/usr/bin/
  49. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/konf $(1)/usr/bin/
  50. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/konfd $(1)/usr/bin/
  51. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sigexec $(1)/usr/bin/
  52. $(INSTALL_DIR) $(1)/usr/lib
  53. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  54. endef
  55. $(eval $(call BuildPackage,klish))
  56. define Package/klish-xml-files
  57. SECTION:=utils
  58. CATEGORY:=Utilities
  59. DEPENDS:=klish
  60. TITLE:=klish sample XML files
  61. URL:=https://libcode.org/projects/klish/
  62. endef
  63. define Package/klish-xml-files/description
  64. This is a set of sample XML files for klish.
  65. endef
  66. define Package/klish-xml-files/install
  67. $(INSTALL_DIR) $(1)/etc/clish
  68. $(CP) $(PKG_BUILD_DIR)/xml-examples/clish $(1)/etc/clish/
  69. $(CP) $(PKG_BUILD_DIR)/xml-examples/klish $(1)/etc/clish/
  70. $(CP) $(PKG_BUILD_DIR)/xml-examples/lua $(1)/etc/clish/
  71. $(CP) $(PKG_BUILD_DIR)/xml-examples/test $(1)/etc/clish/
  72. endef
  73. $(eval $(call BuildPackage,klish-xml-files))