summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2018-02-08 18:34:43 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2018-02-09 10:24:35 +0100
commit2919fd1ef99eba4fd342f278d391333cc7c0a2fb (patch)
treeac61724be37ec93ac056c403ab67f6935abded78
parenta8a54302e5ca9c9ab4e2f4cf199941e0235d36f7 (diff)
downloadOSELAS.Toolchain-2919fd1ef99eba4fd342f278d391333cc7c0a2fb.tar.gz
expand debian package version
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rwxr-xr-xbuild_all_v2.mk2
-rw-r--r--rules/image-toolchain-deb.make3
-rw-r--r--scripts/lib/ptxd_make_debian_version_ext.sh20
3 files changed, 23 insertions, 2 deletions
diff --git a/build_all_v2.mk b/build_all_v2.mk
index a1d433a..4705888 100755
--- a/build_all_v2.mk
+++ b/build_all_v2.mk
@@ -19,7 +19,7 @@ BENICE := true
PTXDIST := ./p --force
ARG := images
-export PTXDIST_ENV_WHITELIST := CROSS_GDB_WITHOUT_PYTHON
+export PTXDIST_ENV_WHITELIST := CROSS_GDB_WITHOUT_PYTHON IMAGE_TOOLCHAIN_DEB_VERSION_EXT
export CROSS_GDB_WITHOUT_PYTHON ?= y
ifdef BENICE
diff --git a/rules/image-toolchain-deb.make b/rules/image-toolchain-deb.make
index 54445df..2214a93 100644
--- a/rules/image-toolchain-deb.make
+++ b/rules/image-toolchain-deb.make
@@ -16,8 +16,9 @@ IMAGE_PACKAGES-$(PTXCONF_IMAGE_TOOLCHAIN_DEB) += image-toolchain-deb
#
# Paths and names
#
+IMAGE_TOOLCHAIN_DEB_VERSION_EXT ?= $(shell ptxd_make_debian_version_ext)
IMAGE_TOOLCHAIN_DEB_VERSION := $(shell ./scripts/setlocalversion ./.tarball-version)
-IMAGE_TOOLCHAIN_DEB_IMAGE := $(PTXDIST_WORKSPACE)/dist/oselas.toolchain-$(IMAGE_TOOLCHAIN_DEB_VERSION)-$(subst _,-,$(PTXCONF_PLATFORM))_$(IMAGE_TOOLCHAIN_DEB_VERSION)_$(PTX_TOOLCHAIN_HOST_ARCH).deb
+IMAGE_TOOLCHAIN_DEB_IMAGE := $(PTXDIST_WORKSPACE)/dist/oselas.toolchain-$(IMAGE_TOOLCHAIN_DEB_VERSION)-$(subst _,-,$(PTXCONF_PLATFORM))_$(IMAGE_TOOLCHAIN_DEB_VERSION)$(IMAGE_TOOLCHAIN_DEB_VERSION_EXT)_$(PTX_TOOLCHAIN_HOST_ARCH).deb
# ----------------------------------------------------------------------------
# Image
diff --git a/scripts/lib/ptxd_make_debian_version_ext.sh b/scripts/lib/ptxd_make_debian_version_ext.sh
new file mode 100644
index 0000000..28c1ba3
--- /dev/null
+++ b/scripts/lib/ptxd_make_debian_version_ext.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+#
+# Copyright (C) 2018 by Michael Olbrich <m.olbrich@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+ptxd_make_debian_version_ext() {
+ local num="$(. /etc/os-release; echo ${VERSION_ID})"
+ local version="-0ptx1"
+
+ if [ -n "${num}" ]; then
+ version="${version}~bpo${num}+1"
+ fi
+ echo "${version}"
+}
+export -f ptxd_make_debian_version_ext