add deb package build script
Some checks failed
gitea-sync/antos-deb/pipeline/head There was a failure building this commit

This commit is contained in:
Dany LE 2023-01-01 14:48:31 +01:00
parent bb8cdee6ac
commit 9d212eae5e

41
build_deb.sh Executable file
View File

@ -0,0 +1,41 @@
#! /bin/bash
set -e
set -x
TAG=$1
ARCH=$2
[ -z "$TAG" ] && echo "Unknown version" && exit 1
[ -z "$ARCH" ] && echo "Unknown architecture" && exit 1
echo "build ANTOS deb package for version $TAG, architecture $ARCH"
DIR="build/$TAG"
FILE="AntOS_$ARCH.deb"
NAME="AntOS_$TAG_$ARCH"
[ -d "$NAME" ] && rm -rf "$NAME"
mkdir $NAME
[ ! -d "$DIR" ] && mkdir -p "$DIR"
echo "Extract binaries of version $TAG, architecture $ARCH to $NAME"
cd $NAME
tar xvzf ../antos/build/$TAG/AntOS_$ARCH.tar.gz .
mkdir DEBIAN
cat << EOF >> DEBIAN/control
Package: AntOS
Version: $TAG
Architecture: $ARCH
Depends: libsqlite3 zlib1g libreadline libssl libjpeg-turbo8 libffi libvncserver
Maintainer: Dany LE <mrsang@iohub.dev>
Description: AntOS web-desktop
All-in-one AntOS system for self hosting.
EOF
cd ../
cat $NAME/DEBIAN/control
tree $NAME