diff --git a/Makefile b/Makefile index 36917508..3895e187 100644 --- a/Makefile +++ b/Makefile @@ -5,15 +5,16 @@ PKGREL=1 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) GITVERSION:=$(shell git rev-parse HEAD) +export PROXMOX_PKG_VERSION=${PKGVER} +export PROXMOX_PKG_RELEASE=${PKGREL} +export PROXMOX_PKG_REPOID=${GITVERSION} DEB=${PACKAGE}_${PKGVER}-${PKGREL}_${ARCH}.deb DESTDIR= -all: target/release/api-test-server - -target/release/api-test-server: - cargo build --release +all: + cargo build .PHONY: deb deb ${DEB}: @@ -28,6 +29,7 @@ deb ${DEB}: distclean: clean clean: + make -C www clean cargo clean rm -rf *.deb *.buildinfo *.changes build find . -name '*~' -exec rm {} ';' diff --git a/debian/rules b/debian/rules index 8906a6fa..90c27649 100755 --- a/debian/rules +++ b/debian/rules @@ -7,6 +7,3 @@ %: dh $@ --with=systemd - -override_dh_auto_build: - cargo build --release diff --git a/src/api3.rs b/src/api3.rs index db719f0d..8dd76ec7 100644 --- a/src/api3.rs +++ b/src/api3.rs @@ -24,16 +24,21 @@ fn test_sync_api_handler(param: Value, _info: &ApiMethod) -> Result Result { - Ok(json!({ - "version": "1.0", - "release": "1", - "repoid": "AAAA" + "version": PROXMOX_PKG_VERSION, + "release": PROXMOX_PKG_RELEASE, + "repoid": PROXMOX_PKG_REPOID })) } + pub fn router() -> Router { let route4 = Router::new() diff --git a/www/Makefile b/www/Makefile index ec41e3f8..d976279e 100644 --- a/www/Makefile +++ b/www/Makefile @@ -14,5 +14,5 @@ proxmox-backup-gui.js: ${JSSRC} .PHONY: clean clean: find . -name '*~' -exec rm {} ';' - rm -r proxmox-backup-gui.js + rm -f proxmox-backup-gui.js