forked from kiss-community/kiss
148 lines
4.0 KiB
Groff
148 lines
4.0 KiB
Groff
|
.Dd December 23, 2022
|
||
|
.Dt KISS 5
|
||
|
.Os
|
||
|
.Sh NAME
|
||
|
.Nm kiss
|
||
|
.Nd package format
|
||
|
.Sh DESCRIPTION
|
||
|
KISS packages are comprised of a directory and the series of files contained
|
||
|
within.
|
||
|
The name of the package is derived from its directory name.
|
||
|
The files which comprise the system are as follows:
|
||
|
.TS
|
||
|
center box tab(|);
|
||
|
lb|lb
|
||
|
l|l.
|
||
|
File | Required
|
||
|
_
|
||
|
build | yes
|
||
|
checksums | no
|
||
|
depends | no
|
||
|
sources | no
|
||
|
version | yes
|
||
|
|
||
|
pre-remove | no
|
||
|
post-install | no
|
||
|
.TE
|
||
|
.Ss build
|
||
|
The
|
||
|
.Pa build
|
||
|
file is executed in the directory containing the package's extracted
|
||
|
sources.
|
||
|
Unlike other distributions, a
|
||
|
.Ic cd
|
||
|
is not needed as sources have their top-level directory components stripped
|
||
|
away.
|
||
|
.Pp
|
||
|
The build file is given two arguments: the destination directory (where
|
||
|
artifacts should be installed) and the first field of the package's version file
|
||
|
(verbatim).
|
||
|
.Pp
|
||
|
The build file is given a modified environment containing DESTDIR, KISS_ROOT,
|
||
|
GOPATH and generic defaults for toolchain variables (if unset by the user).
|
||
|
The toolchain defaults are as follows:
|
||
|
.Bd -literal -offset indent
|
||
|
AR=ar
|
||
|
CC=cc
|
||
|
CXX=c++
|
||
|
NM=nm
|
||
|
RANLIB=ranlib
|
||
|
RUSTFLAGS="--remap-path-prefix=$PWD=. $RUSTFLAGS"
|
||
|
GOFLAGS="-trimpath -modcacherw $GOFLAGS"
|
||
|
.Ed
|
||
|
.Ss checksums
|
||
|
The
|
||
|
.Pa checksums
|
||
|
file is generated by the package manager
|
||
|
.Ql ( kiss c pkg )
|
||
|
and is derived from files listed in the package's
|
||
|
.Pa sources
|
||
|
file.
|
||
|
Directories and git repositories do not require checksums.
|
||
|
.Pp
|
||
|
Checksum verification can be disabled for a source by replacing its checksum
|
||
|
with 'SKIP' in the checksums file.
|
||
|
The package manager will notify you when this occurs.
|
||
|
.Ss depends
|
||
|
The
|
||
|
.Pa depends
|
||
|
file contains the package's dependencies listed one per line in alphabetical
|
||
|
order.
|
||
|
Duplicate entries are not supported.
|
||
|
The second optional field denotes the dependency type (unset for runtime,
|
||
|
.Dq make
|
||
|
for compile-time).
|
||
|
Lines beginning with
|
||
|
.Ql #
|
||
|
are comments.
|
||
|
.Ss sources
|
||
|
The
|
||
|
.Pa sources
|
||
|
file contains the package's sources one per line.
|
||
|
A valid source is a URL to a file, relative path, absolute path or Git
|
||
|
repository.
|
||
|
The optional second field denotes the relative destination directory.
|
||
|
Lines beginning with
|
||
|
.Ql #
|
||
|
are comments.
|
||
|
.Pp
|
||
|
Git repositories must be prefixed with
|
||
|
.Ql git+ .
|
||
|
An optional suffix is supported to checkout a specific branch
|
||
|
.Ql ( @BRANCH )
|
||
|
or commit
|
||
|
.Ql ( #COMMIT ) .
|
||
|
All clones are shallow where supported by the remote server.
|
||
|
If no suffix is used, master is cloned.
|
||
|
.Pp
|
||
|
The following markers can be used to substitute version information.
|
||
|
These are replaced at runtime with their respective values.
|
||
|
Literal markers can be escaped by prepending a backslash.
|
||
|
.TS
|
||
|
center box tab(|);
|
||
|
l|l.
|
||
|
VERSION | The first field of the version file verbatim.
|
||
|
RELEASE | The second field of the version file verbatim.
|
||
|
MAJOR | The first component of VERSION split on .-_+
|
||
|
MINOR | The second component of VERSION split on .-_+
|
||
|
PATCH | The third component of VERSION split on .-_+
|
||
|
IDENT | All other components.
|
||
|
PACKAGE | The name of the package.
|
||
|
.TE
|
||
|
.Ss version
|
||
|
The
|
||
|
.Pa version
|
||
|
file is a single line split into two mandatory fields.
|
||
|
The first field is the package's version and the second field the version of the
|
||
|
repository files themselves.
|
||
|
.Pp
|
||
|
If the package follows its upstream release schedule, the first field should
|
||
|
match the upstream version number.
|
||
|
If the source is a Git repository, the version should be set to
|
||
|
.Ql git .
|
||
|
If a specific git commit is used, the version number should match accordingly.
|
||
|
.Ss pre-remove
|
||
|
The
|
||
|
.Pa pre-remove
|
||
|
file is executed before removal of the package.
|
||
|
This file should be used to perform any required pre-removal steps or to display
|
||
|
notices.
|
||
|
.Ss post-install
|
||
|
The
|
||
|
.Pa post-install
|
||
|
file is executed after installation of the package.
|
||
|
This file
|
||
|
should be used to perform any required post-install steps or to display notices.
|
||
|
.Sh SEE ALSO
|
||
|
.Xr kiss 1 ,
|
||
|
.Lk https://kisslinux.org/wiki/package-system
|
||
|
.Sh HISTORY
|
||
|
Originally, SHA256 was used as the checksum algorithm.
|
||
|
In September 2022, the checksums were switched to use BLAKE3 for speed
|
||
|
improvements.
|
||
|
.Sh AUTHORS
|
||
|
.Nm
|
||
|
was created by
|
||
|
.An Dylan Araps
|
||
|
and the community.
|