Skip to content

Commit

Permalink
initial iperf config
Browse files Browse the repository at this point in the history
  • Loading branch information
sebroy committed May 2, 2024
1 parent 306f27a commit acaec78
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions packages/iperf/config.sh
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit acaec78

Please sign in to comment.