forked from delphix/linux-pkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |