diff options
author | Andrew Clemons <andrew.clemons@gmail.com> | 2017-03-30 13:23:17 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-04-01 06:57:07 +0700 |
commit | d398cc64d0fb551f26a4145831d88b9b546fbbab (patch) | |
tree | d6b2038730fbfbc7fe02bf7938353e9321c5d309 /system | |
parent | 0107f5da0ef50f80dc0ddda113c031f4404a5e63 (diff) |
system/vtcol: Updated for version 0.42.2.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r-- | system/vtcol/README | 8 | ||||
-rw-r--r-- | system/vtcol/README.Slackware | 11 | ||||
-rw-r--r-- | system/vtcol/checksums/getopts-cargo-checksum.json.gz (renamed from system/vtcol/getopts-cargo-checksum.json.gz) | bin | 649 -> 649 bytes | |||
-rw-r--r-- | system/vtcol/checksums/libc-cargo-checksum.json.gz (renamed from system/vtcol/libc-cargo-checksum.json.gz) | bin | 4465 -> 4465 bytes | |||
-rw-r--r-- | system/vtcol/vtcol-mkvendortarball.sh | 34 | ||||
-rw-r--r-- | system/vtcol/vtcol.SlackBuild | 42 | ||||
-rw-r--r-- | system/vtcol/vtcol.info | 2 |
7 files changed, 74 insertions, 23 deletions
diff --git a/system/vtcol/README b/system/vtcol/README index 0fe1ded5c3334..a972d6d697107 100644 --- a/system/vtcol/README +++ b/system/vtcol/README @@ -4,3 +4,11 @@ Change the colour scheme of the virtual Linux console. Note: rust is a dependency at build-time, not a runtime dep. + +By default, the slackbuild requires all crate dependencies to be downloaded +individually. Optionally, iff you have cargo-vendor installed, you can create +a "vendored" tarball which contains all the crate dependencies exploded into a +single directory and then compressed together as a tarball. + +The script vtcol-mkvendortarball.sh will generate this for you. The slackbuild +will automatically use this tarball if found in the current directory. diff --git a/system/vtcol/README.Slackware b/system/vtcol/README.Slackware index c563422de87d7..1932afa121e2c 100644 --- a/system/vtcol/README.Slackware +++ b/system/vtcol/README.Slackware @@ -2,13 +2,16 @@ vtcol can be used in /etc/rc.d/rc.local to set the colour scheme at boot: vtcol --scheme solarized_light -It is also possible to add it to your initrd to have the colour scheme set early in the boot process. +It is also possible to add it to your initrd to have the colour scheme set +early in the boot process. Example: kernel=4.4.38 -mkinitrd -c -k "$kernel" -f ext4 -r /dev/disk/by-uuid/<some uuid> -m ext4:<more modules> -u -o /boot/initrd-"$kernel".gz -s -/tmp/initrd-tree-"$kernel" +mkinitrd -c -k "$kernel" -f ext4 -r /dev/disk/by-uuid/<some uuid> \ + -m ext4:<more modules> -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_light' /tmp/initrd-tree-"$kernel"/init -mkinitrd -k "$kernel" -f ext4 -r /dev/disk/by-uuid/<some uuid> -u -o /boot/initrd-"$kernel".gz -s /tmp/initrd-tree-"$kernel" +mkinitrd -k "$kernel" -f ext4 -r /dev/disk/by-uuid/<some 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/checksums/getopts-cargo-checksum.json.gz Binary files differindex 44185f31675bd..44185f31675bd 100644 --- a/system/vtcol/getopts-cargo-checksum.json.gz +++ b/system/vtcol/checksums/getopts-cargo-checksum.json.gz diff --git a/system/vtcol/libc-cargo-checksum.json.gz b/system/vtcol/checksums/libc-cargo-checksum.json.gz Binary files differindex a2958219a65b1..a2958219a65b1 100644 --- a/system/vtcol/libc-cargo-checksum.json.gz +++ b/system/vtcol/checksums/libc-cargo-checksum.json.gz diff --git a/system/vtcol/vtcol-mkvendortarball.sh b/system/vtcol/vtcol-mkvendortarball.sh new file mode 100644 index 0000000000000..50197894f3951 --- /dev/null +++ b/system/vtcol/vtcol-mkvendortarball.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +# Script to build a vendored tarball for vtcol + +# Copyright 2017 Andrew Clemons, Wellington New Zealand +# 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. + +set -e + +PRGNAM=vtcol +VERSION=${VERSION:-0.42.2} + +rm -rf "$PRGNAM-$VERSION" "$PRGNAM-$VERSION-vendor.tar.gz" +tar xvf "$PRGNAM-$VERSION.tar.gz" +cd "$PRGNAM-$VERSION" +cargo vendor +tar cvfz ../"$PRGNAM-$VERSION-vendor.tar.gz" vendor diff --git a/system/vtcol/vtcol.SlackBuild b/system/vtcol/vtcol.SlackBuild index 6c126d3c5fbd8..caaa3fed6a7a1 100644 --- a/system/vtcol/vtcol.SlackBuild +++ b/system/vtcol/vtcol.SlackBuild @@ -24,9 +24,7 @@ PRGNAM=vtcol VERSION=${VERSION:-0.42.2} -VERSION_GETOPTS=${VERSION_GETOPTS:-0.2.14} -VERSION_LIBC=${VERSION_LIBC:-0.2.19} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -70,31 +68,39 @@ replace-with = 'vendored-sources' directory = '$(pwd)/vendor' EOF -mkdir vendor -( - cd vendor - tar -xf $CWD/getopts-$VERSION_GETOPTS.crate - tar -xf $CWD/libc-$VERSION_LIBC.crate +if [ -e $CWD/$PRGNAM-$VERSION-vendor.tar.gz ] ; then + tar xvf $CWD/$PRGNAM-$VERSION-vendor.tar.gz +else + # deps and versions come from Cargo.lock + # cargo vender can be used to generate the checksums + mkdir vendor + ( + cd vendor - mv getopts-$VERSION_GETOPTS getopts - mv libc-$VERSION_LIBC libc + for dependency in getopts=0.2.14 \ + libc=0.2.19 ; do + dep="$(echo "$dependency" | cut -d= -f1)" + ver="$(echo "$dependency" | cut -d= -f2)" - touch getopts/.cargo-ok - touch libc/.cargo-ok + tar xvf $CWD/$dep-$ver.crate - zcat $CWD/getopts-cargo-checksum.json.gz > getopts/.cargo-checksum.json - zcat $CWD/libc-cargo-checksum.json.gz > libc/.cargo-checksum.json -) + mv $dep-$ver $dep -cargo build --release + touch $dep/.cargo-ok + zcat $CWD/checksums/$dep-cargo-checksum.json.gz > $dep/.cargo-checksum.json + done + ) +fi -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 +cargo build --release mkdir -p $PKG/usr/bin/ install -m 755 target/release/vtcol $PKG/usr/bin +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 COPYING doc $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild diff --git a/system/vtcol/vtcol.info b/system/vtcol/vtcol.info index c0eb91337673c..0d752c4c4c9d2 100644 --- a/system/vtcol/vtcol.info +++ b/system/vtcol/vtcol.info @@ -9,6 +9,6 @@ MD5SUM="80091d0507aff4fe8bfb8d82e70a020c \ 604a2edfd52c6e87d8903ef2795da387" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="rust" +REQUIRES="cargo" MAINTAINER="Andrew Clemons" EMAIL="andrew.clemons@gmail.com" |