5
0
mirror of git://git.proxmox.com/git/pve-network.git synced 2025-02-01 09:47:23 +03:00
pve-network/Makefile
Thomas Lamprecht 6029cbb071 separate packaging and source build system
like almost all of our repos do nowadays, modern git can detect such
things on rebase so in development stuff should be hopefully not too
much affected by this.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-25 18:18:57 +02:00

46 lines
1015 B
Makefile

include /usr/share/dpkg/pkg-info.mk
PACKAGE=libpve-network-perl
BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
DEB=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb
DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc
.PHONY: dinstall
dinstall: deb
dpkg -i $(DEB)
$(BUILDDIR): src debian
rm -rf $@ $@.tmp
cp -a src $@.tmp
cp -a debian $@.tmp/
echo "git clone git://git.proxmox.com/git/pve-network.git\\ngit checkout $(shell git rev-parse HEAD)" > $@.tmp/debian/SOURCE
mv $@.tmp $@
.PHONY: deb
deb: $(DEB)
$(DEB): $(BUILDDIR)
cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
lintian $(DEB)
.PHONY: dsc
dsc: clean
$(MAKE) $(DSC)
lintian $(DSC)
$(DSC): $(BUILDDIR)
cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
sbuild: $(DSC)
sbuild $(DSC)
.PHONY: clean distclean
distclean: clean
clean:
rm -rf *~ *.deb *.changes $(PACKAGE)-[0-9]*/ $(PACKAGE)*.tar* *.build *.buildinfo *.dsc
.PHONY: upload
upload: $(DEB)
tar cf - $(DEB)|ssh -X repoman@repo.proxmox.com -- upload --product pve --dist bullseye