]> git.proxmox.com Git - pve-kernel-meta.git/blob - Makefile
d/copyright: update years
[pve-kernel-meta.git] / Makefile
1 include /usr/share/dpkg/pkg-info.mk
2
3 GITVERSION:=$(shell git rev-parse HEAD)
4
5 KERNEL_DEB=proxmox-default-kernel_$(DEB_VERSION)_all.deb
6 HEADERS_DEB=proxmox-default-headers_$(DEB_VERSION)_all.deb
7
8 BUILD_DIR=proxmox-kernel-meta_$(DEB_VERSION)
9 DSC=proxmox-kernel-meta_$(DEB_VERSION).dsc
10
11 DEBS=$(KERNEL_DEB) $(HEADERS_DEB)
12
13 .PHONY: deb dsc
14 deb: $(DEBS)
15 dsc: $(DSC)
16
17 $(BUILD_DIR): debian
18 rm -rf $@ $@.tmp
19 mkdir $@.tmp
20 cp -a debian $@.tmp/
21 cd $@.tmp; debian/rules debian/control
22 echo "git clone git://git.proxmox.com/git/pve-kernel-meta.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE
23 mv $@.tmp $@
24
25 $(HEADERS_DEB): $(KERNEL_DEB)
26 $(KERNEL_DEB): $(BUILD_DIR)
27 cd $(BUILD_DIR); dpkg-buildpackage -b -uc -us
28 lintian $(DEBS)
29
30 $(DSC): $(BUILD_DIR)
31 cd $(BUILD_DIR); dpkg-buildpackage -S -uc -us
32 lintian $(DSC)
33
34 sbuild: $(DSC)
35 sbuild $(DSC)
36
37 .PHONY: upload
38 upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
39 upload: $(DEBS)
40 tar cf - $(DEBS)|ssh repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist $(UPLOAD_DIST)
41
42 .PHONY: clean distclean
43 distclean: clean
44 clean:
45 rm -rf *~ proxmox-kernel-meta*/ proxmox-kernel-meta*.tar.* *.deb *.dsc *.changes *.buildinfo *.build