]> git.proxmox.com Git - pmg-log-tracker.git/blobdiff - Makefile
buildsys: use only one parenthesis style
[pmg-log-tracker.git] / Makefile
index 2aecd42fd0727d584b0134e118333dff82973e8a..199ac5a5674c52a28df0417345047989a3e9f108 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,8 +5,8 @@ PACKAGE=pmg-log-tracker
 
 GITVERSION:=$(shell git rev-parse HEAD)
 
-DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
-DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
+DEB=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_$(DEB_BUILD_ARCH).deb
+DSC=rust-$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc
 
 ifeq ($(BUILD_MODE), release)
 CARGO_BUILD_ARGS += --release
@@ -24,6 +24,7 @@ cargo-build:
 .PHONY: build
 build:
        rm -rf build
+       rm -rf debian/control
        debcargo package \
          --config debian/debcargo.toml \
          --changelog-ready \
@@ -33,7 +34,7 @@ build:
          $(shell dpkg-parsechangelog -l debian/changelog -SVersion | sed -e 's/-.*//')
        rm build/Cargo.lock
        find build/debian -name "*.hint" -delete
-       echo system >build/rust-toolchain
+       cp build/debian/control debian/control
 
 .PHONY: deb
 deb: $(DEB)
@@ -48,17 +49,17 @@ $(DSC): build
        lintian $(DSC)
 
 .PHONY: dinstall
-dinstall: ${DEB}
-       dpkg -i ${DEB}
+dinstall: $(DEB)
+       dpkg -i $(DEB)
 
 .PHONY: upload
-upload: ${DEB} ${DBG_DEB}
-       tar cf - ${DEB} ${DBG_DEB}| ssh repoman@repo.proxmox.com -- upload --product pmg --dist stretch --arch ${DEB_BUILD_ARCH}
+upload: $(DEB) $(DBG_DEB)
+       tar cf - $(DEB) $(DBG_DEB)| ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist bullseye --arch $(DEB_BUILD_ARCH)
 
 .PHONY: distclean
 distclean: clean
 
 .PHONY: clean
 clean:
-       rm -rf *.deb ${PACKAGE}-* *.buildinfo *.changes *.dsc ${PACKAGE}_*.tar.gz
+       rm -rf *.deb $(PACKAGE)-* *.buildinfo *.changes *.dsc rust-$(PACKAGE)_*.tar.?z build/
        find . -name '*~' -exec rm {} ';'