]> git.proxmox.com Git - pve-kernel-meta.git/blobdiff - Makefile
d/copyright: update years
[pve-kernel-meta.git] / Makefile
index 5c938a3ebcca55e50de29154fbaaed3bc88bcb8b..dc06e40ec9fafd95bcb32919eed3a3c91cd460e1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,46 +1,45 @@
 include /usr/share/dpkg/pkg-info.mk
 
-export KERNEL_VER=5.0
-export KERNEL_ABI=5.0.21-3-pve
-
 GITVERSION:=$(shell git rev-parse HEAD)
 
-KERNEL_DEB=pve-kernel-${KERNEL_VER}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
-HEADERS_DEB=pve-headers-${KERNEL_VER}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
-HELPER_DEB=pve-kernel-helper_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
+KERNEL_DEB=proxmox-default-kernel_$(DEB_VERSION)_all.deb
+HEADERS_DEB=proxmox-default-headers_$(DEB_VERSION)_all.deb
 
-BUILD_DIR=build
+BUILD_DIR=proxmox-kernel-meta_$(DEB_VERSION)
+DSC=proxmox-kernel-meta_$(DEB_VERSION).dsc
 
-DEBS=${KERNEL_DEB} ${HEADERS_DEB} ${HELPER_DEB}
+DEBS=$(KERNEL_DEB) $(HEADERS_DEB)
 
-SUBDIRS = efiboot bin
+.PHONY: deb dsc
+deb: $(DEBS)
+dsc: $(DSC)
 
-.PHONY: all
-all: ${SUBDIRS}
-       set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i; done
+$(BUILD_DIR): debian
+       rm -rf $@ $@.tmp
+       mkdir $@.tmp
+       cp -a debian $@.tmp/
+       cd $@.tmp; debian/rules debian/control
+       echo "git clone git://git.proxmox.com/git/pve-kernel-meta.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE
+       mv $@.tmp $@
 
-.PHONY: deb
-deb: ${DEBS}
+$(HEADERS_DEB): $(KERNEL_DEB)
+$(KERNEL_DEB): $(BUILD_DIR)
+       cd $(BUILD_DIR); dpkg-buildpackage -b -uc -us
+       lintian $(DEBS)
 
-${HEADERS_DEB}: ${KERNEL_DEB}
-${KERNEL_DEB}: debian
-       rm -rf ${BUILD_DIR}
-       mkdir -p ${BUILD_DIR}/debian
-       rsync -a * ${BUILD_DIR}/
-       cd ${BUILD_DIR}; debian/rules debian/control
-       echo "git clone git://git.proxmox.com/git/pve-kernel-meta.git\\ngit checkout ${GITVERSION}" > ${BUILD_DIR}/debian/SOURCE
-       cd ${BUILD_DIR}; dpkg-buildpackage -b -uc -us
-       lintian ${DEBS}
+$(DSC): $(BUILD_DIR)
+       cd $(BUILD_DIR); dpkg-buildpackage -S -uc -us
+       lintian $(DSC)
 
-.PHONY: install
-install: ${SUBDIRS}
-       set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
+sbuild: $(DSC)
+       sbuild $(DSC)
 
 .PHONY: upload
-upload: ${DEBS}
-       tar cf - ${DEBS}|ssh repoman@repo.proxmox.com -- upload --product pve,pmg --dist buster
+upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
+upload: $(DEBS)
+       tar cf - $(DEBS)|ssh repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist $(UPLOAD_DIST)
 
 .PHONY: clean distclean
 distclean: clean
 clean:
-       rm -rf *~ ${BUILD_DIR} *.deb *.dsc *.changes *.buildinfo
+       rm -rf *~ proxmox-kernel-meta*/ proxmox-kernel-meta*.tar.* *.deb *.dsc *.changes *.buildinfo *.build