2023-06-26 03:27:11 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
cd $1 || exit
|
2023-06-26 16:38:19 +00:00
|
|
|
cd tfcli || exit
|
2023-06-26 03:27:11 +00:00
|
|
|
|
2023-07-19 02:03:25 +00:00
|
|
|
echo "Building for release, v$2_$3 (+static) (--target x86_64-unknown-gnu)"
|
|
|
|
cargo build --release
|
2023-06-26 03:27:11 +00:00
|
|
|
|
2023-06-27 13:50:57 +00:00
|
|
|
cd ../packages/void_amd64_tfcli || exit
|
2023-06-26 03:27:11 +00:00
|
|
|
|
|
|
|
echo "Creating workdir"
|
|
|
|
rm -rf work
|
|
|
|
mkdir work
|
|
|
|
mkdir -p work/usr/bin
|
|
|
|
mkdir -p work/etc/sv
|
|
|
|
|
2023-06-26 16:38:19 +00:00
|
|
|
echo "Copying tfcli binary"
|
2023-06-26 03:27:11 +00:00
|
|
|
|
2023-07-19 02:03:25 +00:00
|
|
|
cp ../../target/release/tfcli work/usr/bin/tfcli
|
2023-06-26 16:38:19 +00:00
|
|
|
chmod 755 work/usr/bin/tfcli
|
2023-06-26 03:27:11 +00:00
|
|
|
|
|
|
|
echo "Building XBPS package"
|
|
|
|
|
2023-06-27 13:50:57 +00:00
|
|
|
xbps-create -A x86_64 -B trifid-build -H https://hub.e3t.cc/~core/trifid -l GPL-3.0-or-later -m "c0repwn3r <core@e3t.cc>" -n "tfcli-$2_$3" -s "A command-line client for managing trifid-api servers" work
|