Home

Awesome

uppm

Universal Prebuild Package Manager for Unix-like systems.

Caveats

Build from C source locally dependencies

dependencyrequired?purpose
GCC or LLVM+clangrequiredfor compiling C source code
cmakerequiredfor generating build.ninja
ninjarequiredfor doing jobs that read from build.ninja
pkg-config>=0.18requiredfor finding libraries
janssonrequiredfor parsing and creating JSON.
libyamlrequiredfor parsing formula files whose format is YAML.
libgit2requiredfor updating formula repositories.
libcurlrequiredfor http requesting support.
opensslrequiredfor https requesting support and SHA-256 sum checking support.
libarchiverequiredfor uncompressing .zip and .tar.* files.
zlibrequiredfor compress and uncompress data.
pcre2for Regular Expressions support. only required on OpenBSD.

Build from C source locally via ppkg

ppkg install uppm

Build from C source locally via xcpkg

xcpkg install uppm

Build from C source locally using vcpkg

# install g++ curl zip unzip tar git

git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
export VCPKG_ROOT="$PWD/vcpkg"
export PATH="$VCPKG_ROOT:$PATH"

vcpkg install curl openssl libgit2 libarchive libyaml jansson

git clone --depth=1 https://github.com/leleliu008/uppm
cd ppkg

cmake -S . -B   build.d -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake
cmake --build   build.d
cmake --install build.d

Build from C source locally via HomeBrew

brew install --HEAD leleliu008/fpliu/uppm

Build from C source locally using your system's default package manager

Ubuntu

apt -y update
apt -y install git cmake ninja-build pkg-config gcc libcurl4 libcurl4-openssl-dev libgit2-dev libarchive-dev libyaml-dev libjansson-dev

git clone --depth=1 https://github.com/leleliu008/uppm
cd uppm

cmake -S . -B   build.d -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local
cmake --build   build.d
cmake --install build.d

Fedora

dnf -y update
dnf -y install git cmake ninja-build pkg-config gcc libcurl-devel libgit2-devel libarchive-devel libyaml-devel jansson-devel

git clone --depth=1 https://github.com/leleliu008/uppm
cd uppm

cmake -S . -B   build.d -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local
cmake --build   build.d
cmake --install build.d

ArchLinux

pacman -Syyuu --noconfirm
pacman -S     --noconfirm git cmake ninja pkg-config gcc curl openssl libgit2 libarchive libyaml jansson

git clone --depth=1 https://github.com/leleliu008/uppm
cd uppm

cmake -S . -B   build.d -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local
cmake --build   build.d
cmake --install build.d

AlpineLinux

apk add git cmake ninja pkgconf gcc libc-dev curl-dev openssl-dev libgit2-dev libarchive-dev yaml-dev jansson-dev

git clone --depth=1 https://github.com/leleliu008/uppm
cd uppm

cmake -S . -B   build.d -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local
cmake --build   build.d
cmake --install build.d

VoidLinux

xbps-install -Suy xbps
xbps-install -Suy cmake ninja gcc pkg-config libcurl-devel libgit2-devel libarchive-devel libyaml-devel jansson-devel

git clone --depth=1 https://github.com/leleliu008/uppm
cd uppm

cmake -S . -B   build.d -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local
cmake --build   build.d
cmake --install build.d

Gentoo Linux

emerge dev-vcs/git cmake dev-util/ninja gcc pkg-config net-misc/curl dev-libs/libgit2 libarchive dev-libs/libyaml dev-libs/jansson

git clone --depth=1 https://github.com/leleliu008/uppm
cd uppm

cmake -S . -B   build.d -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local
cmake --build   build.d
cmake --install build.d

openSUSE

zypper update  -y  
zypper install -y git cmake ninja gcc pkg-config libcurl-devel libgit2-devel libarchive-devel libyaml-devel libjansson-devel

git clone --depth=1 https://github.com/leleliu008/uppm
cd uppm

cmake -S . -B   build.d -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local
cmake --build   build.d
cmake --install build.d

FreeBSD and DragonFlyBSD

pkg install -y git cmake ninja pkgconf gcc curl openssl libgit2 libarchive libyaml jansson

git clone --depth=1 https://github.com/leleliu008/uppm
cd uppm

cmake -S . -B   build.d -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local
cmake --build   build.d
cmake --install build.d

OpenBSD

pkg_add git cmake ninja pkgconf llvm curl libgit2 libarchive libyaml jansson

git clone --depth=1 https://github.com/leleliu008/uppm
cd uppm

cmake -S . -B   build.d -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local
cmake --build   build.d
cmake --install build.d

NetBSD

pkgin -y install git mozilla-rootcerts cmake ninja-build pkg-config clang curl openssl libgit2 libarchive libyaml jansson

mozilla-rootcerts install

git clone --depth=1 https://github.com/leleliu008/uppm
cd uppm

cmake -S . -B   build.d -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local
cmake --build   build.d
cmake --install build.d

uppm command usage

environment variables

uppm formula scheme

a uppm formula is a YAML format file which is used to config a uppm package's meta-information including one sentence description, package version, installation instructions, etc.

a uppm formula's filename suffix must be .yml

a uppm formula'a filename prefix would be treated as the package name.

a uppm formula'a filename prefix must match regular expression pattern ^[A-Za-z0-9+-._@]{1,50}$

a uppm formula's file content only has one level mapping and shall has following KEY:

KEYrequired?overview
summaryrequiredDescribe this package in one sentence.
webpagerequiredthe home webpage url of this package.
licenseoptionala space-separated list of SPDX license short identifiers
versionoptionalthe version of this package.<br>If this mapping is not present, it will be calculated from bin-url
bin-urlrequiredthe prebuild binary file download url of this package.
bin-sharequiredthe sha256sum of the prebuild binary file.
dep-pkgoptionala space-separated list of package names. these packages will be used when installing or runtime.
unpackdoptionalrelative to $PKG_INSTALL_DIR. the directory where shall be unpacked to. default is empty, which means that the artifact will be unpacked to $PKG_INSTALL_DIR
installoptionalPOSIX shell code to be run when installing.<br>If this mapping is not present, and if bin-url mapping's value ends with one of .zip .tar.xz .tar.gz .tar.lz .tar.bz2 .tgz .txz .tlz .tbz2, uppm will uncompress it to $PKG_INSTALL_DIR for you. otherwise, just copy it to $PKG_INSTALL_DIR

shell variables that can be used in install block :

variableoverview
NATIVE_OS_ARCHcurrent machine os arch.
NATIVE_OS_KINDcurrent machine os kind.
NATIVE_OS_TYPEcurrent machine os type.
NATIVE_OS_NAMEcurrent machine os name.
NATIVE_OS_VERScurrent machine os version.
NATIVE_OS_NCPUcurrent machine os has how many cpu cores.
UPPM_VERSIONthe version of uppm.
UPPM_VERSION_MAJORthe major part of $UPPM_VERSION.
UPPM_VERSION_MINORthe minor part of $UPPM_VERSION.
UPPM_VERSION_PATCHthe patch part of $UPPM_VERSION.
UPPM_HOMEthe home directory of uppm.
UPPMthe executbale path of uppm.
PKG_SUMMARYthe value of summary
PKG_VERSIONthe value of version
PKG_LICENSEthe value of license
PKG_WEBPAGEthe value of webpage
PKG_BIN_URLthe value of bin-url
PKG_BIN_SHAthe value of bin-sha
PKG_BIN_FILEPATHthe local file path of bin-url
PKG_BIN_FILENAMEthe local file name of bin-url
PKG_BIN_FILETYPEthe file type of bin-url
PKG_DEP_PKGthe value of dep-pkg
PKG_INSTALL_DIRthe directory where the current package will be installed to.

uppm formula repository

a uppm formula repository is a git repository.

a uppm formula repository's root directory should have a formula named sub directory, this repository's formulas all should be located in this directory.

a uppm formula repository's local path is ~/.uppm/repos.d/${UPPMFormulaRepoName}

Note: uppm supports multiple formula repositories.

uppm formula repository's config

After a uppm formula repository is successfully fetched from server to local, a config file for this repository would be created at ~/.uppm/repos.d/${UPPMFormulaRepoName}/.uppm-formula-repo.yml

a typical uppm formula repository's config as following:

url: https://github.com/leleliu008/uppm-formula-repository-linux-x86_64
branch: master
pinned: 0
enabled: 1
created: 1673684639
updated: 1673684767

If a uppm formula repository is pinned, which means it would not be updated.

If a uppm formula repository is disabled, which means uppm would not search formulas in this formula repository.

uppm official formula repository

uppm official formula repository's url:

uppm official formula repository would be automatically fetched to local cache as name official-core when you run uppm update command.

Note: If you find that a package is not in uppm official formula repository yet, PR is welcomed.