mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-23 20:15:19 -07:00
.. | ||
recipes | ||
.gitignore | ||
libsodium.props | ||
prepare.py | ||
README.md |
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-01
to generate theMakefile
.1.0.13
is the libsodium version number;01
is the pre-release number and needs to be incremented for each pre-release. - Take a look at the generated
Makefile
. It usessudo
a few times. - Run
make
to download and build the binaries and create the NuGet package. You may need to installdocker
,make
,curl
,tar
andunzip
first. The NuGet package is output as a.nupkg
file in thebuild
directory. - Grab a cup of coffee. Downloading the Docker images and compiling the Linux binaries takes a while.
- Verify that everything in the
.nupkg
file is in place. - Publish the release by uploading the
.nupkg
file to nuget.org.
Making a release
- Run
python3 prepare.py 1.0.13
to generate theMakefile
.
The remaining steps are the same.