summaryrefslogtreecommitdiff
path: root/packages/aws-gwlbtun/build.sh
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2023-08-25 16:08:58 +0100
committerGitHub <noreply@github.com>2023-08-25 16:08:58 +0100
commit6bafde7f8a90c9d66d2b71bf397dd7a84a83a8e6 (patch)
tree0987d95f8318b76f5addc9d8d4db4153cefc30d3 /packages/aws-gwlbtun/build.sh
parent0a6193471664996efa0ccd4316a4b3fbe745c177 (diff)
parent67d9f31390ae255002fb832d20ebe425bef6af7b (diff)
downloadvyos-build-6bafde7f8a90c9d66d2b71bf397dd7a84a83a8e6.tar.gz
vyos-build-6bafde7f8a90c9d66d2b71bf397dd7a84a83a8e6.zip
Merge pull request #356 from sever-sever/T5261
T5261: Jenkins build package aws-gwlbtun
Diffstat (limited to 'packages/aws-gwlbtun/build.sh')
-rwxr-xr-xpackages/aws-gwlbtun/build.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/packages/aws-gwlbtun/build.sh b/packages/aws-gwlbtun/build.sh
new file mode 100755
index 00000000..d4feb6ac
--- /dev/null
+++ b/packages/aws-gwlbtun/build.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+CWD=$(pwd)
+set -e
+
+SRC=aws-gateway-load-balancer-tunnel-handler
+
+if [ ! -d ${SRC} ]; then
+ echo "${SRC} directory does not exists, please 'git clone'"
+ exit 1
+fi
+
+# Navigate to the repository directory
+cd ${SRC}
+
+# Build the binary
+cmake .
+make
+
+# Create the Debian package directory structure
+mkdir -p aws-gwlbtun/DEBIAN
+mkdir -p aws-gwlbtun/usr/bin
+
+# Move the binary to the package directory
+cp gwlbtun aws-gwlbtun/usr/bin
+
+# Create the control file
+cat <<EOL > aws-gwlbtun/DEBIAN/control
+Package: aws-gwlbtun
+Version: 1-eb51d33
+Architecture: amd64
+Maintainer: VyOS Maintainers autobuild@vyos.net
+Description: AWS Gateway Load Balancer Tunnel Handler
+EOL
+
+# Build the Debian package
+dpkg-deb --build aws-gwlbtun
+
+cp *.deb ${CWD}