summaryrefslogtreecommitdiff
path: root/scripts/package-build/linux-kernel/build-accel-ppp.sh
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2024-09-06 10:45:27 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2024-09-06 11:34:08 +0000
commitc9a5a93834fce33f1e999dd50381cb7ff9e5fabb (patch)
tree26d03e228ca55acc5fc29d4ad18e8331b79e8605 /scripts/package-build/linux-kernel/build-accel-ppp.sh
parent70122746469e930a6775e0c42c4d1fd30bc6d514 (diff)
downloadvyos-build-c9a5a93834fce33f1e999dd50381cb7ff9e5fabb.tar.gz
vyos-build-c9a5a93834fce33f1e999dd50381cb7ff9e5fabb.zip
T6674: Add build-scrips for packages without Jenkins
Add build scripts for .deb packages without Jenkins. To exclude Jenkins we need some place where we can put new builds-scripts to run in parallel (old/new) during meantime. We will deprecate old Jenkins package builds in the future.
Diffstat (limited to 'scripts/package-build/linux-kernel/build-accel-ppp.sh')
-rwxr-xr-xscripts/package-build/linux-kernel/build-accel-ppp.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/scripts/package-build/linux-kernel/build-accel-ppp.sh b/scripts/package-build/linux-kernel/build-accel-ppp.sh
new file mode 100755
index 00000000..1685ff8d
--- /dev/null
+++ b/scripts/package-build/linux-kernel/build-accel-ppp.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+CWD=$(pwd)
+KERNEL_VAR_FILE=${CWD}/kernel-vars
+
+ACCEL_SRC=${CWD}/accel-ppp
+if [ ! -d ${ACCEL_SRC} ]; then
+ echo "Accel-PPP source not found"
+ exit 1
+fi
+
+if [ ! -f ${KERNEL_VAR_FILE} ]; then
+ echo "Kernel variable file '${KERNEL_VAR_FILE}' does not exist, run ./build_kernel.sh first"
+ exit 1
+fi
+
+PATCH_DIR=${CWD}/patches/accel-ppp
+if [ -d $PATCH_DIR ]; then
+ cd ${ACCEL_SRC}
+ for patch in $(ls ${PATCH_DIR})
+ do
+ echo "I: Apply patch: ${PATCH_DIR}/${patch}"
+ patch -p1 < ${PATCH_DIR}/${patch}
+ done
+fi
+
+. ${KERNEL_VAR_FILE}
+mkdir -p ${ACCEL_SRC}/build
+cd ${ACCEL_SRC}/build
+
+echo "I: Build Accel-PPP Debian package"
+cmake -DBUILD_IPOE_DRIVER=TRUE \
+ -DBUILD_VLAN_MON_DRIVER=TRUE \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DKDIR=${KERNEL_DIR} \
+ -DLUA=5.3 \
+ -DMODULES_KDIR=${KERNEL_VERSION}${KERNEL_SUFFIX} \
+ -DCPACK_TYPE=Debian12 ..
+make
+cpack -G DEB
+
+# rename resulting Debian package according git description
+mv accel-ppp*.deb ${CWD}/accel-ppp_$(git describe --always --tags)_$(dpkg --print-architecture).deb