thyres/eon
Eon is a platform-agnostic package manager and build system.
$eon I thyres/core:eon.libd
Sources are written in ESL 1 (Eon Specification Language)
They require a @ Source
header, and the name of the subsequent tables must be the sources. Each source table needs a base
key.
# ESL 1
@ Source
thyres:
- base: "https://thyres.galaxi.ga/eon/:b/all/:u"
In the base
key, :b
is replaced by the branch. "source/branch:uri", :u
is replaced with the URI.
A source may include a script for fuzzy-searching packages, as mantaining a package index, such as the one seen in Eopkg, would be unmantainable. This script should be able to handle the following requests (Assuming you use a RewriteEngine):
GET /:branch/list -- Returns a list of all packages
GET /:branch/search/:uri -- Searches for an exact URI
GET /:branch/fuzzy/:package -- Fuzzy-searches a package
GET /:branch/identify/:package -- Get information about a package
Source flags start with S
Sa source name
: Adds a source under a name.Sr name
: Removes a sourceSe name source
: Edits a sourcepackage-name/
source/
(source files)
eon/
install.esl
target.esl
package.esl
The root of the package requires a package.esl
file, that contains all the information of the package, and the places that all files are located in.
# ESL 1
@ Package
name: "example-package"
description: "This is an example package."
version: "latest"
author: "user:email@example.com"
url: "https://thyres.galaxi.ga/eon/branch/all/uri/"
license: "MIT"
arch:
- "cc/thyres"
- "cc/cos"
- "apollo"
depend:
- "source/branch:uri"
@ Tags
tags:
- source: "source/" # Files to be compiled
- eon: "eon/" # Files required for Eon
- lib: "lib/" # Dependencies not on Eon
This targets file will get the tags from package.esl
, and assign target folders to each one of them.
# ESL 1
@ Targets
source: "/bin/"
eon: "/opt/package/eon/"
lib: "/lib/"
This is the install file, and it contains a taskset, a set of functions to be run when installing. You can define tasksets, that are ordered lists of the tasks to run. While packages are being installed, they are located in /opt/package/
or EON_PATH/opt/package
.
There is a global key, arch
, that specifies a Lua function that can be used to determine the architecture. By convention, you may use the _ARCH
global variable.
arch: "_ARCH"
There is a @ Checks
header, used to determine what target should be used for each arch. Each key will be a possible arch, and the value a list of Eon flags and the name of the taskset.
@ Checks
cc:
- I: "Icc"
- R: "Rcc"
Under the @ Tasksets
header, you can define the tasksets, by convention, they usually are named (flag)(arch)
, such as Ithyres
(install in the Thýres platform) orRapollo
(remove in the A1004 platform), but it is not necessary. Each taskset has a list of tasks, those are defined under the @ Tasks
header.
@ Tasksets
Ithyres:
- "thyres/prebuild"
- "thyres/build"
- "thyres/install"
- "thyres/postinstall"
Rthyres:
- "thyres/clean"
The Tasks must have a runner
or lua-runner
key. runner
is the command that the argl
list of commands will be passed to, one by one.
lua-runner
will contain anything that can be run in Lua. :c
will be replaced by the command in both cases, if needed.
The most common tasks are:
arch/prebuild -- Used to prepare the environment and run checks
arch/build -- Used to build the necessary files
arch/install -- Used to move the files to their locations
arch/postinstall -- Used to clean now useless files
arch/clean -- Used to uninstall
Used to prepare the environment and run checks. Such as checking for folders, and setting global variables that may be required by the next step.
Used to compile the necessary files, moving them to an (automatically set) package folder. The build folder of the package is located in /opt/package/build/
, or, in case it doesn't exist. EON_PATH/opt/package/build/
. You can move the compiled files to :o/build/
, you can use the targets with $target
, and tags with #tag
:
arch/build:
- runner: "shell"
- argl:
- "nightc #source/file.ni :o/build/file.x"
In this task, files can be moved to targets. Sometimes this steps requires root privileges.
This is used to clean the /opt/package
folder after it's finished installing. This is possible since the package.esl
and eon/*
files are moved to the Eon cache. You can, however, have a different task, such as arch/keep, that will remove the sources from /opt/package/
, but will keep the eon/
folder.
This is used to uninstall the package from the system, keeping the configuration files for a possible reinstall.
This task, however, removes the configuration files, too.
*
denotes the default flag
I package(s)
- Installe*
- Reinstall a packaget task
- Run a single taskr
- Remove the files in /opt/package/
after install.a arch
- Use a different archR package(s)
- Remove (arch/clean
)c
- Remove the configuration files too. (arch/remove
)w
- Removes all the package following a Lua patternL name(s)
- LocalNote: An update flag is not needed, as there are no package lists, this is all handled by the source script, that should be updated by the host.
t* task
- Runs a single taske
- Reinstall a packageu package(s)
- Upgrade packages, if none, upgrades all.i
- List local packagesb source/branch
- List local packages from a branchs name
- Search in the local packagesw name
- Search packages with a Lua patternS
- Sourcea source name
- Adds a sourcer name
- Removes a sourcee name source
- Edits a sourcel name
- Lists all packages in a sourceb name/branch
- Lists all packages in a source and branchs* package name
- Searches for a package in a group, if name is not specified, it will search in all sources.C
- Configurationh*
- Get help. Can be combined with other flags to know more about them.$eon Li
$eon Lb thyres/core
$eon Lw x-*
$eon I thyres/core:eon.libd
$eon Rc eon.libd
Utility scripts are not actually packages, they are just install.esl
files that can be used to do certain tasks. For example, you can have a custom task, cleantmp
, that removes every file in /tmp
. You can run it remotely, like you can do with pastebin run
$eon Itr example/scripts:eon.cleaner cleantmp
This is a demonstration of how you can combine flags.
$eon SbI thyres/desktop
x-*
packages$eon Rw x-*