Makefile (1842B)
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_DATE:=2017-02-16 16 PKG_SOURCE_VERSION:=cb33a55720716cbe01e6025a2bda74a1b7e492d3 17 PKG_MIRROR_HASH:=cb6a615bc7d62923d5bc0130891e824e9964de8a31920004b74872a07d8743ef 18 19 PKG_MAINTAINER:=Anton Glukhov <anton.a.glukhov@gmail.com> 20 PKG_LICENSE:=GPL-2.0+ 21 22 PKG_FIXUP:=autoreconf 23 24 include $(INCLUDE_DIR)/package.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 DEPENDS:=canutils 42 TITLE:=Utility $(1) from the CAN utilities 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:=canbusload can-calc-bit-timing candump \ 51 cangen cangw canplayer cansniffer cansend \ 52 canfdtest asc2log log2asc log2long bcmserver \ 53 canlogserver isotpdump isotpperf isotprecv \ 54 isotpsend isotpserver isotpsniffer isotptun \ 55 slcan_attach slcand slcanpty 56 57 58 $(foreach a,$(FILES),$(eval $(call GenPlugin,$(a)))) 59 60 define Package/canutils/install 61 true 62 endef 63 64 define PartInstall 65 define Package/canutils-$(1)/install 66 $(INSTALL_DIR) $$(1)/usr/bin 67 $(INSTALL_BIN) \ 68 $(PKG_BUILD_DIR)/$(1) \ 69 $$(1)/usr/bin/ 70 endef 71 endef 72 73 $(foreach file,$(FILES),$(eval $(call PartInstall,$(file)))) 74 75 $(eval $(call BuildPackage,canutils)) 76 $(foreach file,$(FILES),$(eval $(call BuildPackage,canutils-$(file))))