You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This shell script automates the creation of FreeBSD packages (.pkg files) for Swift programming language toolchains. It takes a compiled Swift toolchain directory as input and produces a properly structured FreeBSD package that can be installed using the `pkg` package manager.
6
+
7
+
## Summary
8
+
9
+
The script is specifically designed for FreeBSD systems and requires a properly structured Swift toolchain with a `usr/` subdirectory containing the Swift binaries and libraries.
10
+
11
+
The script performs the following key operations:
12
+
13
+
- Validation: Ensures the current platform is FreeBSD and validates command-line arguments
14
+
- Directory Setup: Creates temporary staging areas for package files and metadata
15
+
- Toolchain Processing: Copies the Swift toolchain to the appropriate directory structure (`/usr/local/swift`)
16
+
- Symlink Creation: Creates symbolic links in `/usr/local/bin` for `swift` and `swiftc` commands
17
+
- Package Manifest Generation: Creates a FreeBSD package manifest with metadata including version, description, and maintainer information
18
+
- File List Generation: Builds a complete list of files and symlinks to include in the package
19
+
- Package Creation: Uses FreeBSD's `pkg create` command to build the final package with Zstandard compression
20
+
- Cleanup: Removes temporary staging directories
21
+
22
+
The resulting package installs Swift to `/usr/local/swift` with convenient symlinks in `/usr/local/bin`, making Swift commands available in the standard path.
0 commit comments