Codebase list rust-serde-xml-rs / 54042c4
Require 2.2.7 and try to auto-fill in "uploaders" in future Ximin Luo 5 years ago
2 changed file(s) with 15 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
1313 fi
1414 if [ ! -d "$PKGDIR/debian" ]; then
1515 mkdir -p "$PKGDIR/debian"
16 echo 'overlay = "."' > "$PKGCFG"
16 cat <<-eof > "$PKGCFG"
17 overlay = "."
18 uploaders = ["$DEBFULLNAME <$DEBEMAIL>"]
19 eof
1720 git add "$PKGDIR"
1821 fi
1922 if [ ! -f "$PKGDIR/debian/copyright" ]; then
2023 cat <<-eof > "$PKGDIR/debian/copyright"
2124 FIXME fill me in using ./copyright.debcargo.hint as a guide
22
23 You may find the following useful too:
24
25 Files: debian/*
26 Copyright:
27 2018 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
28 2018 $DEBFULLNAME <$DEBEMAIL>
29
30 The reason we don't put this in debian/copyright.debcargo.hint itself is
31 documented here: https://salsa.debian.org/rust-team/debcargo-conf/issues/5
3225 eof
3326 fi
3427 if [ -n "$VER" -a "$(sed -ne 's/^semver_suffix\s*=\s*//p' "$PKGCFG")" != "true" ]; then
3629 sed -i -e 's/^\(semver_suffix\s*=\s*\).*/\1true/' "$PKGCFG"
3730 else
3831 sed -i -e '1isemver_suffix = true' "$PKGCFG"
32 fi
33 fi
34
35 if ! grep -q uploaders "$PKGCFG"; then
36 # try to auto-fill in uploaders if debcargo.toml doesn't have it
37 uploader="$(grep -A1 "[0-9][0-9]* Debian Rust Maintainers" "$PKGDIR/debian/copyright" | tail -n1 | sed -re 's/^\s*[0-9]+\s*//g')"
38 sed -i -e 's/^\(overlay.*\)$/\1\nuploaders = ["'"$uploader"'"]/' "$PKGCFG"
39 if [ "$uploader" != "$DEBFULLNAME <$DEBEMAIL>" ]; then
40 echo >&2 "$0: Auto-added $uploader to uploaders in debcargo.toml, based on d/copyright"
41 read >&2 -p "$0: You may also want to add yourself; ctrl-c if you want to do that, or press enter to continue... " x
3942 fi
4043 fi
4144
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.[012345]|2.2.[012345]-*) abort 1 "unsupported debcargo version $dcver. try reinstalling with \`cargo install debcargo --force\`";;
37 2.0.*|2.1.*|2.2.[0123456]|2.2.[0123456]-*) 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