Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
Add a description of the package format
Browse files Browse the repository at this point in the history
  • Loading branch information
minexew committed Jan 29, 2017
1 parent 4dfd2de commit 23db284
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 1 deletion.
43 changes: 43 additions & 0 deletions PACKAGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Pkg package format
==================

*Pkg* is the name of Shrine's package manager.

Each package ships as a manifest + one or more download formats.
The only download format currently supported is RedSea disk image (.ISO.C)

Manifest format
---------------

The manifest is a key-value format, using exactly one Tab character as delimiter. The keys are:

- `osmin` (int - minimum supported OS version, default 0)
- `osmax` (int - maximum OS version, default *+∞*)
- `pkgmin` (int - minimum *Pkg* version, default *+∞*)
- `version` (string up to 6 chars - version for display purposes, default *NULL*)
- `release` (int - version for comparison purposes, default 0)
- `installdir` (string, default *NULL*)
- `iso.c` (string - see below, default *NULL*)
- `size` (int - download size in bytes, default 0)

Currently ignored keys:

- `name` (string - package name)
- `website` (string)

For a package to be installable, it needs to specify at least `pkgmin`, `version`, `installdir` and a downloadable file.
The manifest can contain any other keys; *Pkg* might or might not preserve them.

`iso.c` changes meaning depending on the context.
This is somewhat confusing, which makes it a perfect fit for TempleOS.

- in repo, it's a (usually relative) URL to the package's ISO.C download
- in a downloaded package it is a filesystem path
- when building a package it specifies the output filename

`size` is ambiguous if the package provides multiple download formats. It's not a big deal.

Dependency resolution
---------------------

Soon!
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ Note: In Lsh, use `pkg-install xyz` in place of `PkgInstall("xyz")` etc.

Build a package from a single file. See above for details.

[See here](PACKAGES.md) for more information about how packages work.

Building from source
====================

Expand Down
1 change: 0 additions & 1 deletion Shrine/Packages/Pkg/Pkg.HC
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ I64 PkgInstall(U8* package_name) {
"$FG,8$ Package Ver \n"
"$FG,8$ Dir Size \n"
"$FG,8$============================\n"
"$FG,7$Install:\n";
"$FG,2$+ %-20s %-6s\n", package_name, pinf.version;
"$FG,2$ %-20s %-6s\n", pinf.installdir, FormatSize(pinf.size);
"\n"
Expand Down

0 comments on commit 23db284

Please sign in to comment.