add Makefile to build debian package

This commit is contained in:
Dietmar Maurer
2018-11-30 13:39:40 +01:00
parent e3871182c5
commit de7798142a
6 changed files with 55 additions and 0 deletions

21
Makefile Normal file
View File

@ -0,0 +1,21 @@
VERSION=0.1
PACKAGE=api-test-server
PKGREL=1
all: target/release/api-test-server
target/release/api-test-server:
cargo build --release
deb:
rm -rf build
# build here to cache results
cargo build --release
rsync -a debian Cargo.lock Cargo.toml src target build
cd build; dpkg-buildpackage -b -us -uc
clean:
cargo clean