2 # Copyright (C) 2013-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
10 PKG_NAME
:=open-plc-utils
11 PKG_VERSION
:=2015-09-21
12 PKG_RELEASE
:=$(PKG_SOURCE_VERSION
)
15 PKG_SOURCE_URL
:=https
://github.com
/qca
/open-plc-utils.git
16 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
17 PKG_SOURCE_VERSION
:=885a1b7e2e663b5ab8797db6d40a0318131fdf18
18 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
)-$(PKG_SOURCE_VERSION
).
tar.gz
20 PKG_MAINTAINER
:=Florian Fainelli
<florian@openwrt.org
>
23 PKG_LICENSE_FILES
:=LICENSE
27 include $(INCLUDE_DIR
)/package.mk
29 define Package
/open-plc-utils
/Default
32 TITLE
:=Qualcomm Atheros Power Line Communication utilities
33 URL
:=https
://github.com
/qca
/open-plc-utils
/blob
/master
/README
36 define Package
/open-plc-utils
37 $(call Package
/open-plc-utils
/Default
)
42 define Package
/$(addprefix open-plc-utils-
,$(1))
43 $(call Package
/open-plc-utils
/Default
)
44 DEPENDS
:=open-plc-utils
45 TITLE
:=Utility
$(2) from the Open PLC utilities
48 define Package
/$(addprefix open-plc-utils-
,$(1))/description
49 Utility
$(2) from the Open PLC utilities package.
53 OPEN_PLC_UTILS_APPS
:=efbu efeu efru efsu edru edsu nics \
54 hpavkey hpavkeys rkey mac2pw mac2pwd \
55 mdioblock mdioblock2 mdiodump mdiogen \
57 chknvm chknvm2 nvmsplit nvmmerge \
58 chkpib chkpib2 setpib getpib modpib pib2xml \
59 pibcomp pibdump pibruin xml2pib psin psout pskey \
60 psgraph psnotch pibrump \
61 int6k int6kboot int6keth int6kf int6khost \
62 int64host int6kid int6klist int6klog int6kmdio \
63 int6kmdio2 int6kmod int6kstat int6ktest int6krate \
64 int6krule int6ktone int6kwait CMEncrypt sada \
65 coqos_add coqos_info coqos_man coqos_mod coqos_rel \
66 mdustats ampboot amphost ampID amplist amprate \
67 ampstat amptest amptool amptone ampwait \
68 plcboot plchost plcID plclist plcrate plcrule \
69 plcstat plctest plctool plctone \
70 plcwait plchostd plcget plcset plcotst plcfwd \
71 plcdevs plclog plcmdio16 plcmdio32 \
73 int6kuart int6kbaud ttysig ptsctl weeder ttysend \
74 ttyrecv ttycat int6kdetect
76 $(foreach a
,$(OPEN_PLC_UTILS_APPS
),$(eval
$(call GenPlugin
,$(a
))))
79 TARGET_CFLAGS
+= -D__UCLIBC__
83 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
84 EXTRA_CFLAGS
="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
85 LDFLAGS
="$(TARGET_CFLAGS) $(TARGET_LDFLAGS)" \
86 CROSS
="$(TARGET_CROSS)" \
87 ROOTFS
="$(PKG_INSTALL_DIR)" \
88 OWNER
="$(shell id -u $(shell whoami))" \
89 GROUP
="$(shell id -g $(shell whoami))" \
93 define Package
/open-plc-utils
/install
98 define Package
/$(1)/install
99 $(INSTALL_DIR
) $$(1)/usr
/bin
100 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/local
/bin
/$(subst open-plc-utils-
,,$(1)) \
104 $$(eval
$$(call BuildPackage
,$(1)))
107 $(eval
$(call BuildPackage
,open-plc-utils
))
108 $(foreach a
,$(OPEN_PLC_UTILS_APPS
),$(eval
$(call BuildPlugin
,open-plc-utils-
$(a
))))