bluez-tools: Add package bluezetools
[feed/packages.git] / utils / canutils / Makefile
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_VERSION:=2021.06.0
12 PKG_RELEASE:=$(AUTORELEASE)
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://codeload.github.com/linux-can/can-utils/tar.gz/v$(PKG_VERSION)?
16 PKG_HASH:=f7874457224c89f8b2eb55ab741935ddb7f1c9bc52de2642330b0799f89d1040
17 PKG_BUILD_DIR:=$(BUILD_DIR)/can-utils-$(PKG_VERSION)
18
19 PKG_MAINTAINER:=Anton Glukhov <anton.a.glukhov@gmail.com>
20 PKG_LICENSE:=GPL-2.0-or-later
21 PKG_LICENSE_FILES:=COPYING
22
23 include $(INCLUDE_DIR)/package.mk
24 include $(INCLUDE_DIR)/cmake.mk
25
26 define Package/canutils/Default
27 SECTION:=utils
28 CATEGORY:=Utilities
29 URL:=https://github.com/linux-can/can-utils
30 TITLE:=CAN userspace utilities and tools
31 endef
32
33 define Package/canutils
34 $(call Package/canutils/Default)
35 MENU:=1
36 endef
37
38 define GenPlugin
39 define Package/$(addprefix canutils-,$(1))
40 $(call Package/canutils/Default)
41 TITLE:=Utility $(1) from the CAN utilities
42 DEPENDS:=canutils
43 endef
44
45 define Package/$(addprefix canutils-,$(1))/description
46 Utility $(1) from the CAN utilities package.
47 endef
48 endef
49
50 FILES:= \
51 asc2log bcmserver canbusload can-calc-bit-timing \
52 candump canfdtest cangen cangw canlogserver canplayer \
53 cansend cansniffer isotpdump isotpperf isotprecv isotpsend \
54 isotpserver isotpsniffer isotptun j1939acd j1939cat j1939spy j1939sr \
55 log2asc log2long slcan_attach slcand slcanpty testj1939
56
57 $(foreach a,$(FILES),$(eval $(call GenPlugin,$(a))))
58
59 define PartInstall
60 define Package/canutils-$(1)/install
61 $(INSTALL_DIR) $$(1)/usr/bin
62 $(INSTALL_BIN) \
63 $(PKG_INSTALL_DIR)/usr/bin/$(1) \
64 $$(1)/usr/bin/
65 endef
66 endef
67
68 $(foreach file,$(FILES),$(eval $(call PartInstall,$(file))))
69
70 define Package/canutils/install
71 true
72 endef
73
74 $(eval $(call BuildPackage,canutils))
75 $(foreach file,$(FILES),$(eval $(call BuildPackage,canutils-$(file))))