+ hostapd hostapd_cli
+ $(CP) $(PKG_BUILD_DIR)_$(1)/hostapd_cli $(PKG_BUILD_DIR)/
+endef
+
+define Package/InstallTemplate
+ if [ \! -f "$(PKG_BUILD_DIR)_$(2)/hostapd" ]; then \
+ rm -f $(PKG_BUILD_DIR)/.built; \
+ $(MAKE) $(PKG_BUILD_DIR)/.built; \
+ fi
+ $(INSTALL_DIR) $$(1)/etc
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)_$(2)/madwifi.conf $$(1)/etc/hostapd.conf
+ $(INSTALL_DIR) $$(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)_$(2)/hostapd $$(1)/usr/sbin/
+endef
+
+define Package/Template
+ ifneq ($(CONFIG_PACKAGE_$(1)),)
+ define Build/Configure/$(2)
+ $(call Build/ConfigureTarget,$(2))
+ endef
+ define Build/Compile/$(2)
+ $(call Build/CompileTarget,$(2))
+ endef
+ define Package/$(1)/install
+ $(call Package/InstallTemplate,$(1),$(2))
+ endef
+ endif
+endef
+
+define Build/Configure
+ $(call Build/Configure/default)
+ $(call Build/Configure/mini)
+endef
+
+define Build/Compile
+ $(call Build/Compile/default)
+ $(call Build/Compile/mini)
+endef