]> git.proxmox.com Git - pve-lxc-syscalld.git/commitdiff
temp
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 21 Jan 2020 14:51:42 +0000 (15:51 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 21 Jan 2020 15:01:44 +0000 (16:01 +0100)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Makefile
debian/changelog
debian/debcargo.toml

index 839ea5ae5d97ea0346f1f36048ce64ba33e53734..04e54af81f484b027d0462a85aa1cefd3affcbea 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -19,9 +19,8 @@ SERVICE_BIN := pve-lxc-syscalld
 COMPILED_BINS := \
        $(addprefix $(COMPILEDIR)/,$(SERVICE_BIN))
 
-DEB=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_$(DEB_HOST_ARCH).deb
-DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc
-BUILDSRC := $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
+DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
+DSC=rust-$(PACKAGE)_$(DEB_VERSION).dsc
 
 all: cargo-build $(SUBDIRS)
 
@@ -46,33 +45,38 @@ install: $(COMPILED_BINS)
        $(foreach i,$(SERVICE_BIN), \
            install -m755 $(COMPILEDIR)/$(i) $(DESTDIR)$(LIBEXECDIR)/proxmox-backup/ ;)
 
-# always re-create this dir
-# but also copy the local target/ dir as a build-cache
-.PHONY: $(BUILDSRC)
-$(BUILDSRC):
-       rm -rf $(BUILDSRC)
-       cargo build --release
-       rsync -a debian Makefile defines.mk Cargo.toml Cargo.lock \
-           src $(SUBDIRS) \
-           target \
-           $(BUILDSRC)/
+.PHONY: build
+build:
+       rm -rf build
+       debcargo package \
+         --config debian/debcargo.toml \
+         --changelog-ready \
+         --no-overlay-write-back \
+         --directory build \
+         pve-lxc-syscalld \
+         $(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
+       rm build/Cargo.lock
+       find build/debian -name "*.hint" -delete
        $(foreach i,$(SUBDIRS), \
-           $(MAKE) -C $(BUILDSRC)/$(i) clean ;)
+           $(MAKE) -C build/$(i) clean ;)
 
 .PHONY: deb
-deb: $(DEB)
-$(DEB): $(BUILDSRC)
-       cd $(BUILDSRC); dpkg-buildpackage -b -us -uc --no-pre-clean
-       lintian $(DEB)
+deb: $(DEBS)
+$(DEBS): build
+       cd build; dpkg-buildpackage -b -us -uc --no-pre-clean --build-profiles=nodoc
+       lintian $(DEBS)
 
 .PHONY: dsc
 dsc: $(DSC)
-$(DSC): $(BUILDSRC)
-       cd $(BUILDSRC); dpkg-buildpackage -S -us -uc -d -nc
+$(DSC): build
+       cd build; dpkg-buildpackage -S -us -uc -d -nc
        lintian $(DSC)
 
 clean:
        $(foreach i,$(SUBDIRS), \
            $(MAKE) -C $(i) clean ;)
        cargo clean
-       rm -rf *.deb *.dsc *.tar.gz *.buildinfo *.changes $(BUILDSRC)
+       rm -rf *.deb *.dsc *.tar.gz *.buildinfo *.changes build
index 1cd8c85ac3bd1c66e66048ce4408b3cc5c310cde..852a655e1bd3cdaa2d90cbabb379b7ac413109ba 100644 (file)
@@ -1,4 +1,4 @@
-pve-lxc-syscalld (0.1-1) pve; urgency=medium
+rust-pve-lxc-syscalld (0.1.0-1) pve; urgency=medium
 
   * initial release
 
index 89bb3684e350343e1ef7eb1bedcf3448cb7885f0..597238f4b9a2294a2a4abcf20009fd8b85f24b06 100644 (file)
@@ -1,5 +1,5 @@
 overlay = "."
-crate_src_path = "."
+crate_src_path = ".."
 
 [source]
 maintainer = "Proxmox Support Team <support@proxmox.com>"