proxmox-backup/Makefile

38 lines
661 B
Makefile
Raw Normal View History

2018-11-30 12:39:40 +00:00
PACKAGE=api-test-server
2018-12-01 12:44:13 +00:00
PKGVER=0.1
2018-11-30 12:39:40 +00:00
PKGREL=1
2018-12-01 12:44:13 +00:00
ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
GITVERSION:=$(shell git rev-parse HEAD)
DEB=${PACKAGE}_${PKGVER}-${PKGREL}_${ARCH}.deb
DESTDIR=
2018-11-30 12:39:40 +00:00
all: target/release/api-test-server
target/release/api-test-server:
cargo build --release
2018-12-01 12:44:13 +00:00
.PHONY: deb
deb ${DEB}:
2018-11-30 12:39:40 +00:00
rm -rf build
# build here to cache results
cargo build --release
2018-12-04 16:53:10 +00:00
make -C www
2018-12-01 10:19:46 +00:00
rsync -a debian Cargo.lock Cargo.toml src www target build
2018-11-30 12:39:40 +00:00
cd build; dpkg-buildpackage -b -us -uc
2018-12-01 12:44:13 +00:00
distclean: clean
2018-11-30 12:39:40 +00:00
clean:
cargo clean
rm -rf *.deb *.buildinfo *.changes build
find . -name '*~' -exec rm {} ';'
2018-12-01 12:44:13 +00:00
.PHONY: dinstall
dinstall: ${DEB}
dpkg -i ${DEB}