Files
tessesframework-gfx/Packaging/Linux/build-ubuntu-plucky.sh
2025-11-01 23:54:33 -05:00

34 lines
1.5 KiB
Bash

#!/bin/bash
DEBIAN_FRONTEND=noninteractive apt update -y
source ./version.sh
mkdir -p build/plucky
cd build/plucky
if [[ "$1" == "amd64" ]]; then
mkdir build-amd64
DEBIAN_FRONTEND=noninteractive apt install -y git pkg-config tessesframework
cmake -S ../../../../ -B build-amd64 -DCMAKE_INSTALL_PREFIX=/usr -DTESSESFRAMEWORKGFX_FETCHCONTENT=OFF
cd build-amd64
make -j`nproc`
make install DESTDIR=../tessesframework--gfx_$DEB_VERSION\_amd64
mkdir -p ../tessesframework--gfx_$DEB_VERSION\_amd64/DEBIAN
bash ../../../make-control.sh ../tessesframework--gfx_$DEB_VERSION\_amd64/DEBIAN/control amd64
cd ../
dpkg-deb --build tessesframework--gfx_$DEB_VERSION\_amd64
else
mkdir build-$1
DEBIAN_FRONTEND=noninteractive apt install -y git pkg-config tessesframework:$1
cmake -S ../../../../ -B build-$1 -DCMAKE_INSTALL_PREFIX=/usr -DTESSESFRAMEWORKGFX_FETCHCONTENT=OFF -DCMAKE_TOOLCHAIN_FILE=/opt/toolchains/$1.cmake
cd build-$1
make -j`nproc`
make install DESTDIR=../tessesframework--gfx_$DEB_VERSION\_$1
mkdir -p ../tessesframework--gfx_$DEB_VERSION\_$1/DEBIAN
bash ../../../make-control.sh ../tessesframework--gfx_$DEB_VERSION\_$1/DEBIAN/control $1
cd ../
dpkg-deb --build tessesframework--gfx_$DEB_VERSION\_$1
fi
curl --user tesses50:$GITEA_AUTH -X DELETE \
https://git.tesseslanguage.com/api/packages/tesses50/debian/pool/plucky/main/tessesframework--gfx/$DEB_VERSION/$1
curl --user tesses50:$GITEA_AUTH \
--upload-file tessesframework--gfx_$DEB_VERSION\_$1.deb \
https://git.tesseslanguage.com/api/packages/tesses50/debian/pool/plucky/main/upload