feat: add debian packaging

fuck this is complicated. Why'd you make it so insane, debian
maintainers?
Please fix this.

It's working now, but Makefile must be modified... I dont like that.
Let's find another way
This commit is contained in:
2024-08-18 20:22:06 +02:00
parent ccd07141f5
commit d02eb34285
13 changed files with 197 additions and 60 deletions

0
scripts/build.sh → scripts/build-cpp-cmake.sh Normal file → Executable file
View File

31
scripts/package-sci-deb.sh Executable file
View File

@ -0,0 +1,31 @@
#!/bin/bash
# TODO: SCI_VERSION env var
debbuilder_image=$(docker images | grep debbuilder)
set -e
if [ -z $debbuilder_image ]; then
echo "building debbuilder image..."
docker build -t debbuilder -f deb-builder.dockerfile .
fi
echo "building source dist..."
make dist
echo "building .deb in debbuilder docker image..."
docker run --rm -it -v .:/src debbuilder sh -c '\
cd && \
mkdir -p artifacts && \
cp /src/sci-1.0.0.tar.gz . && \
mv sci-1.0.0.tar.gz sci_1.0.0.orig.tar.gz && \
tar xf sci_1.0.0.orig.tar.gz && \
cd sci-1.0.0 && \
cp -r /src/debian . && \
debuild && \
cp ../*.deb ~/artifacts && \
cp ../*.dsc ~/artifacts && \
cp ../*.build ~/artifacts && \
cp ../*.buildinfo ~/artifacts && \
cp ../*.changes ~/artifacts && \
cp ../*.tar.xz ~/artifacts && \
cp ../*.tar.gz ~/artifacts && \
tar czf /src/artifacts.tar.gz ~/artifacts
'