5 ARCHITECTURES
=( amd64 arm64 i386 armhf riscv64
)
12 echo "Not enough arguments" >&2
19 # Create some temporary directory
20 local tmp
="$(mktemp -d)"
22 # Extract the sources into it
23 tar xvfa
"${sources}" -C "${tmp}"
25 # Copy the tarball under the correct Debian name
26 cp -vf "${sources}" "${tmp}/${package//-/_}.orig.tar.xz"
28 # Change into source directory
29 pushd "${tmp}/${package}"
31 # Prepare the build environment
32 #if ! debuild -us -uc; then
33 # echo "Could not prepare build environment" >&2
37 # Build the package for each release
39 for release
in ${RELEASES[@]}; do
40 # And for each architecture we want to support
42 for arch
in ${ARCHITECTURES[@]}; do
43 local chroot
="${release}-${arch}-sbuild"
45 # Create a chroot environment
46 if [ ! -d "/etc/sbuild/chroot/${chroot}" ]; then
47 if ! sbuild-createchroot
--arch="${arch}" "${release}" \
48 "${CHROOT_PATH}/${chroot}"; then
49 echo "Could not create chroot for ${release} on ${arch}" >&2
54 # Run the build process
55 if ! sbuild
--dist="${release}" --host="${arch}"; then
56 echo "Could not build package for ${release} on ${arch}" >&2