opkg

statically linked package installer
git clone anongit@rnpnr.xyz:opkg.git
Log | Files | Refs | Feed | Submodules | README | LICENSE

Commit: d8f6eebc88ff368e31b6c1ef10abdd5d5fa60d9e
Parent: 7526b02ba63642578a7b9e360d840c901f501e02
Author: Randy Palamar
Date:   Mon,  2 Oct 2023 22:05:06 -0600

add sbase from oasis (bumped to latest)

Diffstat:
M.gitmodules | 3+++
Mpkg/sys/gen.lua | 1+
Apkg/sys/sbase/egrep | 2++
Apkg/sys/sbase/gen.lua | 192+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apkg/sys/sbase/src | 1+
Apkg/sys/sbase/ver | 1+
Msets.lua | 1+
7 files changed, 201 insertions(+), 0 deletions(-)

diff --git a/.gitmodules b/.gitmodules @@ -38,6 +38,9 @@ [submodule "pkg/libs/zlib/src"] path = pkg/libs/zlib/src url = https://github.com/madler/zlib.git +[submodule "pkg/sys/sbase/src"] + path = pkg/sys/sbase/src + url = git://git.suckless.org/sbase [submodule "pkg/textproc/cmark/src"] path = pkg/textproc/cmark/src url = https://github.com/commonmark/cmark.git diff --git a/pkg/sys/gen.lua b/pkg/sys/gen.lua @@ -1,2 +1,3 @@ subgen('openbsd') subgen('mandoc') +subgen('sbase') diff --git a/pkg/sys/sbase/egrep b/pkg/sys/sbase/egrep @@ -0,0 +1,2 @@ +#!/bin/sh +exec grep -E "$@" diff --git a/pkg/sys/sbase/gen.lua b/pkg/sys/sbase/gen.lua @@ -0,0 +1,192 @@ +cflags({ + '-std=c99', '-Wall', '-Wpedantic', '-Wno-maybe-uninitialized', + '-D _DEFAULT_SOURCE', + '-D _BSD_SOURCE', + '-D _XOPEN_SOURCE=700', + '-I $outdir', +}) + +lib('libutil.a', [[libutil/( + concat.c + cp.c + crypt.c + ealloc.c + enmasse.c + eprintf.c + eregcomp.c + estrtod.c + fnck.c + fshut.c + getlines.c + human.c + linecmp.c + md5.c + memmem.c + mkdirp.c + mode.c + parseoffset.c + putword.c + reallocarray.c + recurse.c + rm.c + sha1.c + sha224.c + sha256.c + sha384.c + sha512.c + sha512-224.c + sha512-256.c + strcasestr.c + strlcat.c + strlcpy.c + strnsubst.c + strsep.c + strtonum.c + unescape.c + writeall.c +)]]) +lib('libutf.a', [[libutf/( + fgetrune.c + fputrune.c + isalnumrune.c + isalpharune.c + isblankrune.c + iscntrlrune.c + isdigitrune.c + isgraphrune.c + isprintrune.c + ispunctrune.c + isspacerune.c + istitlerune.c + isxdigitrune.c + lowerrune.c + rune.c + runetype.c + upperrune.c + utf.c + utftorunestr.c +)]]) + +rule('getconf', '$srcdir/getconf.sh >$out') +build('getconf', '$outdir/getconf.h', {'|', '$srcdir/getconf.sh'}) + +local cmds = { + 'basename', + 'cal', + 'cat', + 'chgrp', + 'chmod', + 'chown', + 'chroot', + 'cksum', + 'cmp', + 'cols', + 'comm', + 'cp', + 'cron', + 'cut', + 'date', + 'dd', + 'dirname', + 'du', + 'echo', + 'ed', + 'env', + 'expand', + 'expr', + 'false', + 'find', + 'flock', + 'fold', + 'getconf', + 'grep', + 'head', + 'hostname', + 'install', + 'join', + 'kill', + 'link', + 'ln', + 'logger', + 'logname', + 'ls', + 'md5sum', + 'mkdir', + 'mkfifo', + 'mknod', + 'mktemp', + 'mv', + 'nice', + 'nl', + 'nohup', + 'od', + 'paste', + 'pathchk', + 'printenv', + 'printf', + 'pwd', + 'readlink', + 'renice', + 'rev', + 'rm', + 'rmdir', + 'sed', + 'seq', + 'setsid', + 'sha1sum', + 'sha224sum', + 'sha256sum', + 'sha384sum', + 'sha512-224sum', + 'sha512-256sum', + 'sha512sum', + 'sleep', + 'sort', + 'split', + 'sponge', + -- use strings from binutils + 'sync', + 'tail', + -- use tar from OpenBSD + 'tee', + 'test', + 'tftp', + 'time', + 'touch', + 'tr', + 'true', + 'tsort', + 'tty', + 'uname', + 'unexpand', + 'uniq', + 'unlink', + 'uudecode', + 'uuencode', + 'wc', + 'which', + 'whoami', + 'xargs', + 'yes', +} +for _, cmd in ipairs(cmds) do + local src = cmd + if src == 'install' then + src = 'xinstall' + end + local deps + if cmd == 'getconf' then + deps = {'$outdir/getconf.h'} + end + file('bin/'..cmd, '755', exe(cmd, {src..'.c', 'libutil.a', 'libutf.a'}, deps)) + local out = '$srcdir/'..src..'.1' + file('share/man/man1/'..cmd..'.1', '644', out) +end + +sym('bin/[', 'test') + +-- TODO: binutils' config/lib-ld.m4 should use AC_REQUIRE([AC_PROG_EGREP]) and +-- $EGREP instead of egrep. +file('bin/egrep', '755', '$dir/egrep') + +fetch('git') diff --git a/pkg/sys/sbase/src b/pkg/sys/sbase/src @@ -0,0 +1 @@ +Subproject commit d3780956a991d64056a4bade210fffca53c531a3 diff --git a/pkg/sys/sbase/ver b/pkg/sys/sbase/ver @@ -0,0 +1 @@ +d378095 r0 diff --git a/sets.lua b/sets.lua @@ -10,6 +10,7 @@ S.bin = { 'openbsd', 'pwgen', 'samurai', + 'sbase', 'skeleton', 'spm', 'strace',