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)
|
|
|
|
|
2018-12-05 13:38:37 +00:00
|
|
|
export PROXMOX_PKG_VERSION=${PKGVER}
|
|
|
|
export PROXMOX_PKG_RELEASE=${PKGREL}
|
|
|
|
export PROXMOX_PKG_REPOID=${GITVERSION}
|
2018-12-01 12:44:13 +00:00
|
|
|
|
|
|
|
DEB=${PACKAGE}_${PKGVER}-${PKGREL}_${ARCH}.deb
|
|
|
|
|
|
|
|
DESTDIR=
|
2018-11-30 12:39:40 +00:00
|
|
|
|
2018-12-05 13:38:37 +00:00
|
|
|
all:
|
|
|
|
cargo build
|
2018-11-30 12:39:40 +00:00
|
|
|
|
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:
|
2018-12-05 13:38:37 +00:00
|
|
|
make -C www clean
|
2018-11-30 12:39:40 +00:00
|
|
|
cargo clean
|
2018-11-30 16:09:50 +00:00
|
|
|
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}
|