diff options
Diffstat (limited to 'extra/nawk')
-rwxr-xr-x | extra/nawk/build | 14 | ||||
-rw-r--r-- | extra/nawk/checksums | 3 | ||||
-rw-r--r-- | extra/nawk/depends | 2 | ||||
-rw-r--r-- | extra/nawk/files/ninja.in | 53 | ||||
-rw-r--r-- | extra/nawk/meta | 3 | ||||
-rw-r--r-- | extra/nawk/sources | 3 | ||||
-rw-r--r-- | extra/nawk/version | 2 |
7 files changed, 72 insertions, 8 deletions
diff --git a/extra/nawk/build b/extra/nawk/build index 7da2a299..f66d9693 100755 --- a/extra/nawk/build +++ b/extra/nawk/build @@ -1,8 +1,12 @@ #!/bin/sh -e -make CFLAGS="$CFLAGS -static" -install -Dm755 "a.out" "$1/usr/bin/nawk" -ln -s /usr/bin/nawk "$1/usr/bin/awk" +printf 'cflags = %s\nldflags = %s\ncc = %s\nyacc = %s\ndestdir = %s\n' \ + "$CFLAGS -Wall -pedantic -Wcast-qual -O2" \ + "$LDFLAGS -static" \ + "${CC:-cc}" \ + "${YACC:-yacc}" \ + "$1" | +cat - ninja.in > build.ninja -install -Dm644 "awk.1" "$1/usr/share/man/man1/nawk.1" -ln -s nawk.1 "$1/usr/share/man/man1/awk.1" +ninja +ninja install diff --git a/extra/nawk/checksums b/extra/nawk/checksums index e69de29b..cdf3bc2a 100644 --- a/extra/nawk/checksums +++ b/extra/nawk/checksums @@ -0,0 +1,3 @@ +%BLAKE3 +ae403d804c986443e26cc9130dd7160e28646e73ac3f9a350551c59b207dce0a f9affa922c5.tar.gz +72fe67a51362c6a9b130cc30e3c1db31d066374e229a76fe090800c1d3efc7a4 ninja.in diff --git a/extra/nawk/depends b/extra/nawk/depends index bccf6175..23d59890 100644 --- a/extra/nawk/depends +++ b/extra/nawk/depends @@ -1 +1 @@ -bison make +samurai make diff --git a/extra/nawk/files/ninja.in b/extra/nawk/files/ninja.in new file mode 100644 index 00000000..2bbc7064 --- /dev/null +++ b/extra/nawk/files/ninja.in @@ -0,0 +1,53 @@ +rule cc + command = $cc $cflags -MD -MF $out.d -c -o $out $in + description = CC $out + depfile = $out.d + deps = gcc + +rule link + command = $cc $ldflags -o $out $in + description = LINK $out + +rule yacc + command = $yacc -o awkgram.tab.c -H awkgram.tab.h awkgram.y + description = YACC $out + +rule maketab + command = ./maketab $in > $out + description = MAKETAB $out + +rule custom + command = false + description = + +rule install-bin + command = clinst -Dm755 nawk "$destdir/usr/bin/nawk" && ln -s nawk "$destdir/usr/bin/awk" + description = Installing nawk and linking awk + +rule install-man + command = clman -d $destdir nawk.1 && ln -s nawk.1 "$destdir/usr/share/man/man1/awk.1" + description = Installing nawk.1 and linking awk.1 + +build all: phony nawk +build nawk: link b.o main.o parse.o proctab.o tran.o lib.o run.o lex.o awkgram.tab.o +build awkgram.tab.c awkgram.tab.h: yacc awkgram.y | awk.h proto.h +build b.o: cc b.c +build main.o: cc main.c +build parse.o: cc parse.c +build proctab.o: cc proctab.c +build tran.o: cc tran.c +build lib.o: cc lib.c +build run.o: cc run.c +build lex.o: cc lex.c +build awkgram.tab.o: cc awkgram.tab.c +build proctab.c: maketab awkgram.tab.h | maketab +build maketab: link maketab.c +build maketab.o: cc maketab.c | awkgram.tab.h +build PHONY: phony +build INSTALL_BIN: install-bin PHONY +build INSTALL_MAN: install-man PHONY nawk.1 +build install: phony INSTALL_BIN INSTALL_MAN +build nawk.1: custom awk.1 + command = cp awk.1 nawk.1 + description = GEN nawk.1 +default all diff --git a/extra/nawk/meta b/extra/nawk/meta new file mode 100644 index 00000000..dfd377c2 --- /dev/null +++ b/extra/nawk/meta @@ -0,0 +1,3 @@ +description: One true awk +license: SMLNJ +maintainer: Cem Keylan <cem@carbslinux.org> diff --git a/extra/nawk/sources b/extra/nawk/sources index dd509169..1a848046 100644 --- a/extra/nawk/sources +++ b/extra/nawk/sources @@ -1 +1,2 @@ -git+https://github.com/onetrueawk/awk +https://github.com/onetrueawk/awk/archive/f9affa922c5.tar.gz +files/ninja.in diff --git a/extra/nawk/version b/extra/nawk/version index 75e7ae63..d4ed3256 100644 --- a/extra/nawk/version +++ b/extra/nawk/version @@ -1 +1 @@ -20180827 1 +git 1 |