2 # Copyright (C) 2013 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
11 PKG_VERSION:=2014-02-27
12 PKG_RELEASE=$(PKG_SOURCE_VERSION)
15 PKG_SOURCE_URL:=git://gitorious.org/linux-can/can-utils.git
16 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
17 PKG_SOURCE_VERSION:=67a2bdcd336e6becfa5784742e18c88dbeddc973
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
20 include $(INCLUDE_DIR)/package.mk
22 FILES:= canbusload can-calc-bit-timing candump \
23 cangen cangw canplayer cansniffer cansend
26 define Package/canutils-log-conversion
27 TITLE:=canutils log conversion
34 define Package/canutils-$(1)
35 TITLE:=$(1) package from canutils
42 define Package/canutils
45 URL=https://gitorious.org/linux-can
46 TITLE:=CAN userspace utilities and tools
50 define Build/Configure
51 ( cd "$(PKG_BUILD_DIR)"; ./autogen.sh )
52 $(call Build/Configure/Default)
55 $(foreach file,$(FILES),$(eval $(call PartGen,$(file))))
57 define Package/canutils/install
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/
69 define Package/canutils-$(1)/install
70 $(INSTALL_DIR) $$(1)/usr/bin
72 $(PKG_BUILD_DIR)/$(1) \
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.
83 define Package/canutils-canbusload/description
84 canbusload - display the load percentage of can buses.
87 define Package/canutils-can-calc-bit-timing/description
88 can-calc-bit-timing - calculate hw bittiming for supported can chips.
91 define Package/canutils-candump/description
92 candump - dumps can frames to terminal, logfile or another can device,
93 with optional filtering.
96 define Package/canutils-cangen/description
97 cangen - CAN frames generator for testing purposes.
100 define Package/canutils-cangw/description
101 cangw - manage PF_CAN netlink gateway.
104 define Package/canutils-canplayer/description
105 canplayer - replay a compact CAN frame logfile to CAN devices.
108 define Package/canutils-cansend/description
109 cansend - simple command line tool to send CAN-frames via CAN_RAW sockets.
112 $(foreach file,$(FILES),$(eval $(call PartInstall,$(file))))
114 $(eval $(call BuildPackage,canutils))
115 $(eval $(call BuildPackage,canutils-log-conversion))
116 $(foreach file,$(FILES),$(eval $(call BuildPackage,canutils-$(file))))