-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
-DEFAULT:=
-MENU:=
-TITLE:=
-DESCRIPTION:=
+ CONFIGFILE:=
+ SECTION:=opt
+ CATEGORY:=Extra packages
+ DEPENDS:=
+ MAINTAINER:=OpenWrt Developers Team <openwrt-devel@openwrt.org>
+ SOURCE:=$(patsubst $(TOPDIR)/%,%,${shell pwd})
+ ifneq ($(PKG_VERSION),)
+ ifneq ($(PKG_RELEASE),)
+ VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
+ else
+ VERSION:=$(PKG_VERSION)
+ endif
+ else
+ VERSION:=$(PKG_RELEASE)
+ endif
+ PKGARCH:=$(ARCH)
+ PRIORITY:=optional
+ DEFAULT:=
+ MENU:=
+ TITLE:=
+ DESCRIPTION:=