From acaec787f268d6f1ceaf3e28f47edbc61fe3cc1a Mon Sep 17 00:00:00 2001 From: Sebastien Roy Date: Thu, 2 May 2024 16:52:36 -0400 Subject: [PATCH] initial iperf config --- packages/iperf/config.sh | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 packages/iperf/config.sh diff --git a/packages/iperf/config.sh b/packages/iperf/config.sh new file mode 100644 index 0000000..215e9e1 --- /dev/null +++ b/packages/iperf/config.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash +# +# Copyright 2024 Delphix +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# shellcheck disable=SC2034 + +DEFAULT_PACKAGE_GIT_URL="https://github.com/delphix/iperf.git" +UPSTREAM_GIT_URL="https://github.com/esnet/iperf" +AUTOCONF="autoconf-2.71" +AUTOCONF_TAR="$AUTOCONF.tar.xz" +AUTOCONF_URL="https://artifactory.delphix.com/artifactory/linux-pkg/autoconf/$AUTOCONF_TAR" +AUTOCONF_SHA256="f14c83cfebcc9427f2c3cea7258bd90df972d92eb26752da4ddad81c87a0faa4" + +# +# iperf requires autoconf 2.71 to build. That version isn't provided by Ubuntu, +# so we need to fetch and build it prior to building the iperf package. The +# 'make install' step will install the autoconf binaries in /usr/local/bin, +# which before /usr/bin in $PATH. This will ensure that the installed version +# of autoconf gets used. +# +function prepare() { + logmust install_pkgs m4 + logmust fetch_file_from_artifactory "$AUTOCONF_URL" "$AUTOCONF_SHA256" + logmust tar -xvf "$AUTOCONF_TAR" + logmust cd $AUTOCONF + logmust ./configure + logmust make + logmust make install +} + +function build() { + logmust cd "$WORKDIR/repo" + logmust dpkg_buildpackage_default +}