2020-07-10 07:06:39 +02:00
|
|
|
# Configuration
|
|
|
|
|
2020-07-10 07:16:16 +02:00
|
|
|
## Reference
|
|
|
|
|
2020-07-10 07:06:39 +02:00
|
|
|
A commented out `nfpm.yaml` config file example:
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
# Name. (required)
|
|
|
|
name: foo
|
|
|
|
|
|
|
|
# Architecture. (required)
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
# Platform.
|
|
|
|
# Defaults to `linux`.
|
|
|
|
platform: linux
|
|
|
|
|
|
|
|
# Version. (required)
|
|
|
|
version: v1.2.3
|
|
|
|
|
|
|
|
# Version Epoch.
|
|
|
|
# Default is extracted from `version` if it is semver compatible.
|
|
|
|
epoch: 2
|
|
|
|
|
|
|
|
# Version Prerelease.
|
|
|
|
# Default is extracted from `version` if it is semver compatible.
|
|
|
|
prerelease: beta1
|
|
|
|
|
2020-08-20 06:00:17 +02:00
|
|
|
# Version Metadata (previously deb.metadata).
|
|
|
|
# Default is extracted from `version` if it is semver compatible.
|
|
|
|
# Setting metadata might interfere with version comparisons depending on the packager.
|
|
|
|
version_metadata: git
|
|
|
|
|
|
|
|
# Version Release.
|
|
|
|
release: 1
|
|
|
|
|
2020-07-10 07:06:39 +02:00
|
|
|
# Section.
|
|
|
|
section: default
|
|
|
|
|
|
|
|
# Priority.
|
|
|
|
priority: extra
|
|
|
|
|
|
|
|
# Maintaner.
|
|
|
|
maintainer: Carlos Alexandro Becker <root@carlosbecker.com>
|
|
|
|
|
|
|
|
# Description.
|
|
|
|
# Defaults to `no description given`.
|
|
|
|
description: Sample package
|
|
|
|
|
|
|
|
# Vendor.
|
|
|
|
vendor: GoReleaser
|
|
|
|
|
|
|
|
# Package's homepage.
|
|
|
|
homepage: https://nfpm.goreleaser.com
|
|
|
|
|
|
|
|
# License.
|
|
|
|
license: MIT
|
|
|
|
|
2020-07-13 17:10:03 +02:00
|
|
|
# Changelog YAML file, see: https://github.com/goreleaser/chglog
|
|
|
|
changelog: "changelog.yaml"
|
|
|
|
|
2020-07-10 07:06:39 +02:00
|
|
|
# Packages it replaces. (overridable)
|
|
|
|
replaces:
|
2020-09-01 21:27:29 +02:00
|
|
|
- foobar
|
2020-07-10 07:06:39 +02:00
|
|
|
|
|
|
|
# Packages it provides. (overridable)
|
|
|
|
provides:
|
2020-09-01 21:27:29 +02:00
|
|
|
- bar
|
2020-07-10 07:06:39 +02:00
|
|
|
|
|
|
|
# Dependencies. (overridable)
|
|
|
|
depends:
|
2020-09-01 21:27:29 +02:00
|
|
|
- git
|
2020-07-10 07:06:39 +02:00
|
|
|
|
|
|
|
# Recommended packages. (overridable)
|
|
|
|
recommends:
|
2020-09-01 21:27:29 +02:00
|
|
|
- golang
|
2020-07-10 07:06:39 +02:00
|
|
|
|
|
|
|
# Suggested packages. (overridable)
|
|
|
|
suggests:
|
2020-09-01 21:27:29 +02:00
|
|
|
- bzr
|
2020-07-10 07:06:39 +02:00
|
|
|
|
|
|
|
# Packages it conflicts with. (overridable)
|
|
|
|
conflicts:
|
2020-09-01 21:27:29 +02:00
|
|
|
- mercurial
|
2020-07-10 07:06:39 +02:00
|
|
|
|
|
|
|
# Files to add to the package. (overridable)
|
|
|
|
# This can be binaries or any other files.
|
|
|
|
#
|
|
|
|
# Key is the local file, value is the path inside the package.
|
|
|
|
files:
|
|
|
|
path/to/local/foo: /usr/local/bin/foo
|
|
|
|
|
|
|
|
# Config files are dealt with differently when upgrading and uninstalling the
|
|
|
|
# package. (overridable)
|
|
|
|
#
|
|
|
|
# Key is the local file, value is the path inside the package
|
|
|
|
config_files:
|
|
|
|
path/to/local/foo.con: /etc/foo.conf
|
|
|
|
|
|
|
|
# Empty folders your package may need created. (overridable)
|
|
|
|
empty_folders:
|
2020-09-01 21:27:29 +02:00
|
|
|
- /var/log/foo
|
2020-07-10 07:06:39 +02:00
|
|
|
|
2020-07-30 04:20:50 +02:00
|
|
|
# Symlinks mapping from symlink name inside package to target inside package (overridable)
|
|
|
|
symlinks:
|
|
|
|
/sbin/foo: /usr/local/bin/foo
|
|
|
|
|
2020-07-10 07:06:39 +02:00
|
|
|
# Scripts to run at specific stages. (overridable)
|
|
|
|
scripts:
|
|
|
|
preinstall: ./scripts/preinstall.sh
|
|
|
|
postinstall: ./scripts/postinstall.sh
|
|
|
|
preremove: ./scripts/preremove.sh
|
|
|
|
postremove: ./scripts/postremove.sh
|
|
|
|
|
2020-08-17 22:53:49 +02:00
|
|
|
# All fields above marked as `overridable` can be overriden for a given package format in this section.
|
|
|
|
overrides:
|
2020-08-18 21:14:13 +02:00
|
|
|
# The depends override can for example be used to provide version constraints for dependencies where
|
|
|
|
# different package formats use different versions or for dependencies that are named differently.
|
2020-08-17 22:53:49 +02:00
|
|
|
deb:
|
2020-08-18 21:14:13 +02:00
|
|
|
depends:
|
|
|
|
- baz (>= 1.2.3-0)
|
|
|
|
- some-lib-dev
|
2020-08-17 22:53:49 +02:00
|
|
|
# ...
|
|
|
|
rpm:
|
2020-08-18 21:14:13 +02:00
|
|
|
depends:
|
|
|
|
- baz >= 1.2.3-0
|
|
|
|
- some-lib-devel
|
2020-08-17 22:53:49 +02:00
|
|
|
# ...
|
|
|
|
apk:
|
|
|
|
# ...
|
|
|
|
|
2020-07-10 07:06:39 +02:00
|
|
|
# Custon configuration applied only to the RPM packager.
|
|
|
|
rpm:
|
2020-08-04 20:41:54 +02:00
|
|
|
# The package group. This option is deprecated by most distros
|
|
|
|
# but required by old distros like CentOS 5 / EL 5 and earlier.
|
|
|
|
group: Unspecified
|
2020-07-10 07:06:39 +02:00
|
|
|
|
|
|
|
# Compression algorithm.
|
|
|
|
compression: lzma
|
|
|
|
|
2020-08-04 19:44:13 +02:00
|
|
|
# These config files will not be replaced by new versions if they were
|
|
|
|
# changed by the user. Corresponds to %config(noreplace).
|
|
|
|
config_noreplace_files:
|
|
|
|
path/to/local/bar.con: /etc/bar.conf
|
|
|
|
|
2020-07-10 07:06:39 +02:00
|
|
|
# Custon configuration applied only to the Deb packager.
|
|
|
|
deb:
|
|
|
|
# Custom deb rules script.
|
|
|
|
scripts:
|
|
|
|
rules: foo.sh
|
2020-07-27 18:22:06 +02:00
|
|
|
|
|
|
|
# Custom deb triggers
|
|
|
|
triggers:
|
|
|
|
# register interrest on a trigger activated by another package
|
|
|
|
# (also available: interest_await, interest_noawait)
|
|
|
|
interest:
|
|
|
|
- some-trigger-name
|
|
|
|
# activate a trigger for another package
|
|
|
|
# (also available: activate_await, activate_noawait)
|
|
|
|
activate:
|
|
|
|
- another-trigger-name
|
2020-09-01 21:27:29 +02:00
|
|
|
|
|
|
|
# Packages which would break if this package would be installed.
|
|
|
|
# The installation of this package is blocked if `some-package`
|
|
|
|
# is already installed.
|
|
|
|
breaks:
|
|
|
|
- some-package
|
2020-07-10 07:06:39 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
## Templating
|
|
|
|
|
|
|
|
Templating is not and will not be supported.
|
|
|
|
|
|
|
|
If you really need it, you can build on top of NFPM, use `envsubst`, `jsonnet`
|
2020-07-10 07:16:16 +02:00
|
|
|
or apply some other templating on top of it.
|