Skip to content

Commit

Permalink
Added package build switches
Browse files Browse the repository at this point in the history
  • Loading branch information
grodansparadis committed Mar 24, 2020
1 parent d7bd64e commit b1324a3
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions build_debian_package.sh
Original file line number Diff line number Diff line change
@@ -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 "[] ()"`
Expand All @@ -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)'
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b1324a3

Please sign in to comment.