Skip to content

Commit

Permalink
Using cargo deb for packaging + cross compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
dswd committed Feb 20, 2019
1 parent 71a6f70 commit 19ad3ed
Show file tree
Hide file tree
Showing 21 changed files with 476 additions and 959 deletions.
4 changes: 4 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
[target.armv7-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"
objcopy = { path = "arm-linux-gnueabihf-objcopy" }
strip = { path = "arm-linux-gnueabihf-strip" }

[target.arm-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"
objcopy = { path = "arm-linux-gnueabihf-objcopy" }
strip = { path = "arm-linux-gnueabihf-strip" }
16 changes: 16 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,19 @@ lto = false

[profile.test]
lto = false

[package.metadata.deb]
extended-description = """\
VpnCloud is a simple VPN over UDP. It creates a virtual network interface on
the host and forwards all received data via UDP to the destination. VpnCloud
establishes a fully-meshed VPN network in a peer-to-peer manner. It can work
on TUN devices (IP based) and TAP devices (Ethernet based)."""
license-file = ["LICENSE.md", "1"]
changelog = "assets/changelog.txt"
section = "net"
assets = [
["target/release/vpncloud", "/usr/bin/vpncloud", "755"],
["assets/example.net.disabled", "/etc/vpncloud/example.net.disabled", "600"],
["assets/vpncloud@.service", "/lib/systemd/system/vpncloud@.service", "644"],
["target/vpncloud.1.gz", "/usr/share/man/man1/vpncloud.1.gz", "644"]
]
34 changes: 25 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,46 @@ somewhat stable state. VpnCloud features the following functionality:

### Installing

##### Compiling from source
Prerequisites: Git, [Cargo](https://www.rust-lang.org/install.html),
Full C build environment including autotools (for building libsodium)
#### Compiling from source
Prerequisites: Git, [Cargo](https://www.rust-lang.org/install.html), Ronn

The checked-out code can be compiled with ``cargo build`` or ``cargo build --release`` (release version). The binary could then be found in `target/release/vpncloud`.

The checked-out code can be compiled with ``make``.
The binary could then be found in `target/release/vpncloud`.
The tests can be run via ``cargo test``.


##### Debian / Ubuntu
#### Cross-Compiling
This software can be cross-compiled for a number of different architectures.
Please also see the [extended rust cross compilation docs](https://github.com/japaric/rust-cross).

##### ARMv7 (e.g. Raspberry Pi)
1. Install the Cargo target

$> rustup target add armv7-unknown-linux-gnueabihf

2. Install the required build environment (on Ubuntu)

$> sudo apt-get install -qq gcc-arm-linux-gnueabihf

3. Build the software

$> cargo build --release --target=armv7-unknown-linux-gnueabihf

#### Debian / Ubuntu
Deb packages for each release can be found in the
[releases](https://github.com/dswd/vpncloud/releases) section. Currently only
packages for amd64 are available (I am accepting help on building and packaging
for other platforms).

Debian packages can be built using [cargo-deb](https://github.com/mmstick/cargo-deb): ``cargo deb``


##### Arch Linux (AUR)
#### Arch Linux (AUR)
There is a [VpnCloud package for Arch Linux](https://aur.archlinux.org/packages/vpncloud/)
thanks to Oscar Rainford (fourbytes).


### Contributions welcome

There are several areas in which still some work has to be done and where
contributions are very welcome:

Expand All @@ -72,7 +89,6 @@ contributions are very welcome:


### Semantic Versioning

This project uses [semantic versioning](http://semver.org). Currently that means
that everything can change between versions before 1.0 is finally released.
However I am considering to release 1.0 soon.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 19ad3ed

Please sign in to comment.