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 <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2023-06-25 15:49:48 +02:00
parent 184cb476e6
commit 446f7108c3
2 changed files with 14 additions and 11 deletions

View File

@ -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)
$(ORIG_SRC_TAR): $(BUILDDIR)
tar czf $(ORIG_SRC_TAR) --exclude="$(BUILDDIR)/debian" $(BUILDDIR)
$(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
$(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 $@*

1
debian/install vendored
View File

@ -1 +1,2 @@
debian/tree/* /
rule-updates/* /usr/share/