Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NetCDF] provide a template build script #513

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions N/NetCDF/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder, Pkg

name = "NetCDF"
version = v"4.7.3"

# Collection of sources required to complete build
sources = [
FileSource("https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-c-$version.tar.gz", "8e8c9f4ee15531debcf83788594744bd6553b8489c06a43485a15c93b4e0448b"),
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/netcdf-c-*
./configure --prefix=${prefix} --build=${MACHTYPE} --host=${target} \
--disable-static
make -j${nproc}
make install
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
# Set equal to the supported platforms in HDF5
platforms = [
Linux(:x86_64),
Linux(:i686),
Linux(:armv7l, libc=:glibc, call_abi=:eabihf),
Linux(:aarch64, libc=:glibc),
MacOS(),
Windows(:x86_64),
Windows(:i686),
]


# The products that we will ensure are always built
products = [
LibraryProduct("libnetcdf", :libnetcdf),
]

# Dependencies that must be installed before this package can be built
dependencies = [
"HDF5_jll",
"Zlib_jll",
"LibCURL_jll",
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies)