aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rwxr-xr-xbuild17
1 files changed, 17 insertions, 0 deletions
diff --git a/build b/build
index 68acae2..a1cfe50 100755
--- a/build
+++ b/build
@@ -107,6 +107,8 @@ import()
# routine will source the build-rules to finish collecting data, so we
# end up sourcing the Buildrules twice.
eval $(build-query --environ "${1}")
+ RELEASE=
+ S=
# Source in the category Buildrules
if [ -f "${BUILDER_PKGDIR}/${CATEGORY}/.buildrules" ]; then
@@ -127,6 +129,21 @@ import()
if [ -z "${DESCRIPTION}" ]; then
die "missing description in '${NAME}'"
fi
+
+ if test -z "${RELEASE}"; then
+ RELEASE="${VERSION#*-}"
+ if ! test -z "${RELEASE}" && test "${RELEASE}" != "${VERSION}"; then
+ VERSION="${VERSION%-${RELEASE}}"
+ if test -z "${S}"; then
+ S="${W}/${NAME}-${VERSION}-${RELEASE}"
+ fi
+ else
+ RELEASE='0'
+ fi
+ fi
+ if test -z "${S}"; then
+ S="${W}/${NAME}-${VERSION}"
+ fi
}
if [ ! -z "${BUILDER_DEBUG}" ]; then