Mercurial > uportage
changeset 0:58c566277da5 default tip
initial commit
| author | Yasuri <yasuri@charliesmp.net> |
|---|---|
| date | Wed, 21 Oct 2026 14:41:16 -0500 |
| parents | |
| children | |
| files | LICENSE README uportage.c |
| diffstat | 3 files changed, 42 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LICENSE Wed Oct 21 14:41:16 2026 -0500 @@ -0,0 +1,7 @@ +ISC License + +Copyright 2026 Yasuri <yasuri@charliesmp.net> + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README Wed Oct 21 14:41:16 2026 -0500 @@ -0,0 +1,14 @@ +uportage +-------- +Minimal package manager in ~20 lines of C, designed for Glinux. + +How to use +---------- +Create a /var/db/uportage directory, and create .build files named things like [package_name].build. These are Posix SH scripts that: +1. Download the release tarball, extract and cd into it. +2. Build the package. +3. Install it. + +License +------- +ISC license. See LICENSE for details.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uportage.c Wed Oct 21 14:41:16 2026 -0500 @@ -0,0 +1,21 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> +int main(int argc, char* argv[]) { + if (argc > 1) { + char package_script[256] = ""; + strcat(package_script,"/var/db/uportage/"); + strcat(package_script,argv[1]); + strcat(package_script,".build"); + printf("Running package install script for: %s\n",argv[1]); + if ((chdir("/tmp") == -1) { + perror("chdir"); + } + system(package_script); + } + else { + printf("No package supplied.\n"); + } + return 0; +}
