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/vtcol/vtcol.SlackBuild | |
parent | 0107f5da0ef50f80dc0ddda113c031f4404a5e63 (diff) |
system/vtcol: Updated for version 0.42.2.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'system/vtcol/vtcol.SlackBuild')
-rw-r--r-- | system/vtcol/vtcol.SlackBuild | 42 |
1 files changed, 24 insertions, 18 deletions
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 |