gitee.com/mirrors_opencollective/goreleaser@v0.45.0/docs/100-fpm.md (about)

     1  ---
     2  title: FPM
     3  ---
     4  
     5  GoReleaser can be wired to [fpm](https://github.com/jordansissel/fpm) to
     6  generate `.deb`, `.rpm` and other archives. Check its
     7  [wiki](https://github.com/jordansissel/fpm/wiki) for more info.
     8  
     9  ```yml
    10  # .goreleaser.yml
    11  fpm:
    12    # You can change the name of the package.
    13    # This is parsed with the Go template engine and the following variables
    14    # are available:
    15    # - ProjectName
    16    # - Tag
    17    # - Version (Git tag without `v` prefix)
    18    # - Os
    19    # - Arch
    20    # - Arm (ARM version)
    21    # - Env (environment variables)
    22    # Default: `{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}`
    23    name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
    24  
    25    # Replacements for GOOS and GOARCH in the package name.
    26    # Keys should be valid GOOSs or GOARCHs.
    27    # Values are the respective replacements.
    28    # Default is empty.
    29    replacements:
    30      amd64: 64-bit
    31      386: 32-bit
    32      darwin: macOS
    33      linux: Tux
    34  
    35    # Your app's vendor.
    36    # Default is empty.
    37    vendor: Drum Roll Inc.
    38    # Your app's homepage.
    39    # Default is empty.
    40    homepage: https://example.com/
    41  
    42    # Your app's maintainer (probably you).
    43    # Default is empty.
    44    maintainer: Drummer <drum-roll@example.com>
    45  
    46    # Your app's description.
    47    # Default is empty.
    48    description: Software to create fast and easy drum rolls.
    49  
    50    # Your app's license.
    51    # Default is empty.
    52    license: Apache 2.0
    53  
    54    # Formats to be generated.
    55    formats:
    56      - deb
    57      - rpm
    58  
    59    # Packages your package depends on.
    60    dependencies:
    61      - git
    62      - zsh
    63  
    64    # Packages that conflict with your package.
    65    conflicts:
    66      - svn
    67      - bash
    68  
    69    # Override default /usr/local/bin destination for binaries
    70    bindir: /usr/bin
    71  
    72    # Files or directories to add to your package (beyond the binary).
    73    # Keys are source paths to get the files from.
    74    # Values are the destination locations of the files in the package.
    75    files:
    76      "scripts/etc/init.d/": "/etc/init.d"
    77  ```
    78  
    79  Note that GoReleaser will not install `fpm` or any of its dependencies for you.