From b1324a33391bcd1eec34609bd66a73825697df32 Mon Sep 17 00:00:00 2001 From: Ake Hedman Date: Tue, 24 Mar 2020 11:33:05 +0100 Subject: [PATCH] Added package build switches --- build_debian_package.sh | 60 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/build_debian_package.sh b/build_debian_package.sh index 05284924c..53de779a5 100755 --- a/build_debian_package.sh +++ b/build_debian_package.sh @@ -1,5 +1,13 @@ #!/bin/sh +# arg1 - platform +# --------------- +# i386 ununtu/debian ./build_debian_package.sh i386 10 +# amd64 ununtu/debian ./build_debian_package.sh amd64 10 +# armhf raspbian ./build_debian_package.sh armhf 10 +# +# arg2 - COMPAT + # Package version MAJOR_VERSION=`head -n4 VERSION.m4 | grep major_version | awk '{print $2}' | tr -d "[] ()"` MINOR_VERSION=`head -n4 VERSION.m4 | grep minor_version | awk '{print $2}' | tr -d "[] ()"` @@ -17,6 +25,16 @@ BUILD_FOLDER="../dist" # relevant for 'control' and 'compat' COMPAT="12" +case "$2" in +"") + echo "Using discovered COMPAT" + ;; +*) + echo "Setting COMPAT = $2" + COMPAT="$2" + ;; +esac + # makes correct /usr/lib subfolder (/usr/lib/x86_64-linux-gnu/), none on Raspberry # relevant for 'install' and 'links' #SUBFOLDER='$(DEB_BUILD_GNU_CPU)-$(DEB_BUILD_GNU_SYSTEM)' @@ -115,6 +133,48 @@ Raspian) ;; esac +# --------------------------------------------------------------------- + +case "$2" in +"") + echo "Using discovered COMPAT" + ;; +*) + echo "Setting COMPAT = $2" + COMPAT="$2" + ;; +esac + +# --------------------------------------------------------------------- + +case "$1" in +amd64) + echo "Building for amd64" + BITS=64 + SUBFOLDER="x86_64-linux-gnu" + ARCH=x64 + ;; +i386) + echo "Building for i386" + BITS=32 + SUBFOLDER="i386-linux-gnu" + ARCH=x86 + ;; +armhf) + echo "Building for armhf" + BITS=32 + SUBFOLDER="arm-linux-gnueabihf" + ARCH=armhf + ;; +*) + echo "Building with discovery for installed system" + ;; +esac + + +# --------------------------------------------------------------------- + + echo "*** ---$NAME_PLUS_VER" # Create the build folder