mirror of
https://git.proxmox.com/git/frr
synced 2025-04-28 18:23:28 +00:00
buildsys: add DSC & sbuild convenience target
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
58d034e6a1
commit
834031ec63
33
Makefile
33
Makefile
@ -3,9 +3,10 @@ include /usr/share/dpkg/default.mk
|
|||||||
PACKAGE=frr
|
PACKAGE=frr
|
||||||
|
|
||||||
SRCDIR=frr
|
SRCDIR=frr
|
||||||
BUILDDIR=build-$(PACKAGE)-$(DEB_VERSION_UPSTREAM)
|
BUILDDIR=$(PACKAGE)-$(DEB_VERSION_UPSTREAM)
|
||||||
|
|
||||||
GITVERSION:=$(shell git rev-parse HEAD)
|
ORIG_SRC_TAR=$(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz
|
||||||
|
DSC=$(PACKAGE)_$(DEB_VERSION).dsc
|
||||||
|
|
||||||
MAIN_DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
|
MAIN_DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
|
||||||
OTHER_DEBS=\
|
OTHER_DEBS=\
|
||||||
@ -27,11 +28,14 @@ submodule:
|
|||||||
test -f "$(SRCDIR)/debian/changelog" || git submodule update --init
|
test -f "$(SRCDIR)/debian/changelog" || git submodule update --init
|
||||||
|
|
||||||
$(BUILDDIR): submodule debian/changelog
|
$(BUILDDIR): submodule debian/changelog
|
||||||
rm -rf $(BUILDDIR) $(BUILDDIR).tmp
|
rm -rf $@ $@.tmp
|
||||||
cp -a $(SRCDIR) $(BUILDDIR).tmp
|
cp -a $(SRCDIR) $@.tmp
|
||||||
rm $(BUILDDIR).tmp/debian/changelog
|
rm $@.tmp/debian/changelog
|
||||||
cp -a debian/* $(BUILDDIR).tmp/debian/
|
cp -a debian/* $@.tmp/debian/
|
||||||
mv $(BUILDDIR).tmp $(BUILDDIR)
|
mv $@.tmp $@
|
||||||
|
|
||||||
|
$(ORIG_SRC_TAR): $(BUILDDIR)
|
||||||
|
tar czf $(ORIG_SRC_TAR) --exclude="$(BUILDDIR)/debian" $(BUILDDIR)
|
||||||
|
|
||||||
.PHONY: deb
|
.PHONY: deb
|
||||||
deb: $(DEBS)
|
deb: $(DEBS)
|
||||||
@ -40,6 +44,18 @@ $(MAIN_DEB): $(BUILDDIR)
|
|||||||
cd $(BUILDDIR); dpkg-buildpackage -b -uc -us --build-profiles="pkg.frr.nortrlib"
|
cd $(BUILDDIR); dpkg-buildpackage -b -uc -us --build-profiles="pkg.frr.nortrlib"
|
||||||
lintian $(DEBS)
|
lintian $(DEBS)
|
||||||
|
|
||||||
|
.PHONY: dsc
|
||||||
|
dsc:
|
||||||
|
rm -rf $(BUILDDIR) $(ORIG_SRC_TAR) $(DSC)
|
||||||
|
$(MAKE) $(DSC)
|
||||||
|
lintian $(DSC)
|
||||||
|
|
||||||
|
$(DSC): $(BUILDDIR) $(ORIG_SRC_TAR)
|
||||||
|
cd $(BUILDDIR); dpkg-buildpackage -S -uc -us --build-profiles="pkg.frr.nortrlib" -d
|
||||||
|
|
||||||
|
sbuild: $(DSC)
|
||||||
|
sbuild --profiles="pkg.frr.nortrlib" $<
|
||||||
|
|
||||||
.PHONY: upload
|
.PHONY: upload
|
||||||
upload: $(DEBS)
|
upload: $(DEBS)
|
||||||
tar cf - $(DEBS)|ssh -X repoman@repo.proxmox.com -- upload --product pve --dist bullseye
|
tar cf - $(DEBS)|ssh -X repoman@repo.proxmox.com -- upload --product pve --dist bullseye
|
||||||
@ -49,7 +65,8 @@ distclean: clean
|
|||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -rf *~ debian/*~ *.deb build-$(PACKAGE)* *.changes *.dsc *.buildinfo
|
rm -rf $(PACKAGE)-[0-9]*/
|
||||||
|
rm -rf $(PACKAGE)*.tar* *.deb *.dsc *.changes *.dsc *.buildinfo *.build
|
||||||
|
|
||||||
.PHONY: dinstall
|
.PHONY: dinstall
|
||||||
dinstall: deb
|
dinstall: deb
|
||||||
|
Loading…
Reference in New Issue
Block a user