Fresh pull from upstream (stable) package feed
[librecmc/package-feed.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_RELEASE=2
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 define Package/canutils/Default
28   SECTION:=utils
29   CATEGORY:=Utilities
30   URL:=https://github.com/linux-can/can-utils
31   TITLE:=CAN userspace utilities and tools
32 endef
33
34 define Package/canutils
35   $(call Package/canutils/Default)
36   MENU:=1
37 endef
38
39 define GenPlugin
40   define Package/$(addprefix canutils-,$(1))
41     $(call Package/canutils/Default)
42     DEPENDS:=canutils
43     TITLE:=Utility $(1) from the CAN utilities
44   endef
45
46    define Package/$(addprefix canutils-,$(1))/description
47      Utility $(1) from the CAN utilities package.
48    endef
49 endef
50
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
57
58
59 $(foreach a,$(FILES),$(eval $(call GenPlugin,$(a))))
60
61 define Package/canutils/install
62         true
63 endef
64
65 define PartInstall
66 define Package/canutils-$(1)/install
67         $(INSTALL_DIR) $$(1)/usr/bin
68         $(INSTALL_BIN) \
69                 $(PKG_BUILD_DIR)/$(1) \
70                 $$(1)/usr/bin/
71 endef
72 endef
73
74 $(foreach file,$(FILES),$(eval $(call PartInstall,$(file))))
75
76 $(eval $(call BuildPackage,canutils))
77 $(foreach file,$(FILES),$(eval $(call BuildPackage,canutils-$(file))))