- CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld \
- CFLAGS="$(TARGET_CFLAGS) -Wall -I$(PKG_BUILD_DIR)/include/linux/include -I$(PKG_BUILD_DIR)/include -DARPTABLES_VERSION=\\\"$(PKG_VERSION)\\\" "
- touch $@
-
-$(IPKG_ARPTABLES):
- mkdir -p $(IDIR_ARPTABLES)/usr/sbin
- cp $(PKG_BUILD_DIR)/arptables $(IDIR_ARPTABLES)/usr/sbin/
- $(IPKG_BUILD) $(IDIR_ARPTABLES) $(PACKAGE_DIR)
+ $(TARGET_CONFIGURE_OPTS) \
+ COPT_FLAGS="$(TARGET_CFLAGS)" \
+ KERNEL_DIR="./include/linux"
+endef
+
+define Package/arptables/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,arptables))