]> git.proxmox.com Git - pve-kernel-meta.git/blob - Makefile
e865d0d2a024dff26f087f610826b18ce009b165
[pve-kernel-meta.git] / Makefile
1 include /usr/share/dpkg/pkg-info.mk
2
3 export KERNEL_VER=5.0
4 export KERNEL_ABI=5.0.8-1-pve
5
6 PACKAGE=pve-kernel-${KERNEL_VER}
7
8 GITVERSION:=$(shell git rev-parse HEAD)
9
10 KERNEL_DEB=pve-kernel-${KERNEL_VER}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
11 HEADERS_DEB=pve-headers-${KERNEL_VER}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
12
13 BUILD_DIR=build
14
15 DEBS=${KERNEL_DEB} ${HEADERS_DEB}
16
17 all: deb
18 deb: ${DEBS}
19
20 ${HEADERS_DEB}: ${KERNEL_DEB}
21 ${KERNEL_DEB}: debian
22 rm -rf ${BUILD_DIR}
23 mkdir -p ${BUILD_DIR}/debian
24 cp -ar debian/* ${BUILD_DIR}/debian/
25 cd ${BUILD_DIR}; debian/rules debian/control
26 echo "git clone git://git.proxmox.com/git/pve-kernel-meta.git\\ngit checkout ${GITVERSION}" > ${BUILD_DIR}/debian/SOURCE
27 cd ${BUILD_DIR}; dpkg-buildpackage -b -uc -us
28 lintian ${KERNEL_DEB} ${HEADERS_DEB}
29
30 .PHONY: upload
31 upload: ${DEBS}
32 tar cf - ${DEBS}|ssh repoman@repo.proxmox.com -- upload --product pve,pmg --dist stretch
33
34 .PHONY: clean distclean
35 distclean: clean
36 clean:
37 rm -rf *~ ${BUILD_DIR} *.deb *.dsc *.changes *.buildinfo