From 6eb36ac506615cd1b5ae8f13cc99b529157f6be5 Mon Sep 17 00:00:00 2001 From: Andrew Clemons Date: Thu, 19 Jan 2017 12:35:03 +0000 Subject: system/vtcol: Updated to work in offline mode. Signed-off-by: David Spencer --- system/vtcol/README | 2 +- system/vtcol/README.Slackware | 2 +- system/vtcol/getopts-cargo-checksum.json.gz | Bin 0 -> 649 bytes system/vtcol/libc-cargo-checksum.json.gz | Bin 0 -> 4465 bytes system/vtcol/vtcol.SlackBuild | 43 +++++++++++++++++++++------- system/vtcol/vtcol.info | 8 ++++-- 6 files changed, 40 insertions(+), 15 deletions(-) create mode 100644 system/vtcol/getopts-cargo-checksum.json.gz create mode 100644 system/vtcol/libc-cargo-checksum.json.gz (limited to 'system') diff --git a/system/vtcol/README b/system/vtcol/README index 3deb84c24514..0fe1ded5c333 100644 --- a/system/vtcol/README +++ b/system/vtcol/README @@ -3,4 +3,4 @@ vtcol - Colour schemes for the Linux console Change the colour scheme of the virtual Linux console. Note: -rust is a build-time dependency at build-time, not a runtime dep. +rust is a dependency at build-time, not a runtime dep. diff --git a/system/vtcol/README.Slackware b/system/vtcol/README.Slackware index 52164e358ae0..c563422de87d 100644 --- a/system/vtcol/README.Slackware +++ b/system/vtcol/README.Slackware @@ -10,5 +10,5 @@ kernel=4.4.38 mkinitrd -c -k "$kernel" -f ext4 -r /dev/disk/by-uuid/ -m ext4: -u -o /boot/initrd-"$kernel".gz -s /tmp/initrd-tree-"$kernel" install -m 755 /usr/bin/vtcol "/tmp/initrd-tree-$kernel/bin/vtcol" -sed -i '159i \/bin\/vtcol --scheme solarized_dark' /tmp/initrd-tree-"$kernel"/init +sed -i '159i \/bin\/vtcol --scheme solarized_light' /tmp/initrd-tree-"$kernel"/init mkinitrd -k "$kernel" -f ext4 -r /dev/disk/by-uuid/ -u -o /boot/initrd-"$kernel".gz -s /tmp/initrd-tree-"$kernel" diff --git a/system/vtcol/getopts-cargo-checksum.json.gz b/system/vtcol/getopts-cargo-checksum.json.gz new file mode 100644 index 000000000000..44185f31675b Binary files /dev/null and b/system/vtcol/getopts-cargo-checksum.json.gz differ diff --git a/system/vtcol/libc-cargo-checksum.json.gz b/system/vtcol/libc-cargo-checksum.json.gz new file mode 100644 index 000000000000..a2958219a65b Binary files /dev/null and b/system/vtcol/libc-cargo-checksum.json.gz differ diff --git a/system/vtcol/vtcol.SlackBuild b/system/vtcol/vtcol.SlackBuild index 60c3f1532177..fa1ba66b2018 100644 --- a/system/vtcol/vtcol.SlackBuild +++ b/system/vtcol/vtcol.SlackBuild @@ -24,7 +24,9 @@ PRGNAM=vtcol GITREV=${GITREV:-3592d70fd18686ca984db32204e6dcccd05731eb} -VERSION=${VERSION:-git3592d70} +VERSION=${VERSION:-git$(echo "$GITREV" | sed 's/^\(.\{7\}\).*$/\1/')} +VERSION_GETOPTS=${VERSION_GETOPTS:-0.2.14} +VERSION_LIBC=${VERSION_LIBC:-0.2.19} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -41,16 +43,6 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i586" ]; then - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - LIBDIRSUFFIX="64" -else - LIBDIRSUFFIX="" -fi - set -e rm -rf $PKG @@ -68,6 +60,35 @@ find -L . \ zcat $CWD/0001-Fix-building-against-current-rust-versions.patch.gz | patch -p1 +# 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 + +mkdir vendor +( + cd vendor + tar -xf $CWD/getopts-$VERSION_GETOPTS.crate + tar -xf $CWD/libc-$VERSION_LIBC.crate + + mv getopts-$VERSION_GETOPTS getopts + mv libc-$VERSION_LIBC libc + + touch getopts/.cargo-ok + touch libc/.cargo-ok + + zcat $CWD/getopts-cargo-checksum.json.gz > getopts/.cargo-checksum.json + zcat $CWD/libc-cargo-checksum.json.gz > libc/.cargo-checksum.json +) + cargo build --release find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ diff --git a/system/vtcol/vtcol.info b/system/vtcol/vtcol.info index d3d1e2e259e3..3c60ffdb737a 100644 --- a/system/vtcol/vtcol.info +++ b/system/vtcol/vtcol.info @@ -1,8 +1,12 @@ PRGNAM="vtcol" VERSION="git3592d70" HOMEPAGE="https://github.com/phi-gamma/vtcol" -DOWNLOAD="https://github.com/phi-gamma/vtcol/archive/3592d70fd18686ca984db32204e6dcccd05731eb/vtcol-3592d70fd18686ca984db32204e6dcccd05731eb.tar.gz" -MD5SUM="aa6837ebd9cd98ef49ddf87f6489f802" +DOWNLOAD="https://github.com/phi-gamma/vtcol/archive/3592d70fd18686ca984db32204e6dcccd05731eb/vtcol-3592d70fd18686ca984db32204e6dcccd05731eb.tar.gz \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/getopts/getopts-0.2.14.crate \ + https://crates-io.s3-us-west-1.amazonaws.com/crates/libc/libc-0.2.19.crate" +MD5SUM="aa6837ebd9cd98ef49ddf87f6489f802 \ + 6d59f4fa29cab7bcc7ea7e0c8f96e27d \ + 604a2edfd52c6e87d8903ef2795da387" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="rust" -- cgit v1.2.3