From: Thomas Lamprecht Date: Sun, 25 Jun 2023 13:49:48 +0000 (+0200) Subject: buildsys: rework build-dir and original source tarball creation X-Git-Url: https://git.proxmox.com/?p=proxmox-spamassassin.git;a=commitdiff_plain;h=446f7108c3a9488941ffdc347e30896c892e5f65 buildsys: rework build-dir and original source tarball creation Ship the updates in the source package to avoid that this needs to be pulled on actual build. Signed-off-by: Thomas Lamprecht --- diff --git a/Makefile b/Makefile index 52bdf98..057e7d7 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ PACKAGE = proxmox-spamassassin OPKGNAME = Mail-SpamAssassin-$(DEB_VERSION_UPSTREAM) BUILDDIR = $(PACKAGE)-$(DEB_VERSION_UPSTREAM) +ORIG_SRC_TAR=$(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz DSC = $(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc DEB = $(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_amd64.deb @@ -32,7 +33,7 @@ dsc: $(MAKE) $(DSC) lintian $(DSC) -$(DSC): $(BUILDDIR) +$(DSC): $(ORIG_SRC_TAR) $(BUILDDIR) cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d .PHONY: sbuild @@ -45,17 +46,18 @@ update-upstream: $(OPKGNAME).tar.gz tar -xzf $< mv $(OPKGNAME) upstream -$(BUILDDIR).orig.tar.gz: upstream/ - rm -rf $(NPKGNAME) - cp -a upstream $(NPKGNAME) - tar -czf $@ $(NPKGNAME) - -$(BUILDDIR): sa-updates kam-updates $(NPKGNAME).orig.tar.gz - cp -a debian $@ - mkdir -p $@/debian/tree/usr/share/spamassassin - rsync -av sa-updates/ $@/debian/tree/usr/share/spamassassin - mkdir -p $@/debian/tree/usr/share/spamassassin-extra - rsync -av kam-updates/ $@/debian/tree/usr/share/spamassassin-extra +$(ORIG_SRC_TAR): $(BUILDDIR) + tar czf $(ORIG_SRC_TAR) --exclude="$(BUILDDIR)/debian" $(BUILDDIR) + +$(BUILDDIR): sa-updates kam-updates + rm -rf $@ $@.tmp + cp -a upstream $@.tmp + cp -a debian $@.tmp + mkdir -p $@.tmp/rule-updates/spamassassin + rsync -av sa-updates/ $@.tmp/rule-updates/spamassassin + mkdir -p $@.tmp/debian/rule-updates/spamassassin-extra + rsync -av kam-updates/ $@.tmp/rule-updates/spamassassin-extra + mv $@.tmp $@ $(OPKGNAME).tar.gz: rm -f $@* diff --git a/debian/install b/debian/install index b8d5416..543bc72 100644 --- a/debian/install +++ b/debian/install @@ -1 +1,2 @@ debian/tree/* / +rule-updates/* /usr/share/