antos-deb/build_deb.sh

42 lines
840 B
Bash
Raw Normal View History

2023-01-01 14:48:31 +01:00
#! /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"
2023-01-01 14:51:37 +01:00
NAME="AntOS_${TAG}_${ARCH}"
2023-01-01 14:48:31 +01:00
[ -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
2023-01-01 14:54:07 +01:00
cat DEBIAN/control
tree .
2023-01-01 14:48:31 +01:00
2023-01-01 14:54:07 +01:00
dpkg-deb --build AntOS
2023-01-01 14:48:31 +01:00