bluez-tools: Add package bluezetools
[feed/packages.git] / utils / open-plc-utils / Makefile
1 #
2 # Copyright (C) 2013-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:=open-plc-utils
11 PKG_RELEASE:=4
12
13 PKG_SOURCE_PROTO:=git
14 PKG_SOURCE_URL:=https://github.com/qca/open-plc-utils.git
15 PKG_SOURCE_VERSION:=bb50f635ef6cec8b52898051e0d18f4ac3fdd331
16 PKG_MIRROR_HASH:=1fc202ee33fd768d631e5834ac62461e7b544251914d797d868b0de7f33b785b
17
18 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
19
20 PKG_LICENSE:=ISC
21 PKG_LICENSE_FILES:=LICENSE
22
23 PKG_BUILD_PARALLEL:=1
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/open-plc-utils/Default
28 SECTION:=utils
29 CATEGORY:=Utilities
30 TITLE:=Qualcomm Atheros Power Line Communication utilities
31 URL:=https://github.com/qca/open-plc-utils/blob/master/README
32 endef
33
34 define Package/open-plc-utils
35 $(call Package/open-plc-utils/Default)
36 MENU:=1
37 endef
38
39 define GenPlugin
40 define Package/$(addprefix open-plc-utils-,$(1))
41 $(call Package/open-plc-utils/Default)
42 DEPENDS:=open-plc-utils
43 TITLE:=Utility $(1) from the Open PLC utilities
44 endef
45
46 define Package/$(addprefix open-plc-utils-,$(1))/description
47 Utility $(1) from the Open PLC utilities package.
48 endef
49 endef
50
51 OPEN_PLC_UTILS_APPS:=efbu efeu efru efsu edru edsu nics \
52 hpavkey hpavkeys rkey mac2pw mac2pwd \
53 mdioblock mdioblock2 mdiodump mdiogen \
54 hpav mme \
55 chknvm chknvm2 nvmsplit nvmmerge \
56 chkpib chkpib2 setpib getpib modpib pib2xml \
57 pibcomp pibdump pibruin xml2pib psin psout pskey \
58 psgraph psnotch pibrump \
59 int6k int6kboot int6keth int6kf int6khost \
60 int64host int6kid int6klist int6klog int6kmdio \
61 int6kmdio2 int6kmod int6kstat int6ktest int6krate \
62 int6krule int6ktone int6kwait CMEncrypt sada \
63 coqos_add coqos_info coqos_man coqos_mod coqos_rel \
64 mdustats ampboot amphost ampID amplist amprate amprule \
65 ampstat amptest amptool amptone ampwait \
66 plcboot plchost plcID plclist plcrate plcrule \
67 plcstat plctest plctool plctone \
68 plcwait plchostd plcget plcset plcotst plcfwd \
69 plcdevs plclog plcmdio16 plcmdio32 \
70 config2cfg sdram \
71 int6kuart int6kbaud ttysig ptsctl weeder ttysend \
72 ttyrecv ttycat int6kdetect \
73 pev evse
74
75 $(foreach a,$(OPEN_PLC_UTILS_APPS),$(eval $(call GenPlugin,$(a))))
76
77 define Build/Compile
78 $(MAKE) -C $(PKG_BUILD_DIR) \
79 EXTRA_CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
80 LDFLAGS="$(TARGET_CFLAGS) $(TARGET_LDFLAGS)" \
81 CROSS="$(TARGET_CROSS)" \
82 ROOTFS="$(PKG_INSTALL_DIR)" \
83 OWNER="$(shell id -u $(shell whoami))" \
84 GROUP="$(shell id -g $(shell whoami))" \
85 all install
86 endef
87
88 define Package/open-plc-utils/install
89 true
90 endef
91
92 define BuildPlugin
93 define Package/$(1)/install
94 $(INSTALL_DIR) $$(1)/usr/bin
95 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/bin/$(subst open-plc-utils-,,$(1)) \
96 $$(1)/usr/bin/
97 endef
98
99 $$(eval $$(call BuildPackage,$(1)))
100 endef
101
102 $(eval $(call BuildPackage,open-plc-utils))
103 $(foreach a,$(OPEN_PLC_UTILS_APPS),$(eval $(call BuildPlugin,open-plc-utils-$(a))))