[pve-devel] [PATCH kernel 4.13 1/3] refactor variable names and remove hardcoded major.minor version
Stoiko Ivanov
s.ivanov at proxmox.com
Mon May 28 11:02:03 CEST 2018
Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
Makefile | 13 ++++++++++---
debian/rules | 4 ++--
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 22b6cb4..b316333 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,17 @@
RELEASE=5.1
# also update pve-kernel-meta.git if either of these change
-KERNEL_VER=4.13.16
+KERNEL_MAJ=4
+KERNEL_MIN=13
+KERNEL_PATCHLEVEL=16
+
KREL=3
PKGREL=49
+KERNEL_MAJMIN=$(KERNEL_MAJ).$(KERNEL_MIN)
+KERNEL_VER=$(KERNEL_MAJMIN).$(KERNEL_PATCHLEVEL)
+
EXTRAVERSION=-${KREL}-pve
KVNAME=${KERNEL_VER}${EXTRAVERSION}
PACKAGE=pve-kernel-${KVNAME}
@@ -33,7 +39,7 @@ endif
BUILD_DIR=build
KERNEL_SRC=ubuntu-artful
-KERNEL_SRC_SUBMODULE=submodules/ubuntu-artful
+KERNEL_SRC_SUBMODULE=submodules/$(KERNEL_SRC)
KERNEL_CFG_ORG=config-${KERNEL_VER}.org
E1000EDIR=e1000e-3.3.6
@@ -59,7 +65,7 @@ DIRS=KERNEL_SRC E1000EDIR IGBDIR IXGBEDIR SPLDIR ZFSDIR MODULES
DST_DEB=${PACKAGE}_${KERNEL_VER}-${PKGREL}_${ARCH}.deb
HDR_DEB=${HDRPACKAGE}_${KERNEL_VER}-${PKGREL}_${ARCH}.deb
-LINUX_TOOLS_DEB=linux-tools-4.13_${KERNEL_VER}-${PKGREL}_${ARCH}.deb
+LINUX_TOOLS_DEB=linux-tools-$(KERNEL_MAJMIN)_${KERNEL_VER}-${PKGREL}_${ARCH}.deb
DEBS=${DST_DEB} ${HDR_DEB} ${LINUX_TOOLS_DEB}
@@ -94,6 +100,7 @@ debian.prepared: debian
echo "git clone git://git.proxmox.com/git/pve-kernel.git\\ngit checkout ${GITVERSION}" > ${BUILD_DIR}/debian/SOURCE
@$(foreach dir, ${DIRS},echo "${dir}=${${dir}}" >> ${BUILD_DIR}/debian/rules.d/env.mk;)
echo "KVNAME=${KVNAME}" >> ${BUILD_DIR}/debian/rules.d/env.mk
+ echo "KERNEL_MAJMIN=${KERNEL_MAJMIN}" >> ${BUILD_DIR}/debian/rules.d/env.mk
cd ${BUILD_DIR}; debian/rules debian/control
touch $@
diff --git a/debian/rules b/debian/rules
index 55b20fc..39f5cb5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,7 +15,7 @@ CHANGELOG_DATE:=$(shell dpkg-parsechangelog -SDate)
PVE_KERNEL_PKG=pve-kernel-${KVNAME}
PVE_HEADER_PKG=pve-headers-${KVNAME}
-LINUX_TOOLS_PKG=linux-tools-4.13
+LINUX_TOOLS_PKG=linux-tools-${KERNEL_MAJMIN}
# TODO: split for archs, move to files?
PVE_CONFIG_OPTS= \
@@ -137,7 +137,7 @@ binary: install
rm -rf debian/${LINUX_TOOLS_PKG}
mkdir -p debian/${LINUX_TOOLS_PKG}/usr/bin
mkdir -p debian/${LINUX_TOOLS_PKG}/usr/share/man/man1
- install -m 755 ${BUILD_DIR}/${KERNEL_SRC}/tools/perf/perf debian/${LINUX_TOOLS_PKG}/usr/bin/perf_4.13
+ install -m 755 ${BUILD_DIR}/${KERNEL_SRC}/tools/perf/perf debian/${LINUX_TOOLS_PKG}/usr/bin/perf_$(KERNEL_MAJMIN)
install -m644 ${BUILD_DIR}/${KERNEL_SRC}/tools/perf/Documentation/*.1 debian/${LINUX_TOOLS_PKG}/usr/share/man/man1
touch $@
--
2.11.0
More information about the pve-devel
mailing list