Browse Source

cshark: add new package

Signed-off-by: Luka Perkov <luka@openwrt.org>
Luka Perkov 10 years ago
parent
commit
63782c633d
1 changed files with 75 additions and 0 deletions
  1. 75
    0
      net/cshark/Makefile

+ 75
- 0
net/cshark/Makefile View File

@@ -0,0 +1,75 @@
1
+#
2
+# Copyright (C) 2014 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=cshark
11
+PKG_VERSION:=2014-06-23
12
+PKG_RELEASE=$(PKG_SOURCE_VERSION)
13
+
14
+PKG_SOURCE_PROTO:=git
15
+PKG_SOURCE_URL:=https://github.com/cloudshark/cshark.git
16
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
17
+PKG_SOURCE_VERSION:=5cb5f8888b4ec245bdf07c49f81576d1f33107ea
18
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
19
+
20
+PKG_BUILD_PARALLEL:=1
21
+PKG_INSTALL:=1
22
+
23
+include $(INCLUDE_DIR)/package.mk
24
+include $(INCLUDE_DIR)/cmake.mk
25
+
26
+define Package/cshark
27
+  SECTION:=net
28
+  CATEGORY:=Network
29
+  TITLE:=CloudShark capture tool
30
+  URL:=http://www.cloudshark.org/
31
+  DEPENDS:=+libjson-c +libpcap +libuci +libubox +libuclient +libustream-polarssl
32
+  MAINTAINER:=Luka Perkov <luka@openwrt.org>
33
+endef
34
+
35
+define Package/luci-app-cshark
36
+  SECTION:=luci
37
+  CATEGORY:=LuCI
38
+  SUBMENU:=3. Applications
39
+  TITLE:=Cloudshark capture tool Web UI
40
+  DEPENDS:=+cshark +luci
41
+  MAINTAINER:=Luka Perkov <luka@openwrt.org>
42
+endef
43
+
44
+CMAKE_OPTIONS = \
45
+	-DCMAKE_INSTALL_PREFIX=/usr \
46
+	-DWITH_DEBUG=OFF \
47
+
48
+define Package/cshark/conffiles
49
+/etc/config/cshark
50
+endef
51
+
52
+define Package/cshark/install
53
+	$(INSTALL_DIR) $(1)/sbin
54
+	$(INSTALL_BIN) \
55
+		$(PKG_INSTALL_DIR)/usr/bin/cshark \
56
+		$(1)/sbin/
57
+
58
+	$(INSTALL_DIR) $(1)/etc/config
59
+	$(INSTALL_CONF) \
60
+		$(PKG_BUILD_DIR)/config/cshark \
61
+		$(1)/etc/config/
62
+
63
+	$(INSTALL_DIR) $(1)/etc/ssl/certs
64
+	$(INSTALL_CONF) \
65
+		$(PKG_BUILD_DIR)/config/ca-the_usertrust_network.pem \
66
+		$(1)/etc/ssl/certs/
67
+endef
68
+
69
+define Package/luci-app-cshark/install
70
+	$(INSTALL_DIR) $(1)/usr/lib/lua/luci
71
+	$(CP) -R $(PKG_BUILD_DIR)/openwrt/luci/luasrc/* $(1)/usr/lib/lua/luci/
72
+endef
73
+
74
+$(eval $(call BuildPackage,cshark))
75
+$(eval $(call BuildPackage,luci-app-cshark))