Upgrading deb packaging
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Adsooi 2024-10-14 17:18:58 +02:00
parent 3a81441d0b
commit c03afdf4ee
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160
7 changed files with 39 additions and 18 deletions

View file

@ -26,7 +26,18 @@ mkdir assets
cp -r ../../assets/{native,*.svg} assets/
cp ../../README.md .
# Build for noble
python3 setup.py --remove-git-version --command-packages=stdeb.command sdist_dsc \
--package logarithmplotter --copyright-file assets/native/linux/debian/copyright \
--suite noble --depends3 "$(cat assets/native/linux/debian/depends)" --section science \
--suite noble --depends3 "$(cat assets/native/linux/debian/depends.wheels)" --section science \
bdist_deb
mv deb_dist deb_dist.noble
# Build for oracular (different dependencies)
python3 setup.py --remove-git-version --command-packages=stdeb.command sdist_dsc \
--package logarithmplotter --copyright-file assets/native/linux/debian/copyright \
--suite oracular --depends3 "$(cat assets/native/linux/debian/depends.packaged)" --section science \
bdist_deb
mv deb_dist deb_dist.oracular

View file

@ -1,23 +1,26 @@
#!/bin/bash
# This script is used to sign the LogarithmPlotter deb directly from it's DSC file.
# Adapted from https://github.com/astraw/stdeb/issues/181
cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/../build/runtime-pyside6/deb_dist" || exit 1
cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/../build/runtime-pyside6/" || exit 1
PPA_ARCHIVE="ppa:ad5001/logarithmplotter"
# create a temporary folder
mkdir tmp -p
cd tmp
rm -rf *
for dist in `echo noble oracular`; do
echo "Signing $dist deb..."
# create a temporary folder
mkdir "deb_dist.$dist/tmp" -p
cd "deb_dist.$dist/tmp" || exit 1
rm -rf *
# DSC file variables
dsc_file="$(find ../ -regextype sed -regex ".*/*.dsc" | cut -c 4-)"
source_package_name="$(echo $dsc_file | cut -c -$(expr ${#dsc_file} - 4))"
# DSC file variables
dsc_file="$(find ../ -regextype sed -regex ".*/*.dsc" | cut -c 4-)"
source_package_name="$(echo $dsc_file | cut -c -$(expr ${#dsc_file} - 4))"
# extract and sign the files
dpkg-source -x "../$dsc_file"
cd "$(find . -type d | head -n 2 | tail -n 1 | cut -c 3-)" # go to the (only) directory.
debuild -S -sa -k"mail@ad5001.eu"
# extract and sign the files
dpkg-source -x "../$dsc_file"
cd "$(find . -type d | head -n 2 | tail -n 1 | cut -c 3-)" # go to the (only) directory.
debuild -S -sa -k"mail@ad5001.eu"
# upload package to my PPA
dput $PPA_ARCHIVE "../${source_package_name}_source.changes"
# upload package to my PPA
dput $PPA_ARCHIVE "../${source_package_name}_source.changes"
done