1 # NOTE: just for Proxmox packaging and called GNUmakefile to still allow direct (non-packaging) builds
3 include /usr/share/dpkg/default.mk
7 BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION)
8 ORIG_SRC_TAR=$(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz
10 GITVERSION:=$(shell git rev-parse HEAD)
12 DSC = $(PACKAGE)_$(DEB_VERSION).dsc
13 DEB = $(PACKAGE)_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
14 DEB_DBG = $(PACKAGE)-dbgsym_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
15 DEB_LIB = swtpm-libs_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
16 DEB_DEV = swtpm-dev_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
17 DEB_TOOLS = swtpm-tools_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
19 DEBS=$(DEB) $(DEB_DBG) $(DEB_LIB) $(DEB_DEV) $(DEB_TOOLS)
26 rm -f $@.tmp/GNUmakefile # just for Proxmox packaging convenience
27 echo "git clone git://git.proxmox.com/git/lxcfs.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE
32 $(DEB_DBG) $(DEB_LIB) $(DEB_DEV) $(DEB_TOOLS): $(DEB)
34 cd $(BUILDDIR); dpkg-buildpackage -rfakeroot -b -us -uc
40 $(ORIG_SRC_TAR): $(BUILDDIR)
41 tar czf $(ORIG_SRC_TAR) --exclude="$(BUILDDIR)/debian" $(BUILDDIR)
49 $(DSC): $(ORIG_SRC_TAR) $(BUILDDIR)
50 cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
53 upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
55 tar cf - $(DEBS) | ssh repoman@repo.proxmox.com upload --product pve --dist $(UPLOAD_DIST)
59 rm -rf $(PACKAGE)-[0-9]*/ $(PACKAGE)*.tar* *.deb *.dsc *.changes *.buildinfo *.build