aboutsummaryrefslogtreecommitdiff
path: root/snag/readme.txt
blob: d93431d724879d177d18a3f8a3d9b9bc8e7e77cf (plain)
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
# SNAG Package Manager

## Useful Subcommands
`install`/`inst` - install the specified package(s) (default)
`remove`         - uninstall the specified package(s)
`upgrade/'up`    - upgrade the package database
`find`/`search`  - list packages whose metadata matches specified search string
`info`/`desc`    - describe the metadata of the specified package(s)

`files`          - list the installed files of the specified package(s)
`log`            - open your pager to the build log of the specified package
`why`            - list why this package is installed (manually installed, as a dependency, from a group)

## Terminology
"Package Database"             - the directory containing package descriptions
"Install Database"             - the directory containing information on installed package
"Package Description"          - the directory and script containing build instructions for a package
"Package Info/Metadata"        - the metadata encoded in the package description
"Package Attribute"            - a single key value property of the package info

## Package Format
Each package has a directory in the package database, named by its `id`.
Inside each package directory is the description script named `{id}.sh`
The description script should have functions for `configure`, `build`, and `install`
The description script should define variables for attributes with the name `pkg_{attr}`
> We're still deciding if we want the metadata to be split from the instruction in separate file(s).

Packages have the following attributes:
`id` - the identifier name of the package. everything uses this
`name` - the display name of package
`desc` - the short description of the package

## Interesting Features
- switch between cli and tui mode mid run
- build packages that aren't in the database

## Developer Subcommands
`validate` - check a package description and check for format errors or warnings