|
root / examples
examples Plain Text 208 lines 5.1 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# Coral Package Manager Configuration
# /etc/coral/coral.conf
#
# This is a sample configuration file showing all available options.
# Copy to /etc/coral/coral.conf and modify as needed.

[general]
# Target architecture
arch = "amd64"

# Parallel build jobs (0 = auto-detect CPU count)
jobs = 0

# Ask for confirmation before operations
confirm = true

# Enable colored output
color = true

[paths]
# Alternate root directory (empty = /, used for cross-building)
root = ""

# Installation prefix
prefix = "/usr/local"

# Ports tree location
ports = "/usr/zports"

# Built packages cache
packages = "/usr/zports/pkgs/packages"

# Downloaded sources cache
sources = "/usr/zports/pkgs/sources"

# Installed package database
database = "/var/lib/coral/installed"

# Ports index directory
index = "/var/lib/coral/db"

# Build work directory
build = "/usr/zports/pkgs/build"

[build]
# Default C compiler flags
cflags = "-O2 -pipe"

# Default C++ compiler flags
cxxflags = "-O2 -pipe"

# Default make flags
makeflags = ""

# Strip binaries
strip = true

# Compress man pages
compress_man = true

# Fall back to building from source if binary not available
fallback_to_source = true

# Clean work directory after successful build
clean_work = true

# Clean package staging directory after successful build
clean_pkg = true

# Log build output to file (in work directory)
logging = true

# Hide subprocess output from terminal (still logged to file)
quiet = false

[network]
# Download timeout in seconds
timeout = 30

# Number of retry attempts
retries = 3

# Use proxy (reads http_proxy/https_proxy env vars)
use_proxy = false

[sync]
# Auto-refresh repository metadata
auto_refresh = false

[cache]
# Keep downloaded packages after install
keep_packages = true

# Keep downloaded sources after build
keep_sources = true

[security]
# Require signed repository manifests
require_signed_repos = false

# Require signed packages
require_signed_packages = false
# 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