|
@@ -0,0 +1,116 @@
|
|
1
|
+#
|
|
2
|
+# Copyright (C) 2015 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:=canutils
|
|
11
|
+PKG_RELEASE=1
|
|
12
|
+
|
|
13
|
+PKG_SOURCE_PROTO:=git
|
|
14
|
+PKG_SOURCE_URL:=https://github.com/linux-can/can-utils
|
|
15
|
+PKG_SOURCE_VERSION:=0e3ff3b3157e456d4b6343f5d4b42ef692bce538
|
|
16
|
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2
|
|
17
|
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
|
|
18
|
+
|
|
19
|
+PKG_MAINTAINER:=Anton Glukhov <anton.a.glukhov@gmail.com>
|
|
20
|
+PKG_LICENSE:=GPL-2.0+
|
|
21
|
+
|
|
22
|
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
|
|
23
|
+PKG_FIXUP:=autoreconf
|
|
24
|
+
|
|
25
|
+include $(INCLUDE_DIR)/package.mk
|
|
26
|
+
|
|
27
|
+FILES:=canbusload can-calc-bit-timing candump \
|
|
28
|
+ cangen cangw canplayer cansniffer cansend
|
|
29
|
+
|
|
30
|
+define Package/canutils/Default
|
|
31
|
+ SECTION:=utils
|
|
32
|
+ CATEGORY:=Utilities
|
|
33
|
+ URL:=https://github.com/linux-can/can-utils
|
|
34
|
+ TITLE:=CAN userspace utilities and tools
|
|
35
|
+endef
|
|
36
|
+
|
|
37
|
+define Package/canutils
|
|
38
|
+ $(call Package/canutils/Default)
|
|
39
|
+ MENU:=1
|
|
40
|
+endef
|
|
41
|
+
|
|
42
|
+define Package/canutils-log-conversion
|
|
43
|
+ $(call Package/canutils/Default)
|
|
44
|
+ TITLE:=canutils log conversion
|
|
45
|
+ DEPENDS:=canutils
|
|
46
|
+endef
|
|
47
|
+
|
|
48
|
+define PartGen
|
|
49
|
+define Package/canutils-$(1)
|
|
50
|
+ $(call Package/canutils/Default)
|
|
51
|
+ TITLE:=$(1) tool from canutils
|
|
52
|
+ DEPENDS:=canutils
|
|
53
|
+endef
|
|
54
|
+endef
|
|
55
|
+
|
|
56
|
+$(foreach file,$(FILES),$(eval $(call PartGen,$(file))))
|
|
57
|
+
|
|
58
|
+define Package/canutils/install
|
|
59
|
+endef
|
|
60
|
+
|
|
61
|
+define Package/canutils-log-conversion/install
|
|
62
|
+ $(INSTALL_DIR) $(1)/usr/bin
|
|
63
|
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/asc2log $(1)/usr/bin/
|
|
64
|
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/log2asc $(1)/usr/bin/
|
|
65
|
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/log2long $(1)/usr/bin/
|
|
66
|
+endef
|
|
67
|
+
|
|
68
|
+define PartInstall
|
|
69
|
+define Package/canutils-$(1)/install
|
|
70
|
+ $(INSTALL_DIR) $$(1)/usr/bin
|
|
71
|
+ $(INSTALL_BIN) \
|
|
72
|
+ $(PKG_BUILD_DIR)/$(1) \
|
|
73
|
+ $$(1)/usr/bin/
|
|
74
|
+endef
|
|
75
|
+endef
|
|
76
|
+
|
|
77
|
+define Package/canutils-log-conversion/description
|
|
78
|
+asc2log - convert ASC logfile to compact CAN frame logfile.
|
|
79
|
+log2asc - convert compact CAN frame logfile to ASC logfile.
|
|
80
|
+log2long - convert compact CAN frame representation into user readable.
|
|
81
|
+endef
|
|
82
|
+
|
|
83
|
+define Package/canutils-canbusload/description
|
|
84
|
+canbusload - display the load percentage of can buses.
|
|
85
|
+endef
|
|
86
|
+
|
|
87
|
+define Package/canutils-can-calc-bit-timing/description
|
|
88
|
+can-calc-bit-timing - calculate hw bittiming for supported can chips.
|
|
89
|
+endef
|
|
90
|
+
|
|
91
|
+define Package/canutils-candump/description
|
|
92
|
+candump - dumps can frames to terminal, logfile or another can device,
|
|
93
|
+with optional filtering.
|
|
94
|
+endef
|
|
95
|
+
|
|
96
|
+define Package/canutils-cangen/description
|
|
97
|
+cangen - CAN frames generator for testing purposes.
|
|
98
|
+endef
|
|
99
|
+
|
|
100
|
+define Package/canutils-cangw/description
|
|
101
|
+cangw - manage PF_CAN netlink gateway.
|
|
102
|
+endef
|
|
103
|
+
|
|
104
|
+define Package/canutils-canplayer/description
|
|
105
|
+canplayer - replay a compact CAN frame logfile to CAN devices.
|
|
106
|
+endef
|
|
107
|
+
|
|
108
|
+define Package/canutils-cansend/description
|
|
109
|
+cansend - simple command line tool to send CAN-frames via CAN_RAW sockets.
|
|
110
|
+endef
|
|
111
|
+
|
|
112
|
+$(foreach file,$(FILES),$(eval $(call PartInstall,$(file))))
|
|
113
|
+
|
|
114
|
+$(eval $(call BuildPackage,canutils))
|
|
115
|
+$(eval $(call BuildPackage,canutils-log-conversion))
|
|
116
|
+$(foreach file,$(FILES),$(eval $(call BuildPackage,canutils-$(file))))
|