From 07a3aa72ea686cbc922a60418500975b83016d80 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sat, 8 Aug 2026 19:46:46 +0000 Subject: Kernel: T9181: replace fpm with real Debian packaging, drop fpm entirely Convert build-nat-rtsp.sh, build-ipt-netflow.sh, build-intel-nic.sh, build-intel-qat.sh and build-linux-firmware.sh from fpm to debmake + debuild, matching the jool/realtek packaging style. --- scripts/package-build/linux-kernel/common.sh | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 scripts/package-build/linux-kernel/common.sh (limited to 'scripts/package-build/linux-kernel/common.sh') diff --git a/scripts/package-build/linux-kernel/common.sh b/scripts/package-build/linux-kernel/common.sh new file mode 100644 index 00000000..ad9689fa --- /dev/null +++ b/scripts/package-build/linux-kernel/common.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# Shared helpers for scripts/package-build/linux-kernel/build-*.sh. +# Source this file (". ${CWD}/common.sh"); it defines functions only. + +# require_amd64 +# Soft-exits (status 0) if not running on amd64. +require_amd64() { + if ! dpkg-architecture -iamd64; then + echo "${1} is only buildable on amd64 platforms" + exit 0 + fi +} + +# debian_version +# Sanitizes a git-describe-style string (e.g. "5.3-5-g5aeee02") into a +# version safe for a "3.0 (native)" Debian source package: +# - hyphens are replaced with "+", since debuild/dpkg-source treat any +# hyphen as "this needs a separate orig tarball" even for native +# packages, and reject the build asking for one that doesn't exist. +# - the result is prefixed with "0~" if it doesn't start with a digit, +# since Debian versions must start with a digit (a bare abbreviated +# git hash can start with a letter). +debian_version() { + v=$(echo "$1" | tr -- '-' '+') + case "$v" in + [0-9]*) echo "$v" ;; + *) echo "0~$v" ;; + esac +} -- cgit v1.2.3