]> git.proxmox.com Git - pve-installer.git/commitdiff
buildsys: use better defined clean target
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 19 Jun 2023 12:54:53 +0000 (14:54 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 19 Jun 2023 13:08:03 +0000 (15:08 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Makefile

index 54d2d207897ee542f1d418407452a8f7ae3421c7..dce62f1200dc907c0761410fe19565a231c558d0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,8 @@
 include /usr/share/dpkg/default.mk
 
 PACKAGE = proxmox-installer
+BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
+
 DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
 
 CARGO ?= cargo
@@ -22,14 +24,37 @@ COMPILED_BINS := \
 
 all:
 
+$(BUILDDIR):
+       rm -rf $@ $@.tmp; mkdir $@.tmp
+       cp -a \
+         Cargo.toml \
+         Makefile \
+         Proxmox/ \
+         Xdefaults \
+         banner/ \
+         checktime \
+         country.pl \
+         fake-start-stop-daemon \
+         html/ \
+         interfaces \
+         policy-disable-rc.d \
+         proxinstall \
+         proxmox-low-level-installer \
+         proxmox-tui-installer/ \
+         spice-vdagent.sh \
+         unconfigured.sh \
+         xinitrc \
+         $@.tmp
+       cp -a debian $@.tmp/
+       mv $@.tmp $@
+
 country.dat: country.pl
        ./country.pl > country.dat.tmp
        mv country.dat.tmp country.dat
 
 deb: $(DEB)
-$(DEB): $(INSTALLER_SOURCES)
-       rsync --exclude='test*.img' -a * build
-       cd build; dpkg-buildpackage -b -us -uc
+$(DEB): $(BUILDDIR)
+       cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
        lintian $(DEB)
 
 test-$(DEB): $(INSTALLER_SOURCES)