diff options
author | Michael Murphy <mmstick@pm.me> | 2020-01-21 10:40:40 -0700 |
---|---|---|
committer | Aram Drevekenin <aram@poor.dev> | 2020-01-21 18:40:40 +0100 |
commit | f76fbff7c63674d8a6a058a7020769dbe7e69363 (patch) | |
tree | 08b4021ed0cb6fc02c6027bcc8bb1404d098f177 /debian/rules | |
parent | 833577e0b6d1e595303251fb0acf4608b5c85e7b (diff) |
feat(build): Debian packaging support (#124)
* build: Add Makefile for building on Linux with make
* packaging: Add debian packaging to build on Debian platforms
* Define `env CLEAN=0` to prevent from rebuilding sources
* Define `env VENDOR=0` to prevent vendoring of sources
To build in a schroot for bionic:
```
sbuild -d bionic --extra-repository='deb [trusted=yes] http://ppa.launchpad.net/mmstick76/rust/ubuntu bionic main'
```
Replace bionic with whichever Ubuntu release you are building for
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..d16f6b9 --- /dev/null +++ b/debian/rules @@ -0,0 +1,22 @@ +#!/usr/bin/make -f + +export VENDOR ?= 1 +export prefix = /usr +CLEAN ?= 1 + +%: + dh $@ + +override_dh_auto_clean: +ifeq ($(CLEAN),1) + make clean; +endif +ifeq ($(VENDOR),1) + if ! ischroot; then \ + make vendor; \ + rm -rf vendor; \ + fi +endif + +override_dh_auto_build: + env CARGO_HOME="$$(pwd)/target/cargo" dh_auto_build |