diff options
author | Cem Keylan <cem@ckyln.com> | 2020-09-21 13:33:16 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2020-09-21 13:33:16 +0300 |
commit | d5d871260ea23bc8c7afd32ee5df10dff241b15e (patch) | |
tree | fd3f91fd20e0d3086dda5d5e1a7f91ca1aa35050 /extra/oksh | |
parent | c83dad2a4891e4818dfecd299a7ac7568dd201b3 (diff) | |
download | repository-d5d871260ea23bc8c7afd32ee5df10dff241b15e.tar.gz |
oksh: use handmade Makefile instead
Diffstat (limited to 'extra/oksh')
-rwxr-xr-x | extra/oksh/build | 5 | ||||
-rw-r--r-- | extra/oksh/checksums | 3 | ||||
-rw-r--r-- | extra/oksh/depends | 1 | ||||
-rw-r--r-- | extra/oksh/files/Makefile | 73 | ||||
-rw-r--r-- | extra/oksh/files/pconfig.h | 14 | ||||
-rwxr-xr-x | extra/oksh/post-install | 4 | ||||
-rw-r--r-- | extra/oksh/sources | 3 | ||||
-rw-r--r-- | extra/oksh/version | 1 |
8 files changed, 104 insertions, 0 deletions
diff --git a/extra/oksh/build b/extra/oksh/build new file mode 100755 index 00000000..fe6d6ef1 --- /dev/null +++ b/extra/oksh/build @@ -0,0 +1,5 @@ +#!/bin/sh -e + +# We use a custom Makefile, instead of running ./configure +make +make DESTDIR="$1" install diff --git a/extra/oksh/checksums b/extra/oksh/checksums new file mode 100644 index 00000000..8e35c2d7 --- /dev/null +++ b/extra/oksh/checksums @@ -0,0 +1,3 @@ +bb3e9288dbd8915b9e175727cdb3898970e6c6fece61e6867102b399e215fb04 oksh-6.7.tar.gz +f5baec63d5de85ea73b85523ea1a8be126c08a82977dce485a44b02a2d481887 pconfig.h +19c97bd33b917b2552dcec55b68a4c27915a0c0af94ed083a7c4cad934eeda2c Makefile diff --git a/extra/oksh/depends b/extra/oksh/depends new file mode 100644 index 00000000..2392c85d --- /dev/null +++ b/extra/oksh/depends @@ -0,0 +1 @@ +ncurses make diff --git a/extra/oksh/files/Makefile b/extra/oksh/files/Makefile new file mode 100644 index 00000000..7337f98f --- /dev/null +++ b/extra/oksh/files/Makefile @@ -0,0 +1,73 @@ +.SUFFIXES: +.SUFFIXES: .o .c + +PREFIX = /usr +BINDIR = ${PREFIX}/bin +MANPREFIX = ${PREFIX}/share/man + +CPPFLAGS = -D_GNU_SOURCE -DEMACS -DVI -I. +CC = cc +LDFLAGS = -static +SRC = \ + alloc.c \ + asprintf.c \ + c_ksh.c \ + c_sh.c \ + c_test.c \ + c_ulimit.c \ + confstr.c \ + edit.c \ + emacs.c \ + eval.c \ + exec.c \ + expr.c \ + history.c \ + io.c \ + jobs.c \ + lex.c \ + mail.c \ + main.c \ + misc.c \ + path.c \ + reallocarray.c \ + shf.c \ + siglist.c \ + signame.c \ + strlcat.c \ + strlcpy.c \ + strtonum.c \ + syn.c \ + table.c \ + trap.c \ + tree.c \ + tty.c \ + unvis.c \ + var.c \ + version.c \ + vi.c \ + vis.c \ + +LIBS = -lc -lncursesw + +OBJ = ${SRC:.c=.o} +BIN = ksh + +all: ${BIN} + +${BIN}: ${OBJ} + ${CC} ${LDFLAGS} -o $@ ${OBJ} ${LIBS} + +.c.o: + ${CC} -c ${CFLAGS} ${CPPFLAGS} -o $@ $< + +clean: + rm -f ${OBJ} ksh + +install: all + mkdir -p ${DESTDIR}${BINDIR} ${DESTDIR}${MANPREFIX}/man1 + cp ksh ${DESTDIR}${BINDIR} + chmod 755 ${DESTDIR}${BINDIR}/ksh + cp sh.1 ${DESTDIR}${MANPREFIX}/man1/ksh.1 + chmod 644 ${DESTDIR}${MANPREFIX}/man1/ksh.1 + +.PHONY: all clean install diff --git a/extra/oksh/files/pconfig.h b/extra/oksh/files/pconfig.h new file mode 100644 index 00000000..0a7a9485 --- /dev/null +++ b/extra/oksh/files/pconfig.h @@ -0,0 +1,14 @@ +/* This file automatically generated by configure. */ + +#define __dead __attribute__((__noreturn__)) +#define HAVE_ASPRINTF +#define HAVE_CONFSTR +#define HAVE_CURSES +#define HAVE_SETRESGID +#define HAVE_SETRESUID +#define HAVE_SIG_T +#define HAVE_ST_MTIM +#define HAVE_STRLCAT +#define HAVE_STRLCPY +#define HAVE_TIMERADD +#define HAVE_TIMERSUB diff --git a/extra/oksh/post-install b/extra/oksh/post-install new file mode 100755 index 00000000..10372d09 --- /dev/null +++ b/extra/oksh/post-install @@ -0,0 +1,4 @@ +#!/bin/sh -e + +grep -qFw /usr/bin/ksh /etc/shells || + printf /usr/bin/ksh\\n >>/etc/shells diff --git a/extra/oksh/sources b/extra/oksh/sources new file mode 100644 index 00000000..417f6ccb --- /dev/null +++ b/extra/oksh/sources @@ -0,0 +1,3 @@ +https://github.com/ibara/oksh/releases/download/oksh-6.7/oksh-6.7.tar.gz +files/pconfig.h +files/Makefile diff --git a/extra/oksh/version b/extra/oksh/version new file mode 100644 index 00000000..75368dc2 --- /dev/null +++ b/extra/oksh/version @@ -0,0 +1 @@ +6.7 1 |