2 # Copyright (C) 2015 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
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)
19 PKG_MAINTAINER:=Anton Glukhov <anton.a.glukhov@gmail.com>
22 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
25 include $(INCLUDE_DIR)/package.mk
27 define Package/canutils/Default
30 URL:=https://github.com/linux-can/can-utils
31 TITLE:=CAN userspace utilities and tools
34 define Package/canutils
35 $(call Package/canutils/Default)
40 define Package/$(addprefix canutils-,$(1))
41 $(call Package/canutils/Default)
43 TITLE:=Utility $(1) from the CAN utilities
46 define Package/$(addprefix canutils-,$(1))/description
47 Utility $(1) from the CAN utilities package.
51 FILES:=canbusload can-calc-bit-timing candump \
52 cangen cangw canplayer cansniffer cansend \
53 canfdtest asc2log log2asc log2long bcmserver \
54 canlogserver isotpdump isotpperf isotprecv \
55 isotpsend isotpserver isotpsniffer isotptun \
56 slcan_attach slcand slcanpty
59 $(foreach a,$(FILES),$(eval $(call GenPlugin,$(a))))
61 define Package/canutils/install
66 define Package/canutils-$(1)/install
67 $(INSTALL_DIR) $$(1)/usr/bin
69 $(PKG_BUILD_DIR)/$(1) \
74 $(foreach file,$(FILES),$(eval $(call PartInstall,$(file))))
76 $(eval $(call BuildPackage,canutils))
77 $(foreach file,$(FILES),$(eval $(call BuildPackage,canutils-$(file))))