mirror of https://github.com/dswd/vpncloud.git
Some snap code
This commit is contained in:
parent
ad2e2014eb
commit
f22f30d1ce
|
@ -0,0 +1,21 @@
|
||||||
|
name: vpncloud
|
||||||
|
version: 2.1.0
|
||||||
|
summary: Peer-to-peer VPN
|
||||||
|
description: |
|
||||||
|
VpnCloud is a high performance peer-to-peer mesh VPN over UDP supporting strong encryption,
|
||||||
|
NAT traversal and a simple configuration. It establishes a fully-meshed self-healing VPN
|
||||||
|
network in a peer-to-peer manner with strong end-to-end encryption based on elliptic curve
|
||||||
|
keys and AES-256. VpnCloud creates a virtual network interface on the host and forwards all
|
||||||
|
received data via UDP to the destination. It can work on TUN devices (IP based) and TAP
|
||||||
|
devices (Ethernet based).
|
||||||
|
|
||||||
|
confinement: devmode
|
||||||
|
|
||||||
|
parts:
|
||||||
|
vpncloud:
|
||||||
|
plugin: dump
|
||||||
|
source: vpncloud_${SNAPCRAFT_PROJECT_VERSION}_amd64.deb
|
||||||
|
|
||||||
|
apps:
|
||||||
|
vpncloud:
|
||||||
|
command: usr/bin/vpncloud
|
|
@ -0,0 +1,3 @@
|
||||||
|
FROM snapcore/snapcraft:stable
|
||||||
|
|
||||||
|
RUN useradd -ms /bin/bash user
|
|
@ -24,7 +24,7 @@ else
|
||||||
RPM_VERSION="$VERSION-1"
|
RPM_VERSION="$VERSION-1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p cache/{rpm,deb}
|
mkdir -p cache/{rpm,deb,snap}
|
||||||
CACHE=$(pwd)/cache
|
CACHE=$(pwd)/cache
|
||||||
|
|
||||||
mkdir -p ../dist
|
mkdir -p ../dist
|
||||||
|
@ -32,24 +32,44 @@ mkdir -p ../dist
|
||||||
docker build --rm -f=Dockerfile-deb -t vpncloud-builder-deb .
|
docker build --rm -f=Dockerfile-deb -t vpncloud-builder-deb .
|
||||||
|
|
||||||
# x86_64 deb
|
# x86_64 deb
|
||||||
docker_cmd deb 'cd code && cargo deb'
|
if ! [ -f ../dist/vpncloud_${DEB_VERSION}_amd64.deb ]; then
|
||||||
cp $CACHE/deb/target/debian/vpncloud_${DEB_VERSION}_amd64.deb ../dist/vpncloud_${DEB_VERSION}_amd64.deb
|
docker_cmd deb 'cd code && cargo deb'
|
||||||
|
cp $CACHE/deb/target/debian/vpncloud_${DEB_VERSION}_amd64.deb ../dist/vpncloud_${DEB_VERSION}_amd64.deb
|
||||||
|
fi
|
||||||
|
|
||||||
# i386 deb
|
# i386 deb
|
||||||
docker_cmd deb 'cd code && cargo deb --target i686-unknown-linux-gnu'
|
if ! [ -f ../dist/vpncloud_${DEB_VERSION}_i386.deb ]; then
|
||||||
cp $CACHE/deb/target/i686-unknown-linux-gnu/debian/vpncloud_${DEB_VERSION}_i386.deb ../dist/vpncloud_${DEB_VERSION}_i386.deb
|
docker_cmd deb 'cd code && cargo deb --target i686-unknown-linux-gnu'
|
||||||
|
cp $CACHE/deb/target/i686-unknown-linux-gnu/debian/vpncloud_${DEB_VERSION}_i386.deb ../dist/vpncloud_${DEB_VERSION}_i386.deb
|
||||||
|
fi
|
||||||
|
|
||||||
# arm7hf deb
|
# arm7hf deb
|
||||||
docker_cmd deb 'cd code && cargo deb --target armv7-unknown-linux-gnueabihf'
|
if ! [ -f ../dist/vpncloud_${DEB_VERSION}_armhf.deb ]; then
|
||||||
cp $CACHE/deb/target/armv7-unknown-linux-gnueabihf/debian/vpncloud_${DEB_VERSION}_armhf.deb ../dist/vpncloud_${DEB_VERSION}_armhf.deb
|
docker_cmd deb 'cd code && cargo deb --target armv7-unknown-linux-gnueabihf'
|
||||||
|
cp $CACHE/deb/target/armv7-unknown-linux-gnueabihf/debian/vpncloud_${DEB_VERSION}_armhf.deb ../dist/vpncloud_${DEB_VERSION}_armhf.deb
|
||||||
|
fi
|
||||||
|
|
||||||
# aarch64 deb
|
# aarch64 deb
|
||||||
docker_cmd deb 'cd code && cargo deb --target aarch64-unknown-linux-gnu'
|
if ! [ -f ../dist/vpncloud_${DEB_VERSION}_arm64.deb ]; then
|
||||||
cp $CACHE/deb/target/aarch64-unknown-linux-gnu/debian/vpncloud_${DEB_VERSION}_arm64.deb ../dist/vpncloud_${DEB_VERSION}_arm64.deb
|
docker_cmd deb 'cd code && cargo deb --target aarch64-unknown-linux-gnu'
|
||||||
|
cp $CACHE/deb/target/aarch64-unknown-linux-gnu/debian/vpncloud_${DEB_VERSION}_arm64.deb ../dist/vpncloud_${DEB_VERSION}_arm64.deb
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
docker build --rm -f=Dockerfile-rpm -t vpncloud-builder-rpm .
|
docker build --rm -f=Dockerfile-rpm -t vpncloud-builder-rpm .
|
||||||
|
|
||||||
# x86_64 rpm
|
# x86_64 rpm
|
||||||
docker_cmd rpm 'cd code && cargo rpm build'
|
if ! [ -f ../dist/vpncloud_${RPM_VERSION}.x86_64.rpm ]; then
|
||||||
cp $CACHE/rpm/target/release/rpmbuild/RPMS/x86_64/vpncloud-${RPM_VERSION}.x86_64.rpm ../dist/vpncloud_${RPM_VERSION}.x86_64.rpm
|
docker_cmd rpm 'cd code && cargo rpm build'
|
||||||
|
cp $CACHE/rpm/target/release/rpmbuild/RPMS/x86_64/vpncloud-${RPM_VERSION}.x86_64.rpm ../dist/vpncloud_${RPM_VERSION}.x86_64.rpm
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
docker build --rm -f=Dockerfile-snap -t vpncloud-builder-snap .
|
||||||
|
|
||||||
|
# x86_64 snap
|
||||||
|
if ! [ -f ../dist/vpncloud_${DEB_VERSION}_amd64.snap ]; then
|
||||||
|
cp ../assets/snapcraft.yaml ../dist/vpncloud_${DEB_VERSION}_amd64.deb $CACHE/snap
|
||||||
|
docker run -v "$CACHE/snap":/build -w /build vpncloud-builder-snap bash -c 'snapcraft; chown -R user: *'
|
||||||
|
cp $CACHE/snap/vpncloud_${DEB_VERSION}_amd64.snap ../dist/vpncloud_${DEB_VERSION}_amd64.snap
|
||||||
|
fi
|
Loading…
Reference in New Issue