/emperor-setup

Emperor package manager

Primary LanguageHaskellGNU General Public License v3.0GPL-3.0

The Emperor Package Manager

This is emperor-setup, this handles the installation, maintenance and usage of packages used by programs written using the emperor language.

Usage

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)
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

Installation & Dependencies

To install emperor-setup please use the following steps

  1. Use Linux (sorry, everyone else!)
  2. git clone https://github.com/emperor-lang/emperor-setup.git --depth=1
  3. cd emperor-setup
  4. 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 the argspec generator of man pages
  • arggen_haskell the argspec generator of haskell argument parsers
  • argcompgen the argspec generator of bash completion scripts
  • cabal the Haskell package manager
  • ghc the Glasgow Haskell Compiler

Package contents and Installation Procedure

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/.

License

This project is distributed under the GPL-v3.0 license.

Author

This project is primarily maintained by Edward Jones.