diff options
author | Erich Ritz <erich.public@protonmail.com> | 2021-10-14 08:40:39 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-10-30 23:57:46 +0700 |
commit | fb3c1b7bc7f078862e982c3badefda5e3c9fe2a8 (patch) | |
tree | 337fc10f44afa841f0e732185c2a5a7d99748ce9 /system/dust/dust.SlackBuild | |
parent | b27c7d928d8666e1c45e1a62b393880ff6a46007 (diff) |
system/dust: Updated for version 0.7.5 + New maintainer.
See
https://lists.slackbuilds.org/pipermail/slackbuilds-users/2021-October/025913.html
for email documenting transfer of mainter.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/dust/dust.SlackBuild')
-rw-r--r-- | system/dust/dust.SlackBuild | 43 |
1 files changed, 29 insertions, 14 deletions
diff --git a/system/dust/dust.SlackBuild b/system/dust/dust.SlackBuild index d634028216..9ec1f77fbb 100644 --- a/system/dust/dust.SlackBuild +++ b/system/dust/dust.SlackBuild @@ -3,6 +3,7 @@ # Slackware build script for dust # Copyright 2019-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net> +# Copyright 2021 Erich Ritz, Jenks, Oklahoma, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -25,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=dust -VERSION=${VERSION:-0.6.0} +VERSION=${VERSION:-0.7.5} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -87,13 +88,13 @@ cd $PRGNAM-$VERSION # configuration tells cargo to use the configured directory # for dependencies intead of downloading from crates.io mkdir .cargo -cat << EOF >> .cargo/config +cat << EOF >> .cargo/config.toml +[source] [source.crates-io] -registry = 'https://github.com/rust-lang/crates.io-index' -replace-with = 'vendored-sources' +replace-with = "vendored-sources" [source.vendored-sources] -directory = '$(pwd)/vendor' +directory = "vendor" EOF # deps and versions come from Cargo.lock @@ -101,15 +102,31 @@ mkdir vendor ( cd vendor - grep -h -A 3 "\[\[package\]\]" $(find ../ -maxdepth 1 -mindepth 1 -name Cargo.lock | tr '\n' ' ') | \ - sed 's/[[:space:]]*=[[:space:]]*/=/g;s/^--//;s/^\[\[/--\n[[/' | \ - awk 'BEGIN { RS = "--\n" ; FS="\n" } { print $2, $3, $4 }' | sed 's/"//g;s/name=//;s/ version=/=/' | \ - grep crates\.io-index | sed 's/ source=.*$//' | sort -u | while read -r dep ; do - + grep -h -A 4 "\[\[package\]\]" \ + $(find "../" -maxdepth 1 -mindepth 1 -name Cargo.lock | tr '\n' ' ') | \ + sed 's/[[:space:]]*=[[:space:]]*/=/g;s/^--//;s/^\[\[/--\n[[/' | \ + awk 'BEGIN { RS = "--\n" ; FS="\n" } { print $2, $3, $4, $5 }' | \ + sed 's/"//g;s/name=//;s/ version=/=/' | \ + grep " source=" | \ + sed 's/ dependencies=.*$//' | \ + sed 's/ source=[^ ]*//' | \ + sed 's/ checksum=/=/' | \ + sort -u | \ + while read -r dep ; do + + cksum="$(printf "%s\n" "$dep" | cut -d= -f3)" ver="$(printf "%s\n" "$dep" | cut -d= -f2)" dep="$(printf "%s\n" "$dep" | cut -d= -f1)" - tar xvf $CWD/$dep-$ver.crate + CRATE_FILE=$CWD/$dep-$ver.crate + + if [ -z "$cksum" ] ; then + mkdir $dep-$ver + tar xvf $CRATE_FILE -C $dep-$ver --strip-components=1 + cksum="null" + else + tar xvf $CRATE_FILE + fi touch $dep-$ver/.cargo-ok @@ -124,9 +141,7 @@ mkdir vendor ) | sed '$ s/,$//' printf " },\n" - printf ' "package": "' - - sha256sum "$CWD/$dep-$ver.crate" | cut -f1 -d' ' | sed 's/$/"/' + printf ' "package": "%s"' "$cksum" printf "}\n" } | python -c "import sys, json; data = sys.stdin.read(); print json.dumps(json.loads(data), sort_keys=True, indent=4, separators=(',', ' : '))" > $dep-$ver/.cargo-checksum.json |