aboutsummaryrefslogtreecommitdiff
path: root/development
diff options
context:
space:
mode:
authorfourtysixandtwo <fourtysixandtwo@sliderr.net>2024-01-02 14:53:47 -0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-01-06 08:08:44 +0700
commit12bb975fbcb50366c061c9af1c8116558845dda5 (patch)
tree11f06fba04d0984146395befa3c0e7f7025f1a45 /development
parent730bddd70345571a3dd94d3fcf44c0fe1703a646 (diff)
development/cargo-vendor-filterer: Build fixes.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r--development/cargo-vendor-filterer/cargo-mkvendored.sh16
-rw-r--r--development/cargo-vendor-filterer/cargo-vendor-filterer.SlackBuild10
2 files changed, 17 insertions, 9 deletions
diff --git a/development/cargo-vendor-filterer/cargo-mkvendored.sh b/development/cargo-vendor-filterer/cargo-mkvendored.sh
index b07ed2897717..cc22854e4f6f 100644
--- a/development/cargo-vendor-filterer/cargo-mkvendored.sh
+++ b/development/cargo-vendor-filterer/cargo-mkvendored.sh
@@ -1,12 +1,16 @@
#!/bin/bash
-# Create $PRGNAM-vendored-sources-$VERSION-$BUILD.tar.xz
+# Create $PRGNAM-vendored-sources-$VERSION-$VSBUILD.tar.xz
# Requires network access, but does not require root privilege.
# Requires that $PRGNAM's REQUIRES need to be installed first (rust16)
# and cargo-vendor-filterer installed to include just the linux deps
#
# Expects to be run within a slackbuild dir with the source archive
# already downloaded.
+#
+# Variables to use in your SlackBuild:
+# VSBUILD # same use as BUILD but for vendored sources
+# VSDIR=/sub/dir/ # (optional) alternate location in src for vendor dir
INFO="$( echo *.info )"
if [ ! -e "$INFO" ]; then
@@ -35,14 +39,14 @@ cd $WORKDIR
mkdir -p cargohome
export CARGO_HOME=$(pwd)/cargohome
-egrep "^BUILD=|^SRCNAM=" $CWD/$SBUILD > sbvars
+egrep "^BUILD=|^VSBUILD=|^VSDIR=|^SRCNAM=" $CWD/$SBUILD > sbvars
source ./sbvars
# if no SRCNAM in slackbuild set to PRGNAM
SRCNAM=${SRCNAM:-$PRGNAM}
tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
-cd $SRCNAM-$VERSION || exit 1
+cd $SRCNAM-$VERSION/$VSDIR || exit 1
if [ ! -e "Cargo.toml" ]; then
echo "No Cargo.toml file in $SRCNAM-$VERSION dir" 1>&2
@@ -122,8 +126,8 @@ EOF
cd -
cd $WORKDIR
-tar cvfJ $CWD/$SRCNAM-vendored-sources-$VERSION-$BUILD.tar.xz \
- $SRCNAM-$VERSION/{vendor,.cargo}
-md5sum $CWD/$SRCNAM-vendored-sources-$VERSION-$BUILD.tar.xz
+tar cvfJ $CWD/$SRCNAM-vendored-sources-$VERSION-$VSBUILD.tar.xz \
+ $SRCNAM-$VERSION/$VSDIR/{vendor,.cargo}
+md5sum $CWD/$SRCNAM-vendored-sources-$VERSION-$VSBUILD.tar.xz
cd $CWD
rm -rf $WORKDIR
diff --git a/development/cargo-vendor-filterer/cargo-vendor-filterer.SlackBuild b/development/cargo-vendor-filterer/cargo-vendor-filterer.SlackBuild
index 2f74acf83940..58e10140f2df 100644
--- a/development/cargo-vendor-filterer/cargo-vendor-filterer.SlackBuild
+++ b/development/cargo-vendor-filterer/cargo-vendor-filterer.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2023 fourtysixandtwo <fourtysixandtwo@sliderr.net>
+# Copyright 2023-2024 fourtysixandtwo <fourtysixandtwo@sliderr.net>
# Copyright 2022 Patrick J. Volkerding, Sebeka, MN, USA
# Copyright 2022 Heinz Wiesinger, Amsterdam, The Netherlands
# All rights reserved.
@@ -24,14 +24,18 @@
# 20230925 46and2: Bump build, changes to mkvendored script.
# 20230927 46and2: 32-bit fix thanks to Eugene Carlson. Min ARCH=i686.
+# 20240102 46and2: modify to use VSBUILD instead of BUILD for vendored sources
+# above requested by Andrew Clemons to avoid CI issues
+# -also added VSDIR option to included script, see cargo-mkvendored.sh
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=cargo-vendor-filterer
VERSION=${VERSION:-0.5.12}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
+VSBUILD=${VSBUILD:-1}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -74,7 +78,7 @@ mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.?z
-tar xvf $CWD/$PRGNAM-vendored-sources-$VERSION-$BUILD.tar.?z
+tar xvf $CWD/$PRGNAM-vendored-sources-$VERSION-$VSBUILD.tar.?z
cd $PRGNAM-$VERSION
chown -R root:root .