1
0
mirror of https://github.com/dswd/vpncloud.git synced 2025-01-15 17:11:05 +00:00

37 lines
1.0 KiB
Bash
Raw Normal View History

2020-04-17 22:06:09 +02:00
#!/bin/bash
set -e
2021-02-22 16:19:19 +01:00
TOOLCHAIN=$(grep -e '^toolchain =' Cargo.toml | sed -e 's/toolchain = "\(.*\)"/\1/')
VERSION=$(grep -e '^version =' Cargo.toml | sed -e 's/version = "\(.*\)"/\1/')
DEB_VERSION=$(echo "$VERSION" | sed -e 's/-/~/g')
ln -s asm-generic/ /usr/include/asm
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain ${TOOLCHAIN}
2020-04-17 22:06:09 +02:00
source $HOME/.cargo/env
rustup target add i686-unknown-linux-gnu
2021-12-19 12:40:43 +01:00
rustup target add armv5te-unknown-linux-gnueabi
2020-04-17 22:06:09 +02:00
rustup target add armv7-unknown-linux-gnueabihf
rustup target add aarch64-unknown-linux-gnu
cargo install cargo-deb
mkdir dist
2021-02-22 16:19:19 +01:00
build_deb() {
ARCH=$1
TARGET=$2
cargo deb --target ${TARGET}
cp target/${TARGET}/debian/vpncloud_${DEB_VERSION}_${ARCH}.deb dist/vpncloud_${DEB_VERSION}_${ARCH}.deb
}
2020-04-17 22:06:09 +02:00
cargo deb
2020-10-09 22:46:44 +02:00
cp target/debian/vpncloud_${DEB_VERSION}_amd64.deb dist/vpncloud_${DEB_VERSION}_amd64.deb
2020-04-17 22:06:09 +02:00
2021-02-22 16:19:19 +01:00
build_deb i386 i686-unknown-linux-gnu
build_deb armhf armv7-unknown-linux-gnueabihf
2021-12-19 12:40:43 +01:00
build_deb armel armv5te-unknown-linux-gnueabi
2021-02-22 16:19:19 +01:00
build_deb arm64 aarch64-unknown-linux-gnu