- # build here to cache results
- cargo build --release
- $(MAKE) -C www
- rsync -a debian Cargo.toml src www etc target build
- cd build; dpkg-buildpackage -b -us -uc
+ rm debian/control
+ debcargo package --config debian/debcargo.toml --changelog-ready --no-overlay-write-back --directory build proxmox-backup $(shell dpkg-parsechangelog -l debian/changelog -SVersion | sed -e 's/-.*//')
+ sed -e '1,/^$$/ ! d' build/debian/control > build/debian/control.src
+ cat build/debian/control.src build/debian/control.in > build/debian/control
+ rm build/debian/control.in build/debian/control.src
+ cp build/debian/control debian/control
+ rm build/Cargo.lock
+ find build/debian -name "*.hint" -delete
+ $(foreach i,$(SUBDIRS), \
+ $(MAKE) -C build/$(i) clean ;)
+
+
+.PHONY: proxmox-backup-docs
+$(DOC_DEB) $(DEBS): proxmox-backup-docs
+proxmox-backup-docs: build
+ cd build; dpkg-buildpackage -b -us -uc --no-pre-clean
+ lintian $(DOC_DEB)
+
+# copy the local target/ dir as a build-cache
+.PHONY: deb
+$(DEBS): deb
+deb: build
+ cd build; dpkg-buildpackage -b -us -uc --no-pre-clean --build-profiles=nodoc
+ lintian $(DEBS)