build: remove exported variables
in favor of generated rules.d snippet. this allows calling dpkg-buildpackage in the build directory manually without setting up the environment to match.
This commit is contained in:
parent
f3acafc70e
commit
66aed5b89f
38
Makefile
38
Makefile
@ -7,7 +7,7 @@ PKGREL=41
|
|||||||
# the fw package: fwlist-2.6.32-PREV-pve
|
# the fw package: fwlist-2.6.32-PREV-pve
|
||||||
KREL=6
|
KREL=6
|
||||||
|
|
||||||
export EXTRAVERSION=-${KREL}-pve
|
EXTRAVERSION=-${KREL}-pve
|
||||||
KVNAME=${KERNEL_VER}${EXTRAVERSION}
|
KVNAME=${KERNEL_VER}${EXTRAVERSION}
|
||||||
PACKAGE=pve-kernel-${KVNAME}
|
PACKAGE=pve-kernel-${KVNAME}
|
||||||
HDRPACKAGE=pve-headers-${KVNAME}
|
HDRPACKAGE=pve-headers-${KVNAME}
|
||||||
@ -31,33 +31,33 @@ else
|
|||||||
GCC=$(CC)
|
GCC=$(CC)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
TOP=$(shell pwd)
|
BUILD_DIR=build
|
||||||
# TODO: maybe move exported paths to a sourced file in ${BUILD_DIR}?
|
|
||||||
export BUILD_DIR=${TOP}/build
|
|
||||||
|
|
||||||
export KERNEL_SRC=ubuntu-artful
|
KERNEL_SRC=ubuntu-artful
|
||||||
KERNEL_SRC_SUBMODULE=submodules/ubuntu-artful
|
KERNEL_SRC_SUBMODULE=submodules/ubuntu-artful
|
||||||
KERNEL_CFG_ORG=config-${KERNEL_VER}.org
|
KERNEL_CFG_ORG=config-${KERNEL_VER}.org
|
||||||
|
|
||||||
|
E1000EDIR=e1000e-3.3.6
|
||||||
export E1000EDIR=e1000e-3.3.6
|
|
||||||
E1000ESRC=${E1000EDIR}.tar.gz
|
E1000ESRC=${E1000EDIR}.tar.gz
|
||||||
|
|
||||||
export IGBDIR=igb-5.3.5.10
|
IGBDIR=igb-5.3.5.10
|
||||||
IGBSRC=${IGBDIR}.tar.gz
|
IGBSRC=${IGBDIR}.tar.gz
|
||||||
|
|
||||||
export IXGBEDIR=ixgbe-5.3.3
|
IXGBEDIR=ixgbe-5.3.3
|
||||||
IXGBESRC=${IXGBEDIR}.tar.gz
|
IXGBESRC=${IXGBEDIR}.tar.gz
|
||||||
|
|
||||||
ZFSONLINUX_SUBMODULE=submodules/zfsonlinux
|
ZFSONLINUX_SUBMODULE=submodules/zfsonlinux
|
||||||
export SPLDIR=pkg-spl
|
SPLDIR=pkg-spl
|
||||||
SPLSRC=${ZFSONLINUX_SUBMODULE}/spl-debian
|
SPLSRC=${ZFSONLINUX_SUBMODULE}/spl-debian
|
||||||
export ZFSDIR=pkg-zfs
|
ZFSDIR=pkg-zfs
|
||||||
ZFSSRC=${ZFSONLINUX_SUBMODULE}/zfs-debian
|
ZFSSRC=${ZFSONLINUX_SUBMODULE}/zfs-debian
|
||||||
|
|
||||||
export MODULES=modules
|
MODULES=modules
|
||||||
MODULE_DIRS=${E1000EDIR} ${IGBDIR} ${IXGBEDIR} ${SPLDIR} ${ZFSDIR}
|
MODULE_DIRS=${E1000EDIR} ${IGBDIR} ${IXGBEDIR} ${SPLDIR} ${ZFSDIR}
|
||||||
|
|
||||||
|
# exported to debian/rules via debian/rules.d/dirs.mk
|
||||||
|
DIRS=KERNEL_SRC E1000EDIR IGBDIR IXGBEDIR SPLDIR ZFSDIR MODULES
|
||||||
|
|
||||||
DST_DEB=${PACKAGE}_${KERNEL_VER}-${PKGREL}_${ARCH}.deb
|
DST_DEB=${PACKAGE}_${KERNEL_VER}-${PKGREL}_${ARCH}.deb
|
||||||
HDR_DEB=${HDRPACKAGE}_${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-4.13_${KERNEL_VER}-${PKGREL}_${ARCH}.deb
|
||||||
@ -77,19 +77,25 @@ check_gcc:
|
|||||||
|
|
||||||
${LINUX_TOOLS_DEB} ${HDR_DEB}: ${DST_DEB}
|
${LINUX_TOOLS_DEB} ${HDR_DEB}: ${DST_DEB}
|
||||||
${DST_DEB}: ${BUILD_DIR}.prepared
|
${DST_DEB}: ${BUILD_DIR}.prepared
|
||||||
cd ${BUILD_DIR}; debian/rules debian/control
|
|
||||||
cd ${BUILD_DIR}; dpkg-buildpackage --jobs=auto -b -uc -us
|
cd ${BUILD_DIR}; dpkg-buildpackage --jobs=auto -b -uc -us
|
||||||
lintian ${DST_DEB}
|
lintian ${DST_DEB}
|
||||||
#lintian ${HDR_DEB}
|
#lintian ${HDR_DEB}
|
||||||
lintian ${LINUX_TOOLS_DEB}
|
lintian ${LINUX_TOOLS_DEB}
|
||||||
|
|
||||||
${BUILD_DIR}.prepared: $(addsuffix .prepared,${KERNEL_SRC} ${MODULES}) debian
|
${BUILD_DIR}.prepared: $(addsuffix .prepared,${KERNEL_SRC} ${MODULES} debian)
|
||||||
rm -rf ${BUILD_DIR}/debian
|
|
||||||
cp -a debian ${BUILD_DIR}/debian
|
|
||||||
cp -a fwlist-previous ${BUILD_DIR}/
|
cp -a fwlist-previous ${BUILD_DIR}/
|
||||||
cp -a abi-previous ${BUILD_DIR}/
|
cp -a abi-previous ${BUILD_DIR}/
|
||||||
cp -a abi-blacklist ${BUILD_DIR}/
|
cp -a abi-blacklist ${BUILD_DIR}/
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
debian.prepared: debian
|
||||||
|
rm -rf ${BUILD_DIR}/debian
|
||||||
|
mkdir -p ${BUILD_DIR}
|
||||||
|
cp -a debian ${BUILD_DIR}/debian
|
||||||
echo "git clone git://git.proxmox.com/git/pve-kernel.git\\ngit checkout ${GITVERSION}" > ${BUILD_DIR}/debian/SOURCE
|
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
|
||||||
|
cd ${BUILD_DIR}; debian/rules debian/control
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
${KERNEL_SRC}.prepared: ${KERNEL_SRC_SUBMODULE} | submodule
|
${KERNEL_SRC}.prepared: ${KERNEL_SRC_SUBMODULE} | submodule
|
||||||
|
3
debian/rules
vendored
3
debian/rules
vendored
@ -5,11 +5,12 @@
|
|||||||
#export DH_VERBOSE=1
|
#export DH_VERBOSE=1
|
||||||
|
|
||||||
# TODO: check for headers not being installed
|
# TODO: check for headers not being installed
|
||||||
|
BUILD_DIR=$(shell pwd)
|
||||||
|
|
||||||
include /usr/share/dpkg/default.mk
|
include /usr/share/dpkg/default.mk
|
||||||
|
include debian/rules.d/env.mk
|
||||||
include debian/rules.d/${DEB_BUILD_ARCH}.mk
|
include debian/rules.d/${DEB_BUILD_ARCH}.mk
|
||||||
|
|
||||||
KVNAME=${DEB_VERSION_UPSTREAM}${EXTRAVERSION}
|
|
||||||
CHANGELOG_DATE:=$(shell dpkg-parsechangelog -SDate)
|
CHANGELOG_DATE:=$(shell dpkg-parsechangelog -SDate)
|
||||||
|
|
||||||
PVE_KERNEL_PKG=pve-kernel-${KVNAME}
|
PVE_KERNEL_PKG=pve-kernel-${KVNAME}
|
||||||
|
Loading…
Reference in New Issue
Block a user