.. A tiny embeddable package manager library and application.
SourcePackageManager, hereafter refered to as 'SPM', is designed to be used in the same way as RVM regarding paths, and in the same way as RubyGems in terms of managing packages, except with support for per-project dependencies, and not just system-wide and per-user packages. In fact, system-wide packages are not really handled by SPM, but instead left for your local system package manager.
To use this system, simply run
fossil clone https://chiselapp.com/user/mastersrp/repository/SourcePackageManager/ ~/.spm.fossil mkdir ~/.spm && cd ~/.spm fossil open ~/.spm.fossil
Then follow the instructions in the Compiling section.
Even though SPM is rather small, it does have some dependencies.
Most, if not all, of these packages can probably be installed using your package manager.
Currently, SPM is only supported for compilation on 32bit and 64bit architectures of GNU/Linux systems. Other systems may work out of the box, but have not been tested.
Feel free to open issues with patches if you got it working on your platform.
bootstrap.sh is a very lightweight script that simply runs spm from the lua code in the $PAKLIB directory.
The bootstrap process will first build the barebones spm binaries and libraries using a trimmed down version of spm, written in lua. Then, it'll restart the process, but using the newly-created spm binary. This serves as both testing suite and bootstrapping, so no further actions are required.
It is worth noting that this will build the entire system and all dependencies, twice.
If anything goes wrong, feel free to check the log in the .spm directory.
To start the process, simply run:
./spm.sh fetch configure build
The following environment variables have an effect on the script:
CC = Determines what compiler to use to spm and all dependencies. Yes, you create a musl-based spm this easily.
PREFIX = The directory under which to install the spm binary, library, and include files.
There are various ways to do the installation. The simple one is using the
Please note that using this target requires the $PREFIX environment to be set. Default is "/usr/local/spm".
The file 'bin/spm' is really all there is required. Put it whereever you want, or just run
to prepend the bin directory to your PATH variable.
Note that this only works for the current terminal session. For permanent use, you should add
To your bashrc or
to your zshrc.
Alternatively, you can use this gist to manage your PATH variable easily, without having to mess about a lot with rc files.