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.

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