|
root / examples / package.toml
package.toml TOML 106 lines 3.2 KB
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
# Coral Package Definition
# /usr/ports/<category>/<name>/package.toml
#
# This is a sample package.toml showing all available options.
# Only [package] section with name and version is required.

[package]
# Required: Package name (lowercase, alphanumeric, hyphens allowed)
name = "example-package"

# Required: Package version (semantic versioning recommended)
version = "1.2.3"

# Package release number (increment when rebuilding same version)
release = 1

# Short description of the package
description = "An example package demonstrating all package.toml options"

# Project homepage URL
url = "https://example.com/example-package"

# License identifier (SPDX recommended: MIT, BSD-2-Clause, GPL-3.0, etc.)
license = "MIT"

# Package maintainer
maintainer = "Your Name <you@example.com>"

# Target architecture (x86_64, aarch64, or "any" for arch-independent)
arch = "x86_64"

# Alternative package names this provides (for dependency resolution)
# If another package depends on "editor", this package can satisfy it
alternatives = ["editor", "text-editor"]

# Packages this conflicts with (cannot be installed together)
conflicts = ["other-editor"]

[dependencies]
# Packages required at runtime
runtime = ["libfoo", "libbar"]

# Packages required only for building
build = ["gcc", "gmake", "pkg-config"]

# Alternative dependencies: any one of the listed packages satisfies the dep
# Format: "base_name:option1,option2,option3"
# Example: depends on any database
# runtime = ["database:postgresql,mysql,sqlite"]

# =============================================================================
# Source Files - New format with mirror support (recommended)
# =============================================================================

# Each [[source]] block defines a source file to download
[[source]]
# Output filename (what to save the file as)
file = "example-package-1.2.3.tar.gz"

# URLs to download from (tried in order until success)
# Can mix remote URLs and local files (relative to port directory)
urls = [
    "https://example.com/releases/example-package-1.2.3.tar.gz",
    "https://mirror.example.org/example-package-1.2.3.tar.gz",
    "example-package-1.2.3.tar.gz"
]

# SHA256 checksum for verification
# Use "SKIP" to skip verification (not recommended for production)
checksum = "abc123def456789..."

# Whether to extract the archive (default: true)
# Set to false for files that shouldn't be extracted (patches, data files)
extract = true

# Multiple sources example:
# [[source]]
# file = "extra-data.tar.gz"
# urls = ["https://example.com/extra-data.tar.gz"]
# checksum = "789xyz..."
# extract = false

# =============================================================================
# Legacy Source Format (deprecated, still supported)
# =============================================================================
# [sources]
# urls = ["https://example.com/example-package-1.2.3.tar.gz"]
# checksums = ["abc123def456789..."]

[patches]
# Patch files to apply (in order), relative to port directory
files = [
    "patches/fix-build.patch",
    "patches/add-feature.patch"
]

# Strip level for patch command (-p flag)
strip = 1

[build]
# Enable parallel builds
parallel = true

# Number of parallel jobs (0 = auto-detect, uses JOBS env var)
jobs = 0