proxmox-backup/Makefile

40 lines
720 B
Makefile
Raw Normal View History

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