summaryrefslogtreecommitdiffstats
path: root/net/faifa/Makefile
blob: b36e98b49be5131b37b139f9eb30756f8d4ecf4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#
# Copyright (C) 2006-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=faifa
PKG_VERSION:=2012-09-13
PKG_RELEASE:=$(PKG_SOURCE_VERSION)

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git://github.com/ffainelli/faifa.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=2842afc90bd9ca08ed2a6c83c04f4015982e6007
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz

PKG_INSTALL:=1

include $(INCLUDE_DIR)/package.mk

define Package/faifa/Default
  TITLE:=configure HomePlug 1.0/AV PLC devices
  URL:=http://open-plc.org/
endef

define Package/libfaifa
  $(call Package/faifa/Default)
  TITLE+= (library)
  SECTION:=libs
  CATEGORY:=Libraries
  DEPENDS:=+libpcap +libpthread
endef

define Package/libfaifa/description
  Faifa companion library.
endef

define Package/faifa
  $(call Package/faifa/Default)
  SECTION:=net
  CATEGORY:=Network
  DEPENDS:=+libpthread +libpcap +libfaifa
  TITLE+= (command line)
endef

define Package/faifa/description
  Faifa can configure any Intellon-based Power Line Communication device using
  Intellon INT5000 and INT6000 series chips (6000 and 6300 chips). It supports all
  Intellon-specific management and control frames as well as standard management
  frames.
endef

define Package/hpavcfg
  $(call Package/faifa/Default)
  SECTION:=net
  CATEGORY:=Network
  TITLE:=HomePlug AV lightweight configurator
endef

define Package/hpavcfg/description
   Lightweight configuration tool, only capable of setting a local device key (NMK)
endef

TARGET_CFLAGS += $(FPIC)

MAKE_FLAGS += \
	OS=LINUX \
	CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
	LDFLAGS="$(TARGET_LDFLAGS)"

define Build/Configure
	(cd $(PKG_BUILD_DIR); ./autogen.sh)
	$(call Build/Configure/Default)
endef

define Package/faifa/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/faifa $(1)/usr/bin/
endef

define Package/libfaifa/install
	$(INSTALL_DIR) $(1)/usr/lib
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfaifa.so* $(1)/usr/lib
endef

define Package/hpavcfg/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(CP) $(PKG_INSTALL_DIR)/usr/bin/hpav_cfg $(1)/usr/bin
endef

$(eval $(call BuildPackage,faifa))
$(eval $(call BuildPackage,libfaifa))
$(eval $(call BuildPackage,hpavcfg))