From 2919fd1ef99eba4fd342f278d391333cc7c0a2fb Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Thu, 8 Feb 2018 18:34:43 +0100 Subject: expand debian package version Signed-off-by: Michael Olbrich --- build_all_v2.mk | 2 +- rules/image-toolchain-deb.make | 3 ++- scripts/lib/ptxd_make_debian_version_ext.sh | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 scripts/lib/ptxd_make_debian_version_ext.sh 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 +# +# 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 -- cgit v1.2.3