]> git.proxmox.com Git - proxmox-archive-keyring.git/blob - Makefile
buildsys: improve DSC target & add sbuild convenience target
[proxmox-archive-keyring.git] / Makefile
1 include /usr/share/dpkg/pkg-info.mk
2
3 PACKAGE=proxmox-archive-keyring
4 BUILDDIR=$(PACKAGE)-$(DEB_VERSION_UPSTREAM)
5
6 GITVERSION:=$(shell git rev-parse HEAD)
7
8 DSC=$(PACKAGE)_$(DEB_VERSION).dsc
9 DEB=$(PACKAGE)_$(DEB_VERSION)_all.deb
10
11 all: deb
12
13 $(BUILDDIR):
14 rm -rf $@ $@.tmp
15 mkdir -p $@.tmp/debian
16 cp -ar debian/* $@.tmp/debian/
17 echo "git clone git://git.proxmox.com/git/proxmox-archive-keyring.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE
18 mv $@.tmp $@
19
20 deb: $(DEB)
21 $(DEB): $(BUILDDIR)
22 cd $(BUILDDIR); dpkg-buildpackage -b -uc -us
23 lintian $(DEB)
24
25 dsc: clean
26 $(MAKE) $(DSC)
27 lintian $(DSC)
28
29 $(DSC): $(BUILDDIR)
30 cd $(BUILDDIR); dpkg-buildpackage -S -uc -us
31
32 sbuild: $(DSC)
33 sbuild $(DSC)
34
35 .PHONY: upload
36 upload: $(DEB)
37 tar cf - $(DEB)|ssh repoman@repo.proxmox.com -- upload --product pve,pmg,pbs,pbs-client,infra --dist bookworm
38
39 .PHONY: distclean
40 distclean: clean
41
42 .PHONY: clean
43 clean:
44 rm -rf $(PACKAGE)-[0-9]*/
45 rm -f $(PACKAGE)*.tar* *.deb *.dsc *.changes *.build *.buildinfo