diff options
author | Benjamin Trigona-Harany <slackbuilds@jaxartes.net> | 2019-12-31 17:56:54 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-12-31 17:56:54 +0700 |
commit | 4edeb049a1af1507b952ba73eb868888911dd5f5 (patch) | |
tree | 3d11e93af0097f9a0d75375bd4ba7cdc6d0c878d /system/dust | |
parent | 26817d9dd862851218db4261d218ef21258087bb (diff) | |
download | slackbuilds-4edeb049a1af1507b952ba73eb868888911dd5f5.tar.gz |
system/dust: Added (more intuitive du).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/dust')
-rw-r--r-- | system/dust/README | 6 | ||||
-rw-r--r-- | system/dust/dust.SlackBuild | 154 | ||||
-rw-r--r-- | system/dust/dust.info | 136 | ||||
-rw-r--r-- | system/dust/slack-desc | 19 |
4 files changed, 315 insertions, 0 deletions
diff --git a/system/dust/README b/system/dust/README new file mode 100644 index 0000000000..84a1a21a62 --- /dev/null +++ b/system/dust/README @@ -0,0 +1,6 @@ +Dust is meant to give you an instant overview of which directories are using +disk space without requiring sort or head. + +Dust will list the 20 biggest sub directories or files and will smartly recurse +down the tree to find the larger ones. There is no need for a '-d' flag or a +'-h' flag. The largest sub directory will have its size shown in red. diff --git a/system/dust/dust.SlackBuild b/system/dust/dust.SlackBuild new file mode 100644 index 0000000000..66500f89d7 --- /dev/null +++ b/system/dust/dust.SlackBuild @@ -0,0 +1,154 @@ +#!/bin/sh + +# Slackware build script for dust + +# Copyright 2019 Benjamin Trigona-Harany <slackbuilds@jaxartes.net> +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=dust +VERSION=${VERSION:-0.4.3} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac + + if [ "$ARCH" = "i586" ]; then + if rustc -Vv | grep host | grep i686 > /dev/null ; then + ARCH=i686 + fi + fi +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" + CARGOTARGET="--target i586-unknown-linux-gnu" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" + CARGOTARGET="--target i686-unknown-linux-gnu" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" + CARGOTARGET="--target x86_64-unknown-linux-gnu" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" + CARGOTARGET="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION + +# build offline +# configuration tells cargo to use the configured directory +# for dependencies intead of downloading from crates.io +mkdir .cargo +cat << EOF >> .cargo/config +[source.crates-io] +registry = 'https://github.com/rust-lang/crates.io-index' +replace-with = 'vendored-sources' + +[source.vendored-sources] +directory = '$(pwd)/vendor' +EOF + +# deps and versions come from Cargo.lock +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 + + ver="$(printf "%s\n" "$dep" | cut -d= -f2)" + dep="$(printf "%s\n" "$dep" | cut -d= -f1)" + + tar xvf $CWD/$dep-$ver.crate + + touch $dep-$ver/.cargo-ok + + # generate checksum + { + printf "{\n" + printf ' "files": {\n' + + ( + cd $dep-$ver + find . -type f -print0 | xargs -0 sha256sum | sed -n '/\.cargo-checksum\.json/!p' | sed 's/\.\///;s/^\([^ ]*\)[[:space:]][[:space:]]*\(.*\)$/"\2":"\1",/' + ) | sed '$ s/,$//' + + printf " },\n" + printf ' "package": "' + + sha256sum "$CWD/$dep-$ver.crate" | cut -f1 -d' ' | sed 's/$/"/' + + 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 + done +) + +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +cargo build --offline --release $CARGOTARGET + +mkdir -p $PKG/usr/bin/ + +find target -name $PRGNAM -exec install -m 755 {} $PKG/usr/bin/$PRGNAM \; + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a -r \ + LICENSE README.md \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/dust/dust.info b/system/dust/dust.info new file mode 100644 index 0000000000..39a7a8fb5a --- /dev/null +++ b/system/dust/dust.info @@ -0,0 +1,136 @@ +PRGNAM="dust" +VERSION="0.4.3" +HOMEPAGE="https://github.com/bootandy/dust/" +DOWNLOAD="https://github.com/bootandy/dust/archive/v0.4.3/dust-0.4.3.tar.gz \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/ansi_term/ansi_term-0.11.0.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/ansi_term/ansi_term-0.12.1.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/assert_cli/assert_cli-0.6.3.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/atty/atty-0.2.13.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/autocfg/autocfg-0.1.7.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/backtrace/backtrace-0.3.40.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/backtrace-sys/backtrace-sys-0.1.32.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/bitflags/bitflags-1.2.1.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/c2-chacha/c2-chacha-0.2.3.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/cc/cc-1.0.48.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/cfg-if/cfg-if-0.1.10.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/clap/clap-2.33.0.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/colored/colored-1.9.0.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/crossbeam/crossbeam-0.7.3.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/crossbeam-channel/crossbeam-channel-0.4.0.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/crossbeam-deque/crossbeam-deque-0.7.2.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/crossbeam-epoch/crossbeam-epoch-0.8.0.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/crossbeam-queue/crossbeam-queue-0.2.1.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/crossbeam-utils/crossbeam-utils-0.7.0.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/difference/difference-2.0.0.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/either/either-1.5.3.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/environment/environment-0.1.1.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/failure/failure-0.1.6.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/failure_derive/failure_derive-0.1.6.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/getrandom/getrandom-0.1.13.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/hermit-abi/hermit-abi-0.1.5.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/itoa/itoa-0.4.4.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/jwalk/jwalk-0.4.0.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/lazy_static/lazy_static-1.4.0.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/libc/libc-0.2.66.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/memoffset/memoffset-0.5.3.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/num_cpus/num_cpus-1.11.1.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/ppv-lite86/ppv-lite86-0.2.6.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/proc-macro2/proc-macro2-1.0.6.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/quote/quote-1.0.2.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/rand/rand-0.7.2.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/rand_chacha/rand_chacha-0.2.1.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/rand_core/rand_core-0.5.1.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/rand_hc/rand_hc-0.2.0.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/rayon/rayon-1.3.0.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/rayon-core/rayon-core-1.7.0.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/redox_syscall/redox_syscall-0.1.56.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/remove_dir_all/remove_dir_all-0.5.2.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/rustc-demangle/rustc-demangle-0.1.16.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/rustc_version/rustc_version-0.2.3.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/ryu/ryu-1.0.2.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/scopeguard/scopeguard-1.0.0.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/semver/semver-0.9.0.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/semver-parser/semver-parser-0.7.0.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/serde/serde-1.0.104.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/serde_json/serde_json-1.0.44.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/strsim/strsim-0.8.0.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/syn/syn-1.0.11.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/synstructure/synstructure-0.12.3.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/tempfile/tempfile-3.1.0.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/textwrap/textwrap-0.11.0.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/unicode-width/unicode-width-0.1.7.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/unicode-xid/unicode-xid-0.2.0.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/vec_map/vec_map-0.8.1.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/wasi/wasi-0.7.0.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/winapi/winapi-0.3.8.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/winapi-i686-pc-windows-gnu/winapi-i686-pc-windows-gnu-0.4.0.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/winapi-x86_64-pc-windows-gnu/winapi-x86_64-pc-windows-gnu-0.4.0.crate" +MD5SUM="1d05a94fdb2330b010556695c6cd22f3 \ + 294a49d3c53865fa7ac5d0ce2f5d5735 \ + f44e8d1d2e61974b268852797530ea41 \ + 7f199920cf3b7727341cae8de60ddc45 \ + 4d54da5d6fec11f144464c1a928df3fe \ + 898079c1c795b5aa847169137918c7bc \ + e4c598b78dc5d44154debd564bd89425 \ + 8dc7791342326d4c157c5b1e8a211336 \ + 6799c26a7eacaf8e58d3e45c6c5add89 \ + a470cd1ad90d21544de1cead32c54307 \ + 4a284f5334fc4ce4e5f4969dc98a3ea6 \ + 882dbbc613a93f64c3709b0a2bd0d6dc \ + 135f6d6306e50606f0475ada50c33ce2 \ + 35b5fe40a7aea6dffc28b796e06ea619 \ + 22ed3b5d9a15917e74e09d7f600b1608 \ + 17208d6f2ad0d920716b2e7ef5e3c75d \ + 7143e7a2ff358eb52c5f7c3b0656685a \ + 70a93b2ff4eb6c23d7119e7f3d241b97 \ + 838338f3d7b79bce56475183ccf76072 \ + bad68d30eb69cbff26eb1eb6adef6994 \ + 5e49f4c3f9076fe30ae207fe951f9195 \ + 82241b59d4b793d862900b62220cf05a \ + 85dccd4e066c6af106413425928bc9c1 \ + de2d3d836fb5c8c6897f2b4e16b65d29 \ + a2e69999db212f31024f21ae7a62ccec \ + dfdcc92099e197aa0fbae622636ed40a \ + f81106af37b302860fb0739613488f25 \ + a5143958be2dfd4f34d4634973c12da2 \ + d0354329449c69e80f77d2c1d9c51cc6 \ + fba3b040a55c01be7376d3dd5c4d4920 \ + 36ccbe3ad01b8cdf8ae1f0e28568eae5 \ + 72471699c92a9ef34d491f1375fc0fa7 \ + c7844b2d8aa3eb6e3e0e046b001f99ca \ + 7c4bfd315ee9de1c1b2f2d56163567cf \ + abc56a3d9aec66b68805f01795de7de8 \ + ad271964ee0641ce512d5ca5ac4f5b41 \ + 254edb578c297247938fb9a5ac8955a5 \ + 156a171385b476b5a63459398419c803 \ + a0f55fda89c0f97784edb18f4c253a49 \ + b269356e8646f3184a0e8d52a58cee69 \ + 85b5b8dfdd530231acb56c39a5f6d275 \ + 0e3401322d8d9c7fa6a93064c9e47669 \ + 8dc2aa474c2cba342120ade9e98de066 \ + 526f5ebac8d794185afbc71959c5c968 \ + 94136c77f70313d3162e031638fc67ed \ + 4d101ab24d14c54937c5f45ece8fad5f \ + 7254eab0007564ebfaaed3a586c9919b \ + dad6b55e158861f8c4e199d498efe162 \ + 64111c20b69aa1532fb66b70c4660b55 \ + 8b4d8c7b6e3a060d365bc1ad650929fa \ + 41f86328d71bfca707af1cf7fb14460c \ + 34cc94ac4855a569e4885f3366700458 \ + 781d4ccf5d04c98fa02af207a9639249 \ + f087d59daefeeb22d1a1f64f9be3775b \ + bd5f9d9900731be1a4e4df05db231991 \ + bb3ae104a9fa1b31568cc98c920a4653 \ + a8de006fe0c7e373c560dd51599287a8 \ + 0f65fd26370e1fd67c8e8812cabea574 \ + e628ca8adb2b572bffb210f014656b6f \ + 0eedbc32447f40b3045d6de3910b5415 \ + 15f70a2b956755e88b334e7c1af58e97 \ + ce68e06a2cd4f180747cf169fc388a95 \ + db96b50050277bf05a3c68534bbb9586 \ + 09de9d01e7331ff3da11f58be8bef0df" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Benjamin Trigona-Harany" +EMAIL="slackbuilds@jaxartes.net" diff --git a/system/dust/slack-desc b/system/dust/slack-desc new file mode 100644 index 0000000000..6af1cadd5f --- /dev/null +++ b/system/dust/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +dust: dust (more intuitive du) +dust: +dust: dust is a more intuitive version of the du command, showing an +dust: overview of which directories are using disk space. +dust: +dust: +dust: +dust: +dust: +dust: +dust: |