Codebase list rust-libslirp / b4e5b9d
Repackage using exact same version, also require debcargo 2.2.5 Ximin Luo 5 years ago
3 changed file(s) with 18 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
22 # Use like, e.g. `dev/list-unreleased.sh | dev/filter-builddeps-ok.sh`
33 set -e
44
5 shouldbuild() {
6 local dst="$1"
7 local src="$2"
8 test ! -e "$dst" -o "$src" -nt "$dst"
9 }
10
115 echo >&2 "redirecting all other output e.g. from debcargo to stderr"
126 while read crate ver; do
13 pkgname="${crate//_/-}${ver:+-$ver}"
14 if shouldbuild "build/$pkgname/debian/changelog" "src/$pkgname/debian/changelog"; then
15 realver="$(sed -nre "s/.*Package .* (.*) from crates.io.*/\1/gp" src/$pkg/debian/changelog | head -n1)"
16 REALVER="$realver" ./update.sh "$crate" $ver >&2 # TODO: no-overlay-write-back
17 fi
7 ./repackage.sh "$crate" $ver >&2
188 if ( cd build && SOURCEONLY=1 ./build.sh "$crate" $ver >&2 ); then
199 ok=1
2010 else
0 #!/bin/sh
1
2 . ./vars.sh.frag
3
4 if ! shouldbuild "$BUILDDIR/debian/changelog" "$PKGDIR/debian/changelog"; then
5 exit 0
6 fi
7
8 REALVER="$(sed -nre "s/.*Package .* (.*) from crates.io.*/\1/gp" "$PKGDIR/debian/changelog" | head -n1)"
9 run_debcargo --no-overlay-write-back
3434 test -x "$DEBCARGO" || abort 1 "debcargo found but not executable: $DEBCARGO"
3535 dcver=$($DEBCARGO --version | sed -ne 's/debcargo //p')
3636 case $dcver in
37 2.0.*|2.1.*|2.2.[0123]|2.2.[0123]-*) abort 1 "unsupported debcargo version $dcver. try reinstalling with \`cargo install debcargo --force\`";;
37 2.0.*|2.1.*|2.2.[01234]|2.2.[01234]-*) abort 1 "unsupported debcargo version $dcver. try reinstalling with \`cargo install debcargo --force\`";;
3838 2.2.*) true;;
3939 *) abort 1 "unsupported debcargo version: $dcver";;
4040 esac
6868 rm -rf "$BUILDDIR" "$(dirname "$BUILDDIR")/rust-${PKGNAME}_$VER"*.orig.tar.*
6969 $DEBCARGO package --config "$PKGCFG" --directory "$BUILDDIR" "$@" "$CRATE" "${REALVER:-$VER}"
7070 }
71
72 shouldbuild() {
73 local dst="$1"
74 local src="$2"
75 test ! -e "$dst" -o "$src" -nt "$dst"
76 }