]> git.proxmox.com Git - proxmox.git/blob - build.sh
schema: support AllOf in ExtractValueDeserializer
[proxmox.git] / build.sh
1 #!/bin/sh
2
3 set -e
4
5 export CARGO=/usr/bin/cargo
6 export RUSTC=/usr/bin/rustc
7
8 CRATE=$1
9 BUILDCMD=${BUILDCMD:-"dpkg-buildpackage -b -uc -us"}
10
11 mkdir -p build
12 echo system >build/rust-toolchain
13 rm -rf "build/${CRATE}"
14
15 CONTROL="$PWD/${CRATE}/debian/control"
16
17 if [ -e "$CONTROL" ]; then
18 # check but only warn, debcargo fails anyway if crates are missing
19 dpkg-checkbuilddeps $PWD/${CRATE}/debian/control || true
20 rm -f "$PWD/${CRATE}/debian/control"
21 fi
22
23 debcargo package --config "$PWD/${CRATE}/debian/debcargo.toml" --changelog-ready --no-overlay-write-back --directory "$PWD/build/${CRATE}" "${CRATE}" "$(dpkg-parsechangelog -l "${CRATE}/debian/changelog" -SVersion | sed -e 's/-.*//')"
24 cd "build/${CRATE}"
25 ${BUILDCMD}
26
27 cp debian/control "$CONTROL"