Restructure and add more documentation
ci/woodpecker/push/woodpecker Pipeline was successful Details

This commit is contained in:
Elara 2022-12-23 18:09:27 -08:00
parent 80187b0969
commit 37a6c682b5
5 changed files with 46 additions and 3 deletions

View File

@ -1,6 +1,8 @@
# LURE Docs
- [Build Scripts](build-scripts.md)
- [Usage](usage.md)
- [Configuration](configuration.md)
- [Adding Packages to LURE's repo](adding-packages.md)
- [Usage](usage.md)
- [Packages](packages)
- [Build Scripts](packages/build-scripts.md)
- [Package Conventions](packages/conventions.md)
- [Adding Packages to LURE's repo](packages/adding-packages.md)

5
docs/packages/README.md Normal file
View File

@ -0,0 +1,5 @@
# LURE Docs > Packages
- [Build Scripts](build-scripts.md)
- [Package Conventions](conventions.md)
- [Adding Packages to LURE's repo](adding-packages.md)

View File

@ -0,0 +1,36 @@
# Package Conventions
## General
Packages should have the name(s) of what they contain in their `provides` and `conflicts` arrays. That way, they can be installed by users without needing to know the full package name. For example, there are two LURE packages for ITD: `itd-bin`, and `itd-git`. Both of them have provides and conflicts arrays specifying the two commands they install: `itd`, and `itctl`. This means that if a user wants to install ITD, they simply have to type `lure in itd` and LURE will prompt them for which one they want to install.
## Binary packages
Packages that install download and install precompiled binaries should have a `-bin` suffix.
## Git packages
Packages that build and install programs from source code cloned directly from Git should have a `-git` suffix.
The versions of these packages should consist of the amount of revisions followed by the current revision, separated by a period. For example: `183.80187b0`. Note that unlike the AUR, there is no `r` at the beginning. This is because some package managers refuse to install packages whose version numbers don't start with a digit.
This version number can be obtained using the following command:
```bash
printf "%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
```
The `version()` function for such packages should use the LURE-provided `git-version` helper command, like so:
```bash
version() {
cd "$srcdir/$name"
git-version
}
```
This uses LURE's embedded Git implementation, which ensures that the user doesn't need Git installed on their system in order to install `-git` packages.
## Other packages
Packages that download sources for a specific version of a program should not have any suffix, even if those sources are downloaded from Git.