- touch $@
-
-$(IPKG_WPA_SUPPLICANT):
- install -m0755 -d $(IDIR_WPA_SUPPLICANT)/usr/sbin
- install -m0755 $(PKG_BUILD_DIR)/wpa_cli $(IDIR_WPA_SUPPLICANT)/usr/sbin/
- install -m0755 $(PKG_BUILD_DIR)/wpa_passphrase $(IDIR_WPA_SUPPLICANT)/usr/sbin/
- install -m0755 $(PKG_BUILD_DIR)/wpa_supplicant $(IDIR_WPA_SUPPLICANT)/usr/sbin/
- $(RSTRIP) $(IDIR_WPA_SUPPLICANT)
- $(IPKG_BUILD) $(IDIR_WPA_SUPPLICANT) $(PACKAGE_DIR)
+ $(STRIP) $(PKG_BUILD_DIR)/wpa_supplicant
+ $(STRIP) $(PKG_BUILD_DIR)/wpa_cli
+
+endef
+
+define Package/wpa-supplicant/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(CP) $(PKG_BUILD_DIR)/wpa_{supplicant,passphrase} $(1)/usr/sbin/
+endef
+
+define Package/wpa-cli/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(CP) $(PKG_BUILD_DIR)/wpa_cli $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,wpa-supplicant))
+$(eval $(call BuildPackage,wpa-cli))