This is emperor-setup
, this handles the installation, maintenance and usage of packages used by programs written using the emperor language.
A complete list of command line arguments and their functions is available in man emperor-setup
once installed.
For convenience, the following is a list of example usages.
- Install the dependencies of a package
emperor-setup -I
- Compile C code generated by
emperor
- C flags (
-c
) - Use as entry-point (
-e
) - Required libraries (
-l
)
- C flags (
gcc-8 $(emperor-setup -ce) ./program.c -o ./p $(emperor-setup -l)
- Add a package to the dependency list
emperor-setup -a pkg
- Add a package to the dependency list at a given version
emperor-setup -a pkg:1.2.3
- Force updates of dependencies
emperor-setup -If
- Update the list of known repositories
emperor-setup -U
To install emperor-setup
please use the following steps
- Use Linux (sorry, everyone else!)
git clone https://github.com/emperor-lang/emperor-setup.git --depth=1
cd emperor-setup
make install
Note that the last step requires sudo
permissions, but these are requested when used.
The following dependencies are required for a successful installation:
mangen
theargspec
generator ofman
pagesarggen_haskell
theargspec
generator of haskell argument parsersargcompgen
theargspec
generator ofbash
completion scriptscabal
the Haskell package managerghc
the Glasgow Haskell Compiler
The contents of an emperor package are not restricted to simply being written in emperor. In fact, it is possible to write in any language which is compatible with C, although there may be complications if you use something more exotic.
A valid emperor package (one which may be used as a dependency of another) contains:
- A file named
manifest.json
which specifies the contents of the package, its author, and the files which it provides - A
make
file which may be used to build the project
All emperor packages must be hosted in public git repositories!
Once the source of a package has been obtained, it is build using the make
command.
Then, the files which the package claims to provide (i.e. those specified in the files
field of manifest.json
) are copied in to ~/.emperor/packageName/packageVersion/
.
This project is distributed under the GPL-v3.0 license.
This project is primarily maintained by Edward Jones.