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.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.4
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=http://libcode.org/attachments/download/70/
  13. PKG_LICENSE:=BSD-3-Clause
  14. PKG_LICENSE_FILES:=LICENCE
  15. PKG_MAINTAINER:=Takashi Umeno <umeno.takashi@gmail.com>
  16. PKG_HASH:=a89dd1027dce713407b6d68e836c8fdead56406dcfc650da84da8e0b92c9b2e5
  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. CONFIGURE_ARGS += --with-libxml2
  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:=http://code.google.com/p/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))