+define Package/Default
+CONFIGFILE:=
+SECTION:=opt
+CATEGORY:=Extra packages
+DEPENDS:=
+MAINTAINER:=OpenWrt Developers Team <openwrt-devel@openwrt.org>
+SOURCE:=$(patsubst $(TOPDIR)/%,%,${shell pwd})
+VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
+PKGARCH:=$(ARCH)
+PRIORITY:=optional
+TITLE:=
+DESCRIPTION:=
+endef
+
+define BuildPackage
+$$(eval $$(call Package/Default))
+$$(eval $$(call Package/$(1)))
+
+ifeq ($$(TITLE),)
+$$(error Package $(1) has no TITLE)
+endif
+ifeq ($$(CATEGORY),)
+$$(error Package $(1) has no CATEGORY)
+endif
+ifeq ($$(PRIORITY),)
+$$(error Package $(1) has no PRIORITY)
+endif
+ifeq ($$(VERSION),)
+$$(error Package $(1) has no VERSION)
+endif
+ifeq ($$(PKGARCH),)
+PKGARCH:=$(ARCH)
+endif
+
+IPKG_$(1):=$(PACKAGE_DIR)/$(1)_$(VERSION)_$(PKGARCH).ipk
+IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(1)
+INFO_$(1):=$(IPKG_STATE_DIR)/info/$(1).list
+
+ifneq ($(PACKAGE_$(1)),)