{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/nfpm/latest.json",
  "description": "nFPM configuration definition file",
  "x-lintel": {
    "source": "https://nfpm.goreleaser.com/static/schema.json",
    "sourceSha256": "02dc50b8b09d7684613141e1d16c637567f0c2ef5c386b0c2db07a88b837c54d",
    "fileMatch": [
      "nfpm.yaml"
    ],
    "parsers": [
      "yaml"
    ]
  },
  "$ref": "#/$defs/Config",
  "$defs": {
    "APK": {
      "properties": {
        "arch": {
          "type": "string",
          "title": "architecture in apk nomenclature"
        },
        "signature": {
          "$ref": "#/$defs/APKSignature",
          "title": "apk signature"
        },
        "scripts": {
          "$ref": "#/$defs/APKScripts",
          "title": "apk scripts"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "APKScripts": {
      "properties": {
        "preupgrade": {
          "type": "string",
          "title": "pre upgrade script"
        },
        "postupgrade": {
          "type": "string",
          "title": "post upgrade script"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "APKSignature": {
      "properties": {
        "key_file": {
          "type": "string",
          "title": "key file",
          "examples": [
            "key.gpg"
          ]
        },
        "key_id": {
          "type": "string",
          "title": "key id",
          "examples": [
            "bc8acdd415bd80b3"
          ]
        },
        "key_name": {
          "type": "string",
          "title": "key name",
          "default": "maintainer_email.rsa.pub",
          "examples": [
            "origin"
          ]
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "ArchLinux": {
      "properties": {
        "pkgbase": {
          "type": "string",
          "title": "explicitly specify the name used to refer to a split package"
        },
        "arch": {
          "type": "string",
          "title": "architecture in archlinux nomenclature"
        },
        "packager": {
          "type": "string",
          "title": "organization that packaged the software"
        },
        "scripts": {
          "$ref": "#/$defs/ArchLinuxScripts",
          "title": "archlinux-specific scripts"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "ArchLinuxScripts": {
      "properties": {
        "preupgrade": {
          "type": "string",
          "title": "preupgrade script"
        },
        "postupgrade": {
          "type": "string",
          "title": "postupgrade script"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "Config": {
      "properties": {
        "replaces": {
          "items": {
            "type": "string",
            "examples": [
              "nfpm"
            ]
          },
          "type": "array",
          "title": "replaces directive"
        },
        "provides": {
          "items": {
            "type": "string",
            "examples": [
              "nfpm"
            ]
          },
          "type": "array",
          "title": "provides directive"
        },
        "depends": {
          "items": {
            "type": "string",
            "examples": [
              "nfpm"
            ]
          },
          "type": "array",
          "title": "depends directive"
        },
        "recommends": {
          "items": {
            "type": "string",
            "examples": [
              "nfpm"
            ]
          },
          "type": "array",
          "title": "recommends directive"
        },
        "suggests": {
          "items": {
            "type": "string",
            "examples": [
              "nfpm"
            ]
          },
          "type": "array",
          "title": "suggests directive"
        },
        "conflicts": {
          "items": {
            "type": "string",
            "examples": [
              "nfpm"
            ]
          },
          "type": "array",
          "title": "conflicts directive"
        },
        "contents": {
          "$ref": "#/$defs/Contents",
          "title": "files to add to the package"
        },
        "umask": {
          "type": "integer",
          "title": "umask for file contents",
          "examples": [
            112
          ]
        },
        "scripts": {
          "$ref": "#/$defs/Scripts",
          "title": "scripts to execute"
        },
        "rpm": {
          "$ref": "#/$defs/RPM",
          "title": "rpm-specific settings"
        },
        "deb": {
          "$ref": "#/$defs/Deb",
          "title": "deb-specific settings"
        },
        "apk": {
          "$ref": "#/$defs/APK",
          "title": "apk-specific settings"
        },
        "archlinux": {
          "$ref": "#/$defs/ArchLinux",
          "title": "archlinux-specific settings"
        },
        "ipk": {
          "$ref": "#/$defs/IPK",
          "title": "ipk-specific settings"
        },
        "msix": {
          "$ref": "#/$defs/MSIX",
          "title": "msix-specific settings"
        },
        "name": {
          "type": "string",
          "title": "package name"
        },
        "arch": {
          "type": "string",
          "title": "target architecture",
          "examples": [
            "amd64"
          ]
        },
        "platform": {
          "type": "string",
          "title": "target platform",
          "default": "linux",
          "examples": [
            "linux"
          ]
        },
        "epoch": {
          "type": "string",
          "title": "version epoch",
          "default": "extracted from version",
          "examples": [
            "2"
          ]
        },
        "version": {
          "type": "string",
          "title": "version",
          "examples": [
            "v1.0.2",
            "2.0.1"
          ]
        },
        "version_schema": {
          "type": "string",
          "enum": [
            "semver",
            "none"
          ],
          "title": "version schema",
          "default": "semver"
        },
        "release": {
          "type": "string",
          "title": "version release",
          "examples": [
            "1"
          ]
        },
        "prerelease": {
          "type": "string",
          "title": "version prerelease",
          "default": "extracted from version"
        },
        "version_metadata": {
          "type": "string",
          "title": "version metadata",
          "examples": [
            "git"
          ]
        },
        "section": {
          "type": "string",
          "title": "package section",
          "examples": [
            "default"
          ]
        },
        "priority": {
          "type": "string",
          "title": "package priority",
          "examples": [
            "extra"
          ]
        },
        "maintainer": {
          "type": "string",
          "title": "package maintainer",
          "examples": [
            "me@example.com"
          ]
        },
        "description": {
          "type": "string",
          "title": "package description"
        },
        "vendor": {
          "type": "string",
          "title": "package vendor",
          "examples": [
            "MyCorp"
          ]
        },
        "homepage": {
          "type": "string",
          "title": "package homepage",
          "examples": [
            "https://example.com"
          ]
        },
        "license": {
          "type": "string",
          "title": "package license",
          "examples": [
            "MIT"
          ]
        },
        "changelog": {
          "type": "string",
          "title": "package changelog",
          "description": "see <https://github.com/goreleaser/chglog> for more details",
          "examples": [
            "changelog.yaml"
          ]
        },
        "disable_globbing": {
          "type": "boolean",
          "title": "whether to disable file globbing",
          "default": false
        },
        "mtime": {
          "type": "string",
          "format": "date-time",
          "title": "time to set into the files generated by nFPM"
        },
        "overrides": {
          "description": "override some fields when packaging with a specific packager",
          "type": "object",
          "title": "overrides",
          "additionalProperties": {
            "$ref": "#/$defs/Overridables"
          }
        }
      },
      "required": [
        "name",
        "arch",
        "version"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "Content": {
      "properties": {
        "src": {
          "type": "string"
        },
        "dst": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "symlink",
            "ghost",
            "config",
            "config|noreplace",
            "dir",
            "tree",
            ""
          ],
          "default": ""
        },
        "packager": {
          "type": "string"
        },
        "file_info": {
          "$ref": "#/$defs/ContentFileInfo"
        },
        "expand": {
          "type": "boolean"
        }
      },
      "required": [
        "dst"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "ContentFileInfo": {
      "properties": {
        "owner": {
          "type": "string"
        },
        "group": {
          "type": "string"
        },
        "mode": {
          "type": "integer"
        },
        "mtime": {
          "type": "string",
          "format": "date-time"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "Contents": {
      "items": {
        "$ref": "#/$defs/Content"
      },
      "type": "array"
    },
    "Deb": {
      "properties": {
        "arch": {
          "type": "string",
          "title": "architecture in deb nomenclature"
        },
        "arch_variant": {
          "type": "string",
          "title": "target architecture variant in deb nomenclature",
          "examples": [
            "amd64v3"
          ]
        },
        "scripts": {
          "$ref": "#/$defs/DebScripts",
          "title": "scripts"
        },
        "triggers": {
          "$ref": "#/$defs/DebTriggers",
          "title": "triggers"
        },
        "breaks": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "breaks"
        },
        "signature": {
          "$ref": "#/$defs/DebSignature",
          "title": "signature"
        },
        "compression": {
          "type": "string",
          "enum": [
            "gzip",
            "xz",
            "zstd",
            "none"
          ],
          "title": "compression algorithm to be used",
          "default": "gzip:-1"
        },
        "fields": {
          "title": "fields",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "predepends": {
          "items": {
            "type": "string",
            "examples": [
              "nfpm"
            ]
          },
          "type": "array",
          "title": "predepends directive"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "DebScripts": {
      "properties": {
        "rules": {
          "type": "string",
          "title": "rules"
        },
        "templates": {
          "type": "string",
          "title": "templates"
        },
        "config": {
          "type": "string",
          "title": "config"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "DebSignature": {
      "properties": {
        "key_file": {
          "type": "string",
          "title": "key file",
          "examples": [
            "key.gpg"
          ]
        },
        "key_id": {
          "type": "string",
          "title": "key id",
          "examples": [
            "bc8acdd415bd80b3"
          ]
        },
        "method": {
          "type": "string",
          "enum": [
            "dpkg-sig",
            "debsign"
          ],
          "title": "method role",
          "default": "debsign"
        },
        "type": {
          "type": "string",
          "enum": [
            "origin",
            "maint",
            "archive"
          ],
          "title": "signer role",
          "default": "origin"
        },
        "signer": {
          "type": "string",
          "title": "signer"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "DebTriggers": {
      "properties": {
        "interest": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "interest"
        },
        "interest_await": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "interest await"
        },
        "interest_noawait": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "interest noawait"
        },
        "activate": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "activate"
        },
        "activate_await": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "activate await"
        },
        "activate_noawait": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "activate noawait"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "IPK": {
      "properties": {
        "abi_version": {
          "type": "string",
          "title": "abi version"
        },
        "alternatives": {
          "items": {
            "$ref": "#/$defs/IPKAlternative"
          },
          "type": "array",
          "title": "alternatives"
        },
        "arch": {
          "type": "string",
          "title": "architecture in deb nomenclature"
        },
        "auto_installed": {
          "type": "boolean",
          "title": "auto installed",
          "default": false
        },
        "essential": {
          "type": "boolean",
          "title": "whether package is essential",
          "default": false
        },
        "fields": {
          "title": "fields",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "predepends": {
          "items": {
            "type": "string",
            "examples": [
              "nfpm"
            ]
          },
          "type": "array",
          "title": "predepends directive"
        },
        "tags": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "tags"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "IPKAlternative": {
      "properties": {
        "priority": {
          "type": "integer",
          "title": "priority"
        },
        "target": {
          "type": "string",
          "title": "target"
        },
        "link_name": {
          "type": "string",
          "title": "link name"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "MSIX": {
      "properties": {
        "arch": {
          "type": "string",
          "title": "architecture in msix nomenclature"
        },
        "publisher": {
          "type": "string",
          "title": "publisher identity",
          "examples": [
            "CN=MyCompany, O=MyCompany, C=US"
          ]
        },
        "identity": {
          "$ref": "#/$defs/MSIXIdentity",
          "title": "package identity"
        },
        "properties": {
          "$ref": "#/$defs/MSIXProperties",
          "title": "package properties"
        },
        "applications": {
          "items": {
            "$ref": "#/$defs/MSIXApplication"
          },
          "type": "array",
          "title": "applications in the package"
        },
        "dependencies": {
          "$ref": "#/$defs/MSIXDependencies",
          "title": "target device families"
        },
        "capabilities": {
          "$ref": "#/$defs/MSIXCapabilities",
          "title": "package capabilities"
        },
        "signature": {
          "$ref": "#/$defs/MSIXSignature",
          "title": "msix signature"
        }
      },
      "required": [
        "publisher",
        "applications"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "MSIXApplication": {
      "properties": {
        "id": {
          "type": "string",
          "title": "application ID"
        },
        "executable": {
          "type": "string",
          "title": "executable path in package"
        },
        "entry_point": {
          "type": "string",
          "title": "entry point",
          "default": "Windows.FullTrustApplication"
        },
        "visual_elements": {
          "$ref": "#/$defs/MSIXVisualElements",
          "title": "visual elements"
        }
      },
      "required": [
        "id",
        "executable"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "MSIXCapabilities": {
      "properties": {
        "capabilities": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "device_capabilities": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "restricted": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "MSIXDependencies": {
      "properties": {
        "target_device_families": {
          "items": {
            "$ref": "#/$defs/MSIXTargetDeviceFamily"
          },
          "type": "array"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "MSIXIdentity": {
      "properties": {
        "resource_id": {
          "type": "string",
          "title": "resource identifier"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "MSIXProperties": {
      "properties": {
        "display_name": {
          "type": "string",
          "title": "display name"
        },
        "publisher_display_name": {
          "type": "string",
          "title": "publisher display name"
        },
        "logo": {
          "type": "string",
          "title": "package logo path"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "MSIXSignature": {
      "properties": {
        "pfx_file": {
          "type": "string",
          "title": "PFX certificate file"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "MSIXTargetDeviceFamily": {
      "properties": {
        "name": {
          "type": "string",
          "title": "device family name",
          "examples": [
            "Windows.Desktop"
          ]
        },
        "min_version": {
          "type": "string",
          "title": "minimum OS version",
          "examples": [
            "10.0.17763.0"
          ]
        },
        "max_version_tested": {
          "type": "string",
          "title": "max tested version",
          "examples": [
            "10.0.22621.0"
          ]
        }
      },
      "required": [
        "name",
        "min_version",
        "max_version_tested"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "MSIXVisualElements": {
      "properties": {
        "display_name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "background_color": {
          "type": "string",
          "default": "transparent"
        },
        "square150x150_logo": {
          "type": "string"
        },
        "square44x44_logo": {
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "Overridables": {
      "properties": {
        "replaces": {
          "items": {
            "type": "string",
            "examples": [
              "nfpm"
            ]
          },
          "type": "array",
          "title": "replaces directive"
        },
        "provides": {
          "items": {
            "type": "string",
            "examples": [
              "nfpm"
            ]
          },
          "type": "array",
          "title": "provides directive"
        },
        "depends": {
          "items": {
            "type": "string",
            "examples": [
              "nfpm"
            ]
          },
          "type": "array",
          "title": "depends directive"
        },
        "recommends": {
          "items": {
            "type": "string",
            "examples": [
              "nfpm"
            ]
          },
          "type": "array",
          "title": "recommends directive"
        },
        "suggests": {
          "items": {
            "type": "string",
            "examples": [
              "nfpm"
            ]
          },
          "type": "array",
          "title": "suggests directive"
        },
        "conflicts": {
          "items": {
            "type": "string",
            "examples": [
              "nfpm"
            ]
          },
          "type": "array",
          "title": "conflicts directive"
        },
        "contents": {
          "$ref": "#/$defs/Contents",
          "title": "files to add to the package"
        },
        "umask": {
          "type": "integer",
          "title": "umask for file contents",
          "examples": [
            112
          ]
        },
        "scripts": {
          "$ref": "#/$defs/Scripts",
          "title": "scripts to execute"
        },
        "rpm": {
          "$ref": "#/$defs/RPM",
          "title": "rpm-specific settings"
        },
        "deb": {
          "$ref": "#/$defs/Deb",
          "title": "deb-specific settings"
        },
        "apk": {
          "$ref": "#/$defs/APK",
          "title": "apk-specific settings"
        },
        "archlinux": {
          "$ref": "#/$defs/ArchLinux",
          "title": "archlinux-specific settings"
        },
        "ipk": {
          "$ref": "#/$defs/IPK",
          "title": "ipk-specific settings"
        },
        "msix": {
          "$ref": "#/$defs/MSIX",
          "title": "msix-specific settings"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "RPM": {
      "properties": {
        "arch": {
          "type": "string",
          "title": "architecture in rpm nomenclature"
        },
        "buildhost": {
          "type": "string",
          "title": "host name of the build environment"
        },
        "scripts": {
          "$ref": "#/$defs/RPMScripts",
          "title": "rpm-specific scripts"
        },
        "group": {
          "type": "string",
          "title": "package group",
          "examples": [
            "Unspecified"
          ]
        },
        "summary": {
          "type": "string",
          "title": "package summary"
        },
        "compression": {
          "type": "string",
          "enum": [
            "gzip",
            "lzma",
            "xz",
            "zstd"
          ],
          "title": "compression algorithm to be used",
          "default": "gzip:-1"
        },
        "signature": {
          "$ref": "#/$defs/RPMSignature",
          "title": "rpm signature"
        },
        "packager": {
          "type": "string",
          "title": "organization that actually packaged the software"
        },
        "prefixes": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Prefixes for relocatable packages"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "RPMScripts": {
      "properties": {
        "pretrans": {
          "type": "string",
          "title": "pretrans script"
        },
        "posttrans": {
          "type": "string",
          "title": "posttrans script"
        },
        "verify": {
          "type": "string",
          "title": "verify script"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "RPMSignature": {
      "properties": {
        "key_file": {
          "type": "string",
          "title": "key file",
          "examples": [
            "key.gpg"
          ]
        },
        "key_id": {
          "type": "string",
          "title": "key id",
          "examples": [
            "bc8acdd415bd80b3"
          ]
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "Scripts": {
      "properties": {
        "preinstall": {
          "type": "string",
          "title": "pre install"
        },
        "postinstall": {
          "type": "string",
          "title": "post install"
        },
        "preremove": {
          "type": "string",
          "title": "pre remove"
        },
        "postremove": {
          "type": "string",
          "title": "post remove"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  }
}
