-$(IPKG_MTD):
- install -d -m0755 $(IDIR_MTD)/sbin
- install -m0755 $(PKG_BUILD_DIR)/mtd $(IDIR_MTD)/sbin
- $(RSTRIP) $(IDIR_MTD)/sbin/*
- $(IPKG_BUILD) $(IDIR_MTD) $(PACKAGE_DIR)
+define Package/mtd/install
+ install -d -m0755 $(1)/sbin
+ install -m0755 $(PKG_BUILD_DIR)/mtd $(1)/sbin/
+endef
+
+$(eval $(call BuildPackage,mtd))