aboutsummaryrefslogtreecommitdiff
path: root/extra/oksh
diff options
context:
space:
mode:
Diffstat (limited to 'extra/oksh')
-rwxr-xr-xextra/oksh/build5
-rw-r--r--extra/oksh/checksums3
-rw-r--r--extra/oksh/depends1
-rw-r--r--extra/oksh/files/Makefile73
-rw-r--r--extra/oksh/files/pconfig.h14
-rwxr-xr-xextra/oksh/post-install4
-rw-r--r--extra/oksh/sources3
-rw-r--r--extra/oksh/version1
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