]> git.proxmox.com Git - zfsonlinux.git/commitdiff
buildsys: generate clean orig source tarball for DSC
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 20 May 2023 17:54:10 +0000 (19:54 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 20 May 2023 18:37:16 +0000 (20:37 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Makefile

index a86644abc9cb50eca5261d7a387e313114c37e18..eb753718b80eff70494dae13735a759ccdbdc00c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@ include /usr/share/dpkg/default.mk
 
 ZFSDIR=zfs-linux_$(DEB_VERSION_UPSTREAM)
 ZFSSRC=upstream
+ORIG_SRC_TAR=$(ZFSDIR).orig.tar.gz
 
 ZFS_DEB1= libnvpair3linux_$(DEB_VERSION)_amd64.deb
 
@@ -56,7 +57,10 @@ $(ZFS_DEB1): $(ZFSDIR)
        cd $(ZFSDIR); dpkg-buildpackage -b -uc -us
        lintian $(DEBS)
 
-$(ZFS_DSC): $(ZFSDIR)
+$(ORIG_SRC_TAR): $(ZFSDIR)
+       tar czf $(ORIG_SRC_TAR) --exclude="$(ZFSDIR)/debian" $(ZFSDIR)
+
+$(ZFS_DSC): $(ZFSDIR) $(ORIG_SRC_TAR)
        tar czf zfs-linux_$(ZFSVER).orig.tar.gz $(ZFSDIR)
        cd $(ZFSDIR); dpkg-buildpackage -S -uc -us -d
        lintian $@
@@ -70,7 +74,7 @@ $(ZFSDIR): $(ZFSSRC)/README.md $(ZFSSRC) debian
 
 .PHONY: clean
 clean:         
-       rm -rf *~ *.deb *.changes *.buildinfo *.dsc *.orig.tar.* *.debian.tar.* $(ZFSDIR)
+       rm -rf *~ *.deb *.changes *.buildinfo *.build *.dsc *.orig.tar.* *.debian.tar.* $(ZFSDIR)
 
 .PHONY: distclean
 distclean: clean