summaryrefslogtreecommitdiff
path: root/scripts/package-build/aws-gwlbtun/package.toml
blob: 75f2b55ff0d91a191c348c191a8598a35721171a (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
[[packages]]
name = "aws-gwlbtun"
commit_id = "c1fd48b"
scm_url = "https://github.com/aws-samples/aws-gateway-load-balancer-tunnel-handler"


## Build cmd start
build_cmd = '''\

# Prepare boost headers
export BOOST_INSTALL_DIR=$(pwd)/boost-headers-install
if [ ! -d "$BOOST_INSTALL_DIR" ]; then
    wget -c https://github.com/boostorg/boost/releases/download/boost-1.88.0/boost-1.88.0-b2-nodocs.tar.xz
    tar -xvf boost-1.88.0-b2-nodocs.tar.xz
    cd boost-1.88.0
    # Only unordered library is needed, so only headers are required
    ./bootstrap.sh --prefix=$BOOST_INSTALL_DIR --with-libraries=unordered
    ./b2 headers install
    cd ../
fi;


mkdir -p debian
echo 'obj-*-linux-gnu/gwlbtun usr/sbin' > debian/install

# changelog
cat <<EOF > debian/changelog
aws-gwlbtun (1.0-1) unstable; urgency=low

  * Initial release

 -- Your Name <your.email@example.com>  Wed, 29 Aug 2024 09:00:00 +0000

EOF

# control
/bin/bash -c "cat <<EOF > debian/control
Source: aws-gwlbtun
Section: net
Priority: optional
Maintainer: VyOS Package Maintainers <maintainers@vyos.net>
Build-Depends: debhelper-compat (= 13)
Standards-Version: 4.5.1
Homepage: https://github.com/aws-samples/aws-gateway-load-balancer-tunnel-handler

Package: aws-gwlbtun
Architecture: any
Depends: \${shlibs:Depends}, \${misc:Depends}
Description: AWS Gateway Load Balancer Tunnel Handler
 This is a simple package that handles tunneling for the AWS Gateway Load Balancer.
EOF
"

# rules
cat <<EOF > debian/rules
#!/usr/bin/make -f

%: dh $@

build:
	dh build

binary:
	dh binary

clean:
	dh clean

override_dh_auto_configure:
	dh_auto_configure -- -DBOOST_ROOT=$BOOST_INSTALL_DIR

EOF

chmod +x debian/rules
debuild -us -uc -b
'''
## Build cmd end

[dependencies]
packages = [
    "cmake"
]