GoGentoo is a minimal, source-based package manager prototype written in Go, inspired by Gentoo's Portage but designed to be cross-distro.
- store: installed package trees (e.g.
store/foo-1.0.0) - src: unpacked package sources (e.g.
src/foo) - build: build work directories (e.g.
build/foo-1.0.0) - db: JSON database (
db/packages.json) with installed package metadata
The CLI will create these directories under the current working directory if they do not exist.
- fetch:
gogentoo fetch <url> <destDir>- Downloads a
.tar.gz/.tgzarchive and unpacks it intosrc/<destDir>(ifdestDiris relative).
- Downloads a
- build:
gogentoo build <pkgName> <srcDir> [version]- Copies
<srcDir>into a build directory, runsmake, then copies the build output intostore/<pkgName>-<version>. - Records the package into
db/packages.json.
- Copies
- Linux/macOS (Bash):
scripts/fetch_and_unpack.sh <url> <destDir> - Windows (PowerShell):
scripts/fetch_and_unpack.ps1 -Url <url> -DestDir <destDir>
These are optional helpers; the Go CLI can also fetch and unpack .tar.gz archives directly.
From the repository root:
go build ./cmd/gogentooOn Windows, you can build the same command for Linux using:
set GOOS=linux
set GOARCH=amd64
go build ./cmd/gogentoo