Files
bandwhich/debian/rules
Michael Murphy f76fbff7c6 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
2020-01-21 18:40:40 +01:00

23 lines
310 B
Makefile
Executable File

#!/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