fix version info for packages that either lack PKG_VERSION or PKG_RELEASE
authorFelix Fietkau <nbd@openwrt.org>
Fri, 2 Jun 2006 00:01:00 +0000 (00:01 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 2 Jun 2006 00:01:00 +0000 (00:01 +0000)
SVN-Revision: 3890

openwrt/package/rules.mk

index fe16a18f987057981830c555d1d959f6df782a86..79c2b3460d8223ae32c1059a103345e8f9954f02 100644 (file)
@@ -55,7 +55,15 @@ define Package/Default
   DEPENDS:=
   MAINTAINER:=OpenWrt Developers Team <openwrt-devel@openwrt.org>
   SOURCE:=$(patsubst $(TOPDIR)/%,%,${shell pwd})
-  VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
+  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:=