5
0
mirror of git://git.proxmox.com/git/pve-firewall.git synced 2025-01-06 17:17:59 +03:00
pve-firewall/Makefile
Thomas Lamprecht e59c8fd1b5 buildsys: avoid that the dinstall target always triggers a rebuild
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-26 15:43:27 +02:00

58 lines
1.3 KiB
Makefile

include /usr/share/dpkg/pkg-info.mk
include /usr/share/dpkg/architecture.mk
PACKAGE=pve-firewall
BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION)
GITVERSION:=$(shell git rev-parse HEAD)
DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
DSC=$(PACKAGE)_$(DEB_VERSION).dsc
DEB2=$(PACKAGE)-dbgsym_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
DEBS=$(DEB) $(DEB2)
all: $(DEBS)
.PHONY: dinstall
dinstall: $(DEB)
dpkg -i $<
$(BUILDDIR):
rm -rf $(BUILDDIR)
rsync -a src/ debian $(BUILDDIR)
echo "git clone git://git.proxmox.com/git/pve-firewall.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE
.PHONY: deb
deb: $(DEBS)
$(DEB2): $(DEB)
$(DEB): $(BUILDDIR)
cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
lintian $(DEBS)
.PHONY: dsc
dsc:
rm -rf $(DSC) $(BUILDDIR)
$(MAKE) $(DSC)
lintian $(DSC)
$(DSC): $(BUILDDIR)
cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
sbuild: $(DSC)
sbuild $(DSC)
check:
make -C test check
.PHONY: clean distclean
distclean: clean
clean:
make -C src clean
make -C test clean
rm -rf *.deb *.dsc *.changes *.build *.buildinfo $(PACKAGE)-[0-9]*/ $(PACKAGE)*.tar*
.PHONY: upload
upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
upload: $(DEBS)
tar cf - $(DEBS) | ssh repoman@repo.proxmox.com -- upload --product pve --dist $(UPLOAD_DIST) --arch $(DEB_HOST_ARCH)