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.

90 lines
2.6 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.1.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=http://libcode.org/attachments/download/61/
  13. PKG_LICENSE:=BSD-3-Clause
  14. PKG_LICENSE_FILES:=LICENCE
  15. PKG_MAINTAINER:=Takashi Umeno <umeno.takashi@gmail.com>
  16. PKG_MD5SUM:=4913259794d85585de0f8791c54ac633
  17. PKG_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/klish/default
  20. SECTION:=utils
  21. CATEGORY:=Utilities
  22. TITLE:=Kommand Line Interface SHell ($(1))
  23. URL:=http://libcode.org/projects/klish/
  24. endef
  25. define Package/klish
  26. $(call Package/klish/default,main tool)
  27. DEPENDS:=+libstdcpp +libxml2
  28. endef
  29. define Package/klish/description
  30. The klish is a framework for implementing a CISCO-like CLI on a UNIX
  31. systems. It is configurable by XML files. The KLISH stands for Kommand
  32. Line Interface Shell.
  33. The klish is a fork of clish 0.7.3 developed by Graeme McKerrell.
  34. It defines new features but it's compatible (as much as possible) with
  35. clish's XML configuration files.
  36. klish is able to run using clish XML configuration files although
  37. current clish users may expect some changes in behavior.
  38. Konf and konfd are klish utilities that are used to store configuration
  39. informations in a way which is similar to what's found on CISCO devices.
  40. More information about these tools is to be found on the klish web site.
  41. endef
  42. define Build/Configure
  43. $(call Build/Configure/Default, \
  44. --with-libxml2 \
  45. )
  46. endef
  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:=http://code.google.com/p/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))