Skip to content

Add section on downloading binaries #28

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

Merged
merged 4 commits into from
Dec 15, 2021
Merged
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
35 changes: 35 additions & 0 deletions pages/how-to/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,41 @@

This how-to guide covers the installation of the Fortran package manager (fpm) on various platforms.

## {fab}`apple` {fab}`linux` {fab}`windows` Download binaries

Binaries for macOS, Linux, and Windows (all on x86-64) are available for download for each release of fpm, as well as the latest (bleeding edge) release which mirrors the latest commit in the main branch of fpm.

Navigate to [fpm releases](https://github.com/fortran-lang/fpm/releases) to see all available releases.
The downloadable files are available at the bottom of each release section under *Assets*.
Click on the appropriate link based on your OS.
For example, to download a macOS fpm binary, click on the link that has *macos* in its name.
After downloading, you will need to make your binary executable.
On Linux and macOS, you can do this by typing

```{code-block} bash
chmod +x fpm-0.5.0-linux-x86_64
```

Optionally, place the binary in a directory that is globally accessible (*i.e.* in the ``PATH`` environment variable on Linux and macOS).
You can also rename the binary to just *fpm* for easier use.

For Windows, both a self-contained binary and a Windows Installer for fpm are available.

:::{note}
Links that end with ``.sha256`` provide the cryptographic hashes that you can use to verify if the download of your binary was successful.
To verify the integrity of the downloaded binary the checksum can be computed locally and compared with the one provided in the release

```{code-block} text
❯ openssl sha256 -r fpm-0.5.0-linux-x86_64
387782f29b19eb6fbf14dd5cef76907a4c9cb6d20726d5508a78225ccd131ca8 *fpm-0.5.0-linux-x86_64
❯ cat fpm-0.5.0-linux-x86_64.sha256
387782f29b19eb6fbf14dd5cef76907a4c9cb6d20726d5508a78225ccd131ca8 fpm-0.5.0-linux-x86_64
```

If the checksums mismatch, the download was most likely incomplete and the binary non-functional.
In this case, retry the download of the binary and confirm that the checksums match.
:::


## {fab}`windows` MSYS2 package manager

Expand Down