+include /usr/share/dpkg/default.mk
+
+PACKAGE := proxmox-websocket-tunnel
+ARCH := $(DEB_BUILD_ARCH)
+
.PHONY: all
all: check
--config "$(PWD)/debian/debcargo.toml" \
--changelog-ready \
--no-overlay-write-back \
- --directory "$(PWD)/build/proxmox-websocket-tunnel" \
- "proxmox-websocket-tunnel" \
+ --directory "$(PWD)/build/$(PACKAGE)" \
+ "$(PACKAGE)" \
"$$(dpkg-parsechangelog -l "debian/changelog" -SVersion | sed -e 's/-.*//')"
echo system >build/rust-toolchain
- rm -f build/proxmox-websocket-tunnel/Cargo.lock
- find build/proxmox-websocket-tunnel/debian -name '*.hint' -delete
- cp build/proxmox-websocket-tunnel/debian/control debian/control
+ rm -f build/$(PACKAGE)/Cargo.lock
+ find build/$(PACKAGE)/debian -name '*.hint' -delete
+ cp build/$(PACKAGE)/debian/control debian/control
.PHONY: dsc
dsc: build
- (cd build/proxmox-websocket-tunnel && dpkg-buildpackage -S -uc -us)
+ (cd build/$(PACKAGE) && dpkg-buildpackage -S -uc -us)
lintian build/*.dsc
.PHONY: deb
deb: build
- (cd build/proxmox-websocket-tunnel && dpkg-buildpackage -b -uc -us)
+ (cd build/$(PACKAGE) && dpkg-buildpackage -b -uc -us)
lintian build/*.deb
.PHONY: clean
rm -rf build *.deb *.buildinfo *.changes *.orig.tar.gz
cargo clean
+.PHONY: upload
+upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
upload: deb
cd build; \
- dcmd --deb rust-proxmox-websocket-tunnel_*.changes \
+ dcmd --deb rust-$(PACKAGE)_*.changes \
| grep -v '.changes$$' \
| tar -cf- -T- \
- | ssh -X repoman@repo.proxmox.com upload --product pve --dist bullseye
+ | ssh -X repoman@repo.proxmox.com upload --product pve --dist $(UPLOAD_DIST)