noddos: Noddos v0.5.0 with mDNS / DNS-SD support
[feed/packages.git] / utils / klish / Makefile
1
2 #
3 # Copyright (C) 2016 OpenWrt.org
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=klish
12 PKG_VERSION:=2.1.3
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
16 PKG_SOURCE_URL:=http://libcode.org/attachments/download/66/
17 PKG_LICENSE:=BSD-3-Clause
18 PKG_LICENSE_FILES:=LICENCE
19 PKG_MAINTAINER:=Takashi Umeno <umeno.takashi@gmail.com>
20 PKG_MD5SUM:=7dfe46d474c02c86946c1d7a461ae549
21
22 PKG_INSTALL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/klish/default
27 SECTION:=utils
28 CATEGORY:=Utilities
29 SUBMENU:=Shells
30 TITLE:=Kommand Line Interface SHell ($(1))
31 URL:=http://libcode.org/projects/klish/
32 endef
33
34 define Package/klish
35 $(call Package/klish/default,main tool)
36 DEPENDS:=+libstdcpp +libxml2
37 endef
38
39 define Package/klish/description
40 The klish is a framework for implementing a CISCO-like CLI on a UNIX
41 systems. It is configurable by XML files. The KLISH stands for Kommand
42 Line Interface Shell.
43 The klish is a fork of clish 0.7.3 developed by Graeme McKerrell.
44 It defines new features but it's compatible (as much as possible) with
45 clish's XML configuration files.
46 klish is able to run using clish XML configuration files although
47 current clish users may expect some changes in behavior.
48 Konf and konfd are klish utilities that are used to store configuration
49 informations in a way which is similar to what's found on CISCO devices.
50 More information about these tools is to be found on the klish web site.
51 endef
52
53 TARGET_LDFLAGS += -lxml2 -lz
54 TARGET_CFLAGS += -D_XOPEN_SOURCE=500
55
56 define Build/Configure
57 $(call Build/Configure/Default, \
58 --with-libxml2 \
59 )
60 endef
61
62 define Package/klish/install
63 $(INSTALL_DIR) $(1)/usr/bin
64 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clish $(1)/usr/bin/
65 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/konf $(1)/usr/bin/
66 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/konfd $(1)/usr/bin/
67 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sigexec $(1)/usr/bin/
68 $(INSTALL_DIR) $(1)/usr/lib
69 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
70 endef
71
72 $(eval $(call BuildPackage,klish))
73
74 define Package/klish-xml-files
75 SECTION:=utils
76 CATEGORY:=Utilities
77 DEPENDS:=klish
78 TITLE:=klish sample XML files
79 URL:=http://code.google.com/p/klish/
80 endef
81
82 define Package/klish-xml-files/description
83 This is a set of sample XML files for klish.
84 endef
85
86 define Package/klish-xml-files/install
87 $(INSTALL_DIR) $(1)/etc/clish
88 $(CP) $(PKG_BUILD_DIR)/xml-examples/clish $(1)/etc/clish/
89 $(CP) $(PKG_BUILD_DIR)/xml-examples/klish $(1)/etc/clish/
90 $(CP) $(PKG_BUILD_DIR)/xml-examples/lua $(1)/etc/clish/
91 $(CP) $(PKG_BUILD_DIR)/xml-examples/test $(1)/etc/clish/
92 endef
93
94 $(eval $(call BuildPackage,klish-xml-files))