diff --git a/README.md b/README.md index 69dc843..f1aacc8 100644 --- a/README.md +++ b/README.md @@ -121,20 +121,9 @@ debuild -ePVE* --jobs=auto -b -uc -us ``` The Makefile provides several environmental variables to control: -1. `PVE_BUILD_FLAVOR` - The name of the kernel flavor which represents a selection of kernel - functionality (e.g. [hardened](https://github.com/anthraxx/linux-hardened) or [zen](https://github.com/zen-kernel/zen-kernel)). - This name is part of the kernel version and package name, which means that you - can have multiple flavors of the same kernel installed alongside each other. - Note that the name itself does not control the selection of kernel functionality. -2. `PVE_BUILD_PROFILE` (default `generic`) - The name of the kernel build type which represents the compilation options of - the kernel (e.g. optimization level or micro architecture). - This name is appended as suffix to the Debian package version in case it is not - the default value. -3. `PVE_KERNEL_CC` +1. `PVE_KERNEL_CC` The compiler to use for the kernel build. -4. `PVE_KERNEL_CFLAGS` +2. `PVE_KERNEL_CFLAGS` The compilation options to use for the kernel build. Use this variable to specify the optimization level or micro architecture to build for. diff --git a/debian/rules b/debian/rules index 4e17621..37f2aa0 100755 --- a/debian/rules +++ b/debian/rules @@ -62,7 +62,7 @@ override_dh_auto_build: KCFLAGS="${PVE_KERNEL_CFLAGS}" \ EXTRAVERSION="${EXTRAVERSION}" \ LOCALVERSION="${LOCALVERSION}" \ - KBUILD_BUILD_VERSION_TIMESTAMP="PVE Edge ${DEB_VERSION} ${PVE_BUILD_PROFILE} (${PKG_DATE})" + KBUILD_BUILD_VERSION_TIMESTAMP="${PKG_DISTRIBUTOR} ${DEB_VERSION} (${PKG_DATE_UTC_ISO})" # ZFS dh_auto_configure -D ${ZFS_SRC} -- CC="${PVE_ZFS_CC}" --with-config=kernel --with-linux=$(realpath ${KERNEL_SRC}) --with-linux-obj=$(realpath ${KERNEL_SRC}) dh_auto_build -D ${ZFS_SRC} diff --git a/debian/rules.d/common.mk b/debian/rules.d/common.mk index b027826..9c14688 100644 --- a/debian/rules.d/common.mk +++ b/debian/rules.d/common.mk @@ -3,30 +3,18 @@ KERNEL_MAJMIN=$(shell ./scripts/version.sh -n) KERNEL_VER=$(shell ./scripts/version.sh -L) ## Debian package information -PKG_RELEASE=$(shell ./scripts/version.sh -r) -PKG_DATE:=$(shell dpkg-parsechangelog -SDate) -PKG_GIT_VERSION:=$(shell git rev-parse HEAD) - -## Build flavor -# Default to PVE flavor -PKG_BUILD_FLAVOR ?= edge -ifneq (${PKG_BUILD_FLAVOR},edge) - _ := $(info Using custom build flavor: ${PKG_BUILD_FLAVOR}) -endif - -## Build profile -# Default to generic march optimizations -PKG_BUILD_PROFILE ?= generic -ifneq (${PKG_BUILD_PROFILE},generic) - _ := $(info Using custom build profile: ${PKG_BUILD_PROFILE}) -endif +PKG_DISTRIBUTOR ?= PVE Edge +PKG_RELEASE = $(shell ./scripts/version.sh -r) +PKG_DATE := $(shell dpkg-parsechangelog -SDate) +PKG_DATE_UTC_ISO := $(shell date -u -d '$(PKG_DATE)' +%Y-%m-%d) +PKG_GIT_VERSION := $(shell git rev-parse HEAD) # Build settings PVE_KERNEL_CC ?= ${CC} PVE_ZFS_CC ?= ${CC} ### Debian package names -EXTRAVERSION=-${PKG_BUILD_FLAVOR} +EXTRAVERSION=-edge KVNAME=${KERNEL_VER}${EXTRAVERSION} PVE_KERNEL_PKG=pve-kernel-${KVNAME}