[Slackbuilds-users] Updates - 20240525.1
Ruben Schuller
sb at rbn.im
Sun May 26 21:04:42 UTC 2024
Hi list,
2024-05-25 Willy Sudiarto Raharjo <willysr at slackbuilds.org>:
> network/zdns: Added (DNS Utility).
The README says this is doing an online build, is this allowed now?
Another way would be to upload a tarball (maybe to SBo source archive?)
with the vendored go dependencies. I wrote something like the
following script to create such a tarball - no guarantees though :)
#!/bin/bash
set -e
source changeme.info
TMP=${TMP:-/tmp}
CWD=$(pwd)
mkdir -p $TMP/go
# temporary GOPATH
export GOPATH=$TMP/go
# don't download our own vendored sources (everything with "vendor"
# in url)
DOWNLOAD=$(echo $DOWNLOAD | tr " " "\n" | grep -v vendor | tr "\n" " ")
wget -q --content-disposition $DOWNLOAD
tar xf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
# download dependencies and put them into ./vendor
go mod vendor
# tar up the vendor folder
tar cvzf "${CWD}/${PRGNAM}-${VERSION}-vendor.tar.gz" vendor
# EOF
In the SlackBuild just extract the tarball on top of the sources so
that the "vendor" directory is again where it is supposed to. "go build"
should pick it up automatically.
Cheers
Ruben
More information about the SlackBuilds-users
mailing list