summaryrefslogtreecommitdiff
path: root/packages/aws-gateway-load-balancer-tunnel-handler/build.sh
blob: d4feb6acd858a4feffc7e6cbb87c009d99bf4a85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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}