User Commands  - fpm_license (1)

NAME

fpm-license(1f) - [FPM:LICENSES] write out common licenses as text or subroutines (LICENSE:MIT)

CONTENTS

Synopsis
Description
Options
Spx Names
Examples
See Also

SYNOPSIS

fpm-license [spdx_tagname(s)][--all][--fortran][--verbose][--config FILENAME]

fpm-license --file FILENAME [--config FILENAME]

fpm-license --help|--version

DESCRIPTION

fpm-license(1) can generate common license files as plain text and as a Fortran subroutine, with a mechanism for replacing string macros in the license.

     + fpm projects often require or preferably contain a LICENSE.txt file.

+ Some programs want to contain a subroutine that can be called to display the license.

+ Typically the output requires editing to insert specific names, dates and organizations as appropriate. A configuration file can be created to allow for automatic string substitutions. There are pre-defined macros for the current date.

OPTIONS

SPDX tagnames(s)
  SPDX tagname of license to display. All supported tag names are displayed by default.
--fortran
  format license as a Fortran subroutine
--all display all supported license text
--file FILENAME
  ignore other options and format file as a Fortran subroutine. FILENAME defaults to stdin.
--config=FILENAME
  File of form LHS=>RHS that is used to replace strings in the output. Built-in strings are
                         @YEAR@=>YYYY # where YYYY is current year
                         @MONTH@=>MM  # where MM is current month
                         @DAY@=>DD    # where DD is current day

Strings are case-sensitive and all spaces are significant except trailing space on the RHS. Strings requiring editing often appear delimited by an at sign (@), such as "@FULLNAME@". Lines not containing "=>" are ignored.
 

The value of the environment variable FPM_LICENSE_CONFIG is used as the default.

--verbose,-V
  verbose mode
--version,-v
  Print version information on standard output then exit successfully.
--help,-h
  Print usage information on standard output then exit successfully.

SPX NAMES

Currently available license descriptions include

      ------------------------------------------      ----------------
      License                                         License keyword
      ------------------------------------------      ----------------
      Academic Free License v3.0                      AFL-3.0
      Apache license 2.0                              Apache-2.0
      Artistic license 2.0                            Artistic-2.0
      Boost Software License 1.0                      BSL-1.0
      BSD 2-clause "Simplified" license               BSD-2-Clause
      BSD 3-clause "New" or "Revised" license         BSD-3-Clause
      BSD 3-clause Clear license                      BSD-3-Clause-Clear
      BSD 4-clause "Original" or "Old" license        BSD-4-Clause
      BSD Zero-Clause license                         0BSD
      Creative Commons license family                 CC
      Creative Commons Zero v1.0 Universal            CC0-1.0
      Creative Commons Attribution 4.0                CC-BY-4.0
      Creative Commons Attribution ShareAlike 4.0     CC-BY-SA-4.0
      Do What The F*ck You Want To Public License     WTFPL
      Educational Community License v2.0              ECL-2.0
      Eclipse Public License 1.0                      EPL-1.0
      Eclipse Public License 2.0                      EPL-2.0
      European Union Public License 1.1               EUPL-1.1
      GNU Affero General Public License v3.0          AGPL-3.0
      GNU General Public License family               GPL
      GNU General Public License v2.0                 GPL-2.0
      GNU General Public License v3.0                 GPL-3.0
      GNU Lesser General Public License family        LGPL
      GNU Lesser General Public License v2.1          LGPL-2.1
      GNU Lesser General Public License v3.0          LGPL-3.0
      Internet Software Consortium                    ISC
      LaTeX Project Public License v1.3c              LPPL-1.3c
      Microsoft Public License                        MS-PL
      Massachusetts Institute of Technology           MIT
      Mozilla Public License 2.0                      MPL-2.0
      Open Software License 3.0                       OSL-3.0
      PostgreSQL License                              PostgreSQL
      SIL Open Font License 1.1                       OFL-1.1
      University of Illinois/NCSA Open Source License NCSA
      The Unlicense                                   Unlicense
      zLib License                                    Zlib

EXAMPLES

Sample commands:

    fpm-license  # display available license names
    fpm-license mit > LICENSE.txt # create a specific license file
    fpm-license --fortran mit # write license as Fortran code

fpm-license --all # display all supported license descriptions fpm-license --help # display this help text

# write a license file using specified string substitutions # from configuration file cat > $HOME/.local/config/FPM_LICENSE_CONFIG <<\EOF @FULLNAME@=>John S. Urban [name of copyright holder]=> John S. Urban [name of copyright owner]=> John S. Urban

    EOF

fpm-license cc0-1.0 --config $HOME/.local/config/FPM_LICENSE_CONFIG

SEE ALSO

o Wikipedia contains descriptions of many license descriptions
o https://spdx.dev/learn/areas-of-interest/licensing
o https://spdx.org/licenses/
o https://docs.github.com/en/repositories/... managing-your-repositorys-settings-and-features/... customizing-your-repository/licensing-a-repository
o https://opensource.guide/legal/... #which-open-source-license-is-appropriate-for-my-project


Nemo Release 3.1 fpm_license (1) February 23, 2025
Generated by manServer 1.08 from f1421070-087c-4a4c-bddb-944457d6d065 using man macros.