mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
This directory contains scripts and files to package libsodium for .NET Core.
In .NET Core, it is customary to provide pre-compiled binaries for all platforms
as NuGet packages. The purpose of the prepare.py script in this directory is
to generate a Makefile that downloads and builds libsodium binaries for a
number of platforms and assembles them in a NuGet package that can be uploaded
to nuget.org.
- For Windows, binaries are obtained from download.libsodium.org.
- For macOS, binaries are extracted from the Homebrew libsodium bottle.
- For Linux, libsodium is compiled in Docker containers.
See prepare.py for the complete list of supported platforms.
The metadata for the NuGet package is located in libsodium.props.
Making a pre-release
- Run
python3 prepare.py 1.0.13-preview-01to generate theMakefile.1.0.13is the libsodium version number;01is the pre-release number and needs to be incremented for each pre-release. - Take a look at the generated
Makefile. It usessudoa few times. - Run
maketo download and build the binaries and create the NuGet package. You may need to installdocker,make,curl,tarandunzipfirst. The NuGet package is output as a.nupkgfile in thebuilddirectory. - Grab a cup of coffee. Downloading the Docker images and compiling the Linux binaries takes a while.
- Verify that everything in the
.nupkgfile is in place. - Publish the release by uploading the
.nupkgfile to nuget.org.
Making a release
- Run
python3 prepare.py 1.0.13to generate theMakefile.
The remaining steps are the same.