trifid/packages/void_amd64_tfclient/build.sh

27 lines
700 B
Bash
Raw Normal View History

2023-06-26 03:27:11 +00:00
#!/bin/bash
set -e
cd $1 || exit
cd tfclient || exit
echo "Building for release, v$2_$3 (+static) (--target x86_64-unknown-musl)"
cargo build --release --target x86_64-unknown-linux-musl
2023-06-27 13:50:57 +00:00
cd ../packages/void_amd64_tfclient || 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
echo "Copying tfclient binary"
cp ../../target/release/tfclient work/usr/bin/tfclient
chmod 755 work/usr/bin/tfclient
cp -r tfclient work/etc/sv
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 "tfclient-$2_$3" -s "An open-source Rust Defined Networking client" work