Profil pour contruire un paquet deb à partir d’une source obtenue sur pypi

This commit is contained in:
Benjamin Bohard 2021-08-10 12:28:40 +02:00
parent 4c4fd6d42c
commit 56013daed0
3 changed files with 52 additions and 0 deletions

15
hooks/build/stdeb/build Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env bash
cd src
for archive in *.tar.gz
do
py2dsc $archive
folder="$(find deb_dist/* -maxdepth 0 -type d)"
pushd $folder
dpkg-buildpackage -b -a"${TAMARIN_TARGET_ARCH}"
find ../ -maxdepth 1 -name "*.deb" -type f -print0 | xargs -0r mv -t /dist/
popd
rm -rf $folder
done
exit 0

View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -e
echo 'ENV DEBIAN_FRONTEND=noninteractive' >> Dockerfile
echo 'RUN apt-get update && apt-get install --yes --no-install-recommends python3-all dh-python python3-pip' >> Dockerfile
echo 'RUN pip3 install stdeb' >> Dockerfile
echo 'ENV DEBIAN_FRONTEND=' >> Dockerfile

28
profiles/pypi-2.8.1.conf Normal file
View File

@ -0,0 +1,28 @@
# Configuration générale du profil
[profile]
# Image Docker par défaut
default_image=ubuntu:focal
# Configuration de l'étape de pré-construction du conteneur
[containerbuild]
hooks=
containerbuild/debian/install-build-essential,
containerbuild/ubuntu/install-stdeb,
# Configuration de l'étape de pré-construction du paquet
[prebuild]
hooks=
prebuild/debian/copy-sources-to-workspace,
prebuild/debian/run-project-hooks,
prebuild/debian/load-project-db,
# Configuration de l'étape de construction du paquet
[build]
hooks=build/stdeb/build
# Configuration de l'étape de post-construction du paquet
[postbuild]
hooks=
postbuild/debian/run-project-hooks,
postbuild/debian/export-dist