summaryrefslogtreecommitdiff
path: root/packages/hsflowd/build.sh
blob: 0b00c99841fdea4ea397156441ca77873e8f46f0 (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
#!/bin/bash
CWD=$(pwd)
set -e

SRC=host-sflow

if [ ! -d ${SRC} ]; then
    echo "source directory does not exists, please 'git clone'"
    exit 1
fi

cd ${SRC}

echo "I: Ensure Debian build dependencies are met"
sudo apt-get install -y libpcap0.8-dev

# Build hsflowd
# make deb FEATURES="NFLOG PCAP TCP DOCKER KVM OVS DBUS SYSTEMD DROPMON PSAMPLE DENT CONTAINERD"
echo "I: Build VyOS hsflowd Package"
make deb FEATURES="PCAP DROPMON DBUS"

# hsflowd builds ARM package as aarch64 extension, rename to arm64
for file in *.deb ; do mv $file ${file//aarch64/arm64} || true ; done

# Do not confuse *.deb upload logic by removing build in debian packages ...
# ugly but works
find src -name "*.deb" -type f -exec rm {} \;