diff options
| author | Michael Forney <mforney@mforney.org> | 2018-02-15 21:24:24 -0800 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2018-02-16 02:52:34 -0800 |
| commit | 741d25282274e59c785b9cbee23cefff3d2721a2 (patch) | |
| tree | b7eaf7402cb1a61c220a3f0eecc3bc63cec14eaa /pkg/openbsd | |
| parent | 83d57181d1565d9c12b7d2467be9008d2b6edeab (diff) | |
Port build scripts to POSIX shell
Since we are now using Lua to generate ninja files, use of rc in build scripts
seems unnecessary and adds an additional bootstrap dependency. None of them are
too fancy, so just port to POSIX sh instead.
Diffstat (limited to 'pkg/openbsd')
| -rw-r--r-- | pkg/openbsd/fetch.sh | 30 | ||||
| -rw-r--r-- | pkg/openbsd/gen.lua | 11 |
2 files changed, 31 insertions, 10 deletions
diff --git a/pkg/openbsd/fetch.sh b/pkg/openbsd/fetch.sh new file mode 100644 index 00000000..8350bd3a --- /dev/null +++ b/pkg/openbsd/fetch.sh @@ -0,0 +1,30 @@ +set -e + +dir=$1 +shift + +cd "$dir" + +if [ -e src ] ; then + rm -rf src +fi + +if ! sha256sum -c sha256 2>/dev/null ; then + curl -L -K url -O + sha256sum -c sha256 +fi + +zcat src.tar.gz | pax -r -s '/^/src\//' \ + 'bin/pax/*' \ + 'include/*' \ + 'lib/libc/*' \ + 'lib/libcrypto/arc4random/*' \ + 'usr.bin/diff/*' \ + 'usr.bin/doas/*' \ + 'usr.bin/fmt/*' \ + 'usr.bin/nc/*' \ + 'usr.bin/patch/*' \ + 'usr.bin/yacc/*' +zcat sys.tar.gz | pax -r -s '/^/src\//' 'sys/sys/*' + +git apply -v --whitespace=nowarn --directory "$dir/src" patch/* diff --git a/pkg/openbsd/gen.lua b/pkg/openbsd/gen.lua index 4104ec0e..fb08788f 100644 --- a/pkg/openbsd/gen.lua +++ b/pkg/openbsd/gen.lua @@ -87,13 +87,4 @@ exe('yacc', [[usr.bin/yacc/( file('bin/yacc', '755', '$outdir/yacc') man{'usr.bin/yacc/yacc.1'} -fetch('curl', paths[[ - -s '/^/src\//' '( - bin/pax - include - lib/(libc/(crypt gen net stdlib string) libcrypto/arc4random) - usr.bin/(diff doas fmt nc patch yacc) - )/*' - ';' - -s '/^/src\//' 'sys/sys/*' -]]) +fetch 'local' |
