Wrapper written in Go designed for package managers to unify software management commands between distros
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

39 lines
839 B

defaultName = "pak"
defaultTarget = "build"
availableManagers = [
"apk",
"apt",
"aptitude",
"brew",
"dnf",
"yum",
"npm",
"pacman",
"yay",
"pip",
"snap",
"zypper"
]
def pak_build():
if lookPath("go") == -1:
log("Go must be installed to compile pak", level="fatal")
execute("go build")
def pak_install():
mappings = {"PKGMANAGER": userChoice("Choose package manager", availableManagers)}
expandFile("pak.toml", mappings)
execute("""
install -Dm755 pak $DESTDIR/usr/bin/pak
install -Dm644 pak.toml $DESTDIR/etc/pak.toml
""")
def pak_install_noninteractive():
expandFile("pak.toml", {"PKGMANAGER": getEnv("PAK_CFG_MGR")})
execute("""
install -Dm755 pak $DESTDIR/usr/bin/pak
install -Dm644 pak.toml $DESTDIR/etc/pak.toml
""")