Skip to content

afroraydude/uspm

 
 

Repository files navigation

Ultra Simple Package Manager

QUICK NOTE: USPM will be under maintenance mode until the full release of Wombat Linux Once finalized, USPM will continue development.

GitHub release (latest by date) Travis (.com) GitHub

Ultra Simple Package Manager (USPM) is a suite of executables that overall allow for the management of packages.

PLEASE NOTE: Releases on this GitHub WILL NOT work on Wombat Linux or other Musl-based systems, please use the provided uspm package for that specific operating system.

Here is a list of the current tools:

  • uspm: The main application that allows for the installation and uninstallation of software packages and their dependencies.
  • uspm-mkpkg: This optional application is useful for those who want to design USPM packages
  • uspm-extended: This optional application adds more commands and functions to uspm and is only there for those who want it. It can also be set to replace uspm in the build phase.
  • uspm-chksum: This optional application is useful to get checksums of generated package files.

The project also contains libuspp, or Ultra Simple Package Processor, which contains the functions necessary to enable all the functionality of uspm

How it works

All packages come in .uspm files, which are just tarballs. Within the tarball there must be two included files.

PACKAGECODE is the install/uninstall script, it contains all the code necessary to install that package.

Building and Installing

This package requires at least cJSON (found here), zlib, a tar program, a crypto library (either openssl or libressl) and libcurl

There are 2 ways to install:

  1. Through Make (this requires GCC) [not recommended]
git clone https://github.com/afroraydude/uspm.git
cd uspm
make uspm
make install
  1. Through CMake (clang or gcc)
git clone https://github.com/afroraydude/uspm.git
cd uspm
mkdir build
cd build
cmake ..
make
make install

How to create a package for USPM

The easy way

  1. Compile the package from source

  2. Place all compiled files in a folder

  3. Make a folder with the name of the package and place the previous folder in that

  4. Run uspm-mkpkg and follow instructions

  5. Exit the directory, you should now have a .uspm package file. ex:

mkdir -p /tmp/package/files 

mkdir build
cd build

../configure --prefix=/tmp/package/files/
make 
make install

cd /tmp/package
uspm-mkpkg

The hard way

  1. Compile the package from source

  2. Place all compiled files in a folder

  3. Make a folder with the name of the package and place the previous folder in that

  4. Inside the package folder, create two files: PACKAGECODE and PACAKGEDATA

  5. In PACKAGECODE, include all the code necessary to migrate the compiled files into the system so that they are usable, put it in a function that can be called by PACKAGECODE install (NOTE: This must be a shell script)

  6. In PACKAGECODE, include all the code necessary to allow for an uninstallation of all files, in a function that can be called by PACKAGECODE uninstall

  7. In PACKAGEDATA, include the version and dependencies (ex: {"version":"1.0.0", "dependencies":{"test":"1.0.0","test2":"1.0.0"}})

  8. Archive the whole directory into a tarball and make sure the extension is .uspm

  9. Done!

Example PACKAGEDATA file

{
  "version": "1.0.0",
  "dependencies": {"uspm": "1.0.0"}
}

Example PACKAGECODE file

cd package

# Install 
if [ $1 == 'install' ]
then
  cp -R files/* /usr/

# Uninstall
elif [ $1 == 'uninstall' ]
then
  rm /usr/local/bin/example
fi```

About

Ultra Simple Package Manager - A a simple package manager that allows the user to install and uninstall packages and their dependencies.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 56.4%
  • CMake 40.6%
  • Roff 3.0%