summaryrefslogtreecommitdiff
path: root/scripts/package-build/vpp
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/package-build/vpp')
-rw-r--r--scripts/package-build/vpp/.gitignore2
l---------scripts/package-build/vpp/build.py1
-rw-r--r--scripts/package-build/vpp/package.toml35
3 files changed, 38 insertions, 0 deletions
diff --git a/scripts/package-build/vpp/.gitignore b/scripts/package-build/vpp/.gitignore
new file mode 100644
index 00000000..38768675
--- /dev/null
+++ b/scripts/package-build/vpp/.gitignore
@@ -0,0 +1,2 @@
+/vpp/
+/vyos-vpp-patches/
diff --git a/scripts/package-build/vpp/build.py b/scripts/package-build/vpp/build.py
new file mode 120000
index 00000000..3c76af73
--- /dev/null
+++ b/scripts/package-build/vpp/build.py
@@ -0,0 +1 @@
+../build.py \ No newline at end of file
diff --git a/scripts/package-build/vpp/package.toml b/scripts/package-build/vpp/package.toml
new file mode 100644
index 00000000..1104e184
--- /dev/null
+++ b/scripts/package-build/vpp/package.toml
@@ -0,0 +1,35 @@
+[[packages]]
+name = "vyos-vpp-patches"
+commit_id = "current"
+scm_url = "https://github.com/vyos/vyos-vpp-patches"
+build_cmd = "/bin/true"
+apply_patches = false
+
+[[packages]]
+name = "vpp"
+commit_id = "stable/2410"
+scm_url = "https://github.com/FDio/vpp"
+# Skip apply patches by build.py as we use them in build_cmd
+apply_patches = false
+
+pre_build_hook = """
+mkdir -p ../patches/vpp/
+rsync -av ../vyos-vpp-patches/patches/vpp/ ../patches/vpp/
+"""
+
+build_cmd = """
+# Patches for vpp should applied here
+for patch in ../patches/vpp/*.patch; do
+ echo "I: build_cmd applying patch $patch..."
+ git -c user.email=maintainers@vyos.net -c user.name=vyos am "$patch" || { echo "Failed to apply patch $patch"; exit 1; }
+done
+
+make UNATTENDED=yes install-dep
+make pkg-deb
+cp build-root/*.deb ../
+"""
+
+[dependencies]
+packages = [
+ "llvm"
+]