Package list rust-stfu8 / 931eabc
Initial helper scripts Ximin Luo 3 years ago
5 changed file(s) with 76 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 /build
1 /src/*/*
2 !/src/*/debian
0 Run `./update.sh <rust-crate-name>` and follow its instructions.
1
2 (The above applies even for new Rust Debian packages.)
0 #!/bin/sh
1
2 . ./vars.sh.frag
3
4 git diff -q -- "$PKGDIR_REL" || \
5 abort 1 "Please git-add your changes to $PKGDIR_REL before running"
6
7 ( cd "$PKGDIR"
8 sed -i -e s/UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO/UNRELEASED/ debian/changelog
9 dch -r -D unstable ""
10 git add debian/changelog
11 )
12
13 rm -rf "$BUILDDIR"
14 $DEBCARGO package --config "$PKGCFG" --directory "$BUILDDIR" --changelog-ready "$PKG"
15
16 git diff -q -- "$PKGDIR_REL" || \
17 abort 1 "cannot release, update resulted in git diffs to $PKGDIR_REL"
18
19 git commit -m "Update package $PKG"
20
21 ( cd "$BUILDDIR" && dpkg-buildpackage -d -S --no-sign )
0 #!/bin/sh
1
2 . ./vars.sh.frag
3
4 if [ ! -d "$PKGDIR/debian" ]; then
5 mkdir -p "$PKGDIR/debian"
6 sed -e 's/^#overlay =/overlay =/' -e '/^#/d' "$DEBCARGO_GIT/debcargo.toml.example" > "$PKGCFG"
7 touch "$PKGDIR/debian/copyright"
8 git add "$PKGDIR"
9 fi
10
11 rm -rf "$BUILDDIR" && mkdir -p "$(dirname $BUILDDIR)"
12 $DEBCARGO package --config "$PKGCFG" --directory "$BUILDDIR" "$PKG"
13
14 if ! git diff -q -- "$PKGDIR_REL"; then
15 read -p "Update wrote some changes to $PKGDIR_REL, press enter to git diff..." x
16 git diff -- "$PKGDIR_REL"
17 fi
18
19 cat >&2 <<eof
20 Automatic update of $PKG finished; now it's your turn to manually review it.
21
22 Deal with any FIXMEs mentioned above, by editing the corresponding source files
23 in $PKGDIR_REL (and NOT the build directory as mentioned). When done, git-add
24 your changes and re-run this command (\`./update.sh $*\`).
25
26 Check that your fixes actually get rid of the FIXMEs. Of course, you may ignore
27 FIXMEs listed in hint files, indicated by (.), assuming you actually fixed the
28 issues in the corresponding non-hint files. (We have no way to auto-detect this
29 so you have to be honest!)
30
31 If satisfied with the output, run \`./release.sh $*\` to finalise your changes
32 in the changelog and build a release-ready .dsc in build/. Assuming it runs
33 successfully, you may \`dput\` the results afterwards.
34 eof
0 set -e
1
2 DEBCARGO_GIT=${DEBCARGO_GIT:-$PWD/../debcargo}
3 DEBCARGO=${DEBCARGO:-$DEBCARGO_GIT/target/debug/debcargo}
4 PKG="$1"
5
6 PKGNAME=$($DEBCARGO deb-src-name "$PKG")
7 PKGDIR_REL="src/$PKGNAME"
8 PKGDIR="$PWD/$PKGDIR_REL"
9 BUILDDIR="$PWD/build/$PKGNAME"
10 PKGCFG="$PKGDIR/debian/debcargo.toml"
11
12 abort() { local x=$1; shift; echo >&2 "$0: abort: $@"; exit "$x"; }