summaryrefslogtreecommitdiff
path: root/net/cshark/Makefile
blob: 15cc1203ee6607fe657c7b2e9a63c5d12f3707dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#
# Copyright (C) 2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=cshark
PKG_VERSION:=2014-07-02
PKG_RELEASE=$(PKG_SOURCE_VERSION)

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/cloudshark/cshark.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=ec638311b0b8ef74baf0be06dcf03a641e3308a2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz

PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk

define Package/cshark
  SECTION:=net
  CATEGORY:=Network
  TITLE:=CloudShark capture tool
  URL:=http://www.cloudshark.org/
  DEPENDS:=+libjson-c +libpcap +libuci +libubox +libuclient +libustream-polarssl
  MAINTAINER:=Luka Perkov <luka@openwrt.org>
endef

define Package/luci-app-cshark
  SECTION:=luci
  CATEGORY:=LuCI
  SUBMENU:=3. Applications
  TITLE:=Cloudshark capture tool Web UI
  DEPENDS:=+cshark +luci
  MAINTAINER:=Luka Perkov <luka@openwrt.org>
endef

CMAKE_OPTIONS = \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DWITH_DEBUG=OFF \

define Package/cshark/conffiles
/etc/config/cshark
endef

define Package/cshark/install
	$(INSTALL_DIR) $(1)/sbin
	$(INSTALL_BIN) \
		$(PKG_INSTALL_DIR)/usr/bin/cshark \
		$(1)/sbin/

	$(INSTALL_DIR) $(1)/etc/config
	$(INSTALL_CONF) \
		$(PKG_BUILD_DIR)/config/cshark \
		$(1)/etc/config/

	$(INSTALL_DIR) $(1)/etc/ssl/certs
	$(INSTALL_CONF) \
		$(PKG_BUILD_DIR)/config/ca-the_usertrust_network.pem \
		$(1)/etc/ssl/certs/
endef

define Package/luci-app-cshark/install
	$(INSTALL_DIR) $(1)/usr/lib/lua/luci
	$(CP) -R $(PKG_BUILD_DIR)/openwrt/luci/luasrc/* $(1)/usr/lib/lua/luci/
endef

$(eval $(call BuildPackage,cshark))
$(eval $(call BuildPackage,luci-app-cshark))