new package: ckermit
This commit is contained in:
parent
958acc584d
commit
c9faf3f050
31
packages/ckermit/build.sh
Normal file
31
packages/ckermit/build.sh
Normal file
@ -0,0 +1,31 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://www.kermitproject.org/ckermit.html
|
||||
TERMUX_PKG_DESCRIPTION="A combined network and serial communication software package"
|
||||
TERMUX_PKG_LICENSE="BSD 3-Clause"
|
||||
TERMUX_PKG_LICENSE_FILE="COPYING.TXT"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=9.0.302
|
||||
TERMUX_PKG_SRCURL=http://www.columbia.edu/kermit/ftp/archives/cku${TERMUX_PKG_VERSION##*.}.tar.gz
|
||||
TERMUX_PKG_SHA256=0d5f2cd12bdab9401b4c836854ebbf241675051875557783c332a6a40dac0711
|
||||
TERMUX_PKG_DEPENDS="libcrypt"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_EXTRA_MAKE_ARGS="-e linuxa"
|
||||
|
||||
termux_extract_src_archive() {
|
||||
local file="$TERMUX_PKG_CACHEDIR/$(basename "${TERMUX_PKG_SRCURL}")"
|
||||
mkdir -p "$TERMUX_PKG_SRCDIR"
|
||||
tar xf "$file" -C "$TERMUX_PKG_SRCDIR" --strip-components=0
|
||||
}
|
||||
|
||||
termux_step_pre_configure() {
|
||||
CFLAGS+=" -fPIC"
|
||||
export KFLAGS="-DNOGETUSERSHELL -UNOTIMEH -DTIMEH -DUSE_FILE_R"
|
||||
LDFLAGS+=" -lcrypt"
|
||||
export LNKFLAGS="$LDFLAGS"
|
||||
}
|
||||
|
||||
termux_step_make_install() {
|
||||
mkdir -p $TERMUX_PREFIX/bin
|
||||
mkdir -p $TERMUX_PREFIX/share/man
|
||||
make prefix=$TERMUX_PREFIX manroot=$TERMUX_PREFIX/share install
|
||||
install -Dm600 -t $TERMUX_PREFIX/share/doc/ckermit/ *.txt
|
||||
}
|
20
packages/ckermit/ckcdeb.h.patch
Normal file
20
packages/ckermit/ckcdeb.h.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- a/ckcdeb.h
|
||||
+++ b/ckcdeb.h
|
||||
@@ -1308,7 +1308,7 @@
|
||||
#ifdef IKSD /* IKSD options... */
|
||||
#ifndef IKSDCONF /* IKSD configuration file */
|
||||
#ifdef UNIX
|
||||
-#define IKSDCONF "/etc/iksd.conf"
|
||||
+#define IKSDCONF "@TERMUX_PREFIX@/etc/iksd.conf"
|
||||
#else
|
||||
#ifdef OS2
|
||||
#define IKSDCONF "iksd.ksc"
|
||||
@@ -1322,7 +1322,7 @@
|
||||
#define IK_LCKTRIES 16 /* How many times to try to get lock */
|
||||
#define IK_LCKSLEEP 1 /* How long to sleep between tries */
|
||||
#define IK_LOCKFILE "iksd.lck" /* Database lockfilename */
|
||||
-#define IK_DBASEDIR "/var/log/" /* Database directory */
|
||||
+#define IK_DBASEDIR "@TERMUX_PREFIX@/var/log/" /* Database directory */
|
||||
#define IK_DBASEFIL "iksd.db" /* Database filename */
|
||||
#else /* UNIX */
|
||||
#ifdef OS2
|
11
packages/ckermit/ckcftp.c.patch
Normal file
11
packages/ckermit/ckcftp.c.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/ckcftp.c
|
||||
+++ b/ckcftp.c
|
||||
@@ -15488,7 +15488,7 @@
|
||||
if (!p)
|
||||
#endif /* OS2ORUNIX */
|
||||
#ifdef UNIX /* Systems that have a standard */
|
||||
- p = "/tmp/"; /* temporary directory... */
|
||||
+ p = "@TERMUX_PREFIX@/tmp/"; /* temporary directory... */
|
||||
#else
|
||||
#ifdef datageneral
|
||||
p = ":TMP:";
|
12
packages/ckermit/ckcmai.c.patch
Normal file
12
packages/ckermit/ckcmai.c.patch
Normal file
@ -0,0 +1,12 @@
|
||||
--- a/ckcmai.c
|
||||
+++ b/ckcmai.c
|
||||
@@ -3157,6 +3157,9 @@
|
||||
/* try to make a random unsigned int to feed srand() */
|
||||
#ifndef VMS
|
||||
/* time.h and MultiNet do not get along */
|
||||
+#ifdef __ANDROID__
|
||||
+ time_t time(time_t *);
|
||||
+#endif
|
||||
c = time(NULL);
|
||||
#endif /* VMS */
|
||||
c *= getpid();
|
11
packages/ckermit/ckcnet.h.patch
Normal file
11
packages/ckermit/ckcnet.h.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/ckcnet.h
|
||||
+++ b/ckcnet.h
|
||||
@@ -1506,4 +1506,8 @@
|
||||
#endif
|
||||
#endif /* MACOSX10 */
|
||||
|
||||
+#ifdef __ANDROID__
|
||||
+#include <strings.h>
|
||||
+#endif
|
||||
+
|
||||
#endif /* CKCNET_H */
|
12
packages/ckermit/ckucmd.c.patch
Normal file
12
packages/ckermit/ckucmd.c.patch
Normal file
@ -0,0 +1,12 @@
|
||||
--- a/ckucmd.c
|
||||
+++ b/ckucmd.c
|
||||
@@ -7342,6 +7342,9 @@
|
||||
#endif /* USE_FILE_CNT */
|
||||
#endif /* USE_FILE_R */
|
||||
|
||||
+#ifdef __ANDROID__
|
||||
+#include <bits/struct_file.h>
|
||||
+#endif
|
||||
|
||||
/*
|
||||
c m d c o n c h k
|
71
packages/ckermit/ckufio.c.patch
Normal file
71
packages/ckermit/ckufio.c.patch
Normal file
@ -0,0 +1,71 @@
|
||||
--- a/ckufio.c
|
||||
+++ b/ckufio.c
|
||||
@@ -990,7 +990,7 @@
|
||||
int ckxpriv = 1; /* Priv'd login ok */
|
||||
|
||||
#ifndef XFERFILE
|
||||
-#define XFERFILE "/var/log/iksd.log"
|
||||
+#define XFERFILE "@TERMUX_PREFIX@/var/log/iksd.log"
|
||||
#endif /* XFERFILE */
|
||||
|
||||
/* wtmp logging for IKSD... */
|
||||
@@ -1095,7 +1095,7 @@
|
||||
#define WTMPFILE "/usr/adm/wtmp.1"
|
||||
#else
|
||||
#ifdef LINUX
|
||||
-#define WTMPFILE "/var/log/wtmp"
|
||||
+#define WTMPFILE "@TERMUX_PREFIX@/var/log/wtmp"
|
||||
#else
|
||||
#define WTMPFILE "/usr/adm/wtmp"
|
||||
#endif /* QNX */
|
||||
@@ -3322,7 +3322,7 @@
|
||||
#ifdef Plan9
|
||||
defshell = "/bin/rc";
|
||||
#else
|
||||
- defshell = "/bin/sh";
|
||||
+ defshell = "@TERMUX_PREFIX@/bin/sh";
|
||||
#endif /* Plan9 */
|
||||
#endif /* HPUX10 */
|
||||
#endif /* aegis */
|
||||
@@ -3351,7 +3351,7 @@
|
||||
|
||||
#ifdef aegis
|
||||
if ((shpath = getenv("SERVERSHELL")) == NULL)
|
||||
- shpath = "/bin/sh";
|
||||
+ shpath = "@TERMUX_PREFIX@/bin/sh";
|
||||
#else
|
||||
shpath = getenv("SHELL"); /* What shell? */
|
||||
if (shpath == NULL) {
|
||||
@@ -6865,8 +6865,8 @@
|
||||
execl("/bin/rc", "rc", "-c", s, NULL);
|
||||
perror("/bin/rc");
|
||||
#else
|
||||
- execl("/bin/sh","sh","-c",s,NULL);
|
||||
- perror("/bin/sh");
|
||||
+ execl("@TERMUX_PREFIX@/bin/sh","sh","-c",s,NULL);
|
||||
+ perror("@TERMUX_PREFIX@/bin/sh");
|
||||
#endif /* Plan9 */
|
||||
#endif /* HPUX10 */
|
||||
_exit(255);
|
||||
@@ -6957,7 +6957,7 @@
|
||||
#ifdef Plan9
|
||||
char *defshell = "/bin/rc";
|
||||
#else
|
||||
- char *defshell = "/bin/sh";
|
||||
+ char *defshell = "@TERMUX_PREFIX@/bin/sh";
|
||||
#endif /* Plan9 */
|
||||
#endif /* HPUX10 */
|
||||
if (priv_can()) exit(1); /* Turn off privs. */
|
||||
@@ -7748,10 +7748,10 @@
|
||||
outside of UNIX, it should be spread out among the ck?fio.c modules...
|
||||
*/
|
||||
#ifndef _PATH_BSHELL
|
||||
-#define _PATH_BSHELL "/usr/bin/bash"
|
||||
+#define _PATH_BSHELL "@TERMUX_PREFIX@/bin/bash"
|
||||
#endif /* _PATH_BSHELL */
|
||||
#ifndef _PATH_FTPUSERS
|
||||
-#define _PATH_FTPUSERS "/etc/ftpusers"
|
||||
+#define _PATH_FTPUSERS "@TERMUX_PREFIX@/etc/ftpusers"
|
||||
#endif /* _PATH_FTPUSERS */
|
||||
|
||||
/*
|
12
packages/ckermit/ckupty.c.patch
Normal file
12
packages/ckermit/ckupty.c.patch
Normal file
@ -0,0 +1,12 @@
|
||||
--- a/ckupty.c
|
||||
+++ b/ckupty.c
|
||||
@@ -181,7 +181,9 @@
|
||||
#endif /* WANT_UTMP */
|
||||
|
||||
#ifdef LINUX
|
||||
+#ifndef __ANDROID__
|
||||
#define CK_VHANGUP
|
||||
+#endif
|
||||
#define HAVE_SYS_SELECT_H
|
||||
#define HAVE_GETUTENT
|
||||
#define HAVE_SETUTENT
|
11
packages/ckermit/ckutio.c.patch
Normal file
11
packages/ckermit/ckutio.c.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/ckutio.c
|
||||
+++ b/ckutio.c
|
||||
@@ -492,7 +492,7 @@
|
||||
#define LOCK_DIR "/var/spool/locks"
|
||||
#else
|
||||
#ifdef LINUXFSSTND
|
||||
-#define LOCK_DIR "/var/lock";
|
||||
+#define LOCK_DIR "@TERMUX_PREFIX@/var/lock";
|
||||
#else
|
||||
#define LOCK_DIR "/usr/spool/locks"
|
||||
#endif /* LINUXFSSTND */
|
11
packages/ckermit/ckuus4.c.patch
Normal file
11
packages/ckermit/ckuus4.c.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/ckuus4.c
|
||||
+++ b/ckuus4.c
|
||||
@@ -13119,7 +13119,7 @@
|
||||
if (!p)
|
||||
#endif /* OS2ORUNIX */
|
||||
#ifdef UNIX /* Systems that have a standard */
|
||||
- p = "/tmp/"; /* temporary directory... */
|
||||
+ p = "@TERMUX_PREFIX@/tmp/"; /* temporary directory... */
|
||||
#else
|
||||
#ifdef datageneral
|
||||
p = ":TMP:";
|
20
packages/ckermit/ckuus5.c.patch
Normal file
20
packages/ckermit/ckuus5.c.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- a/ckuus5.c
|
||||
+++ b/ckuus5.c
|
||||
@@ -840,6 +840,9 @@
|
||||
char * k_info_dir = NULL; /* Where to find text files */
|
||||
#ifdef UNIX
|
||||
static char * txtdir[] = {
|
||||
+#ifdef __ANDROID__
|
||||
+ "@TERMUX_PREFIX@/share/doc/",
|
||||
+#else
|
||||
"/usr/local/doc/", /* Linux, SunOS, ... */
|
||||
"/usr/share/lib/", /* HP-UX 10.xx... */
|
||||
"/usr/share/doc/", /* Other possibilities... */
|
||||
@@ -852,6 +855,7 @@
|
||||
"/opt/",
|
||||
"/usr/doc/",
|
||||
"/doc/",
|
||||
+#endif
|
||||
""
|
||||
};
|
||||
#endif /* UNIX */
|
14
packages/ckermit/ckuusx.c.patch
Normal file
14
packages/ckermit/ckuusx.c.patch
Normal file
@ -0,0 +1,14 @@
|
||||
--- a/ckuusx.c
|
||||
+++ b/ckuusx.c
|
||||
@@ -851,7 +851,11 @@
|
||||
"/dev/cuaa0"
|
||||
#else /* __FreeBSD__ */
|
||||
#ifdef __linux__
|
||||
+#ifdef __ANDROID__
|
||||
+"/dev/tty"
|
||||
+#else
|
||||
"/dev/ttyS0"
|
||||
+#endif
|
||||
#else /* __linux__ */
|
||||
#ifdef BSD44
|
||||
"/dev/tty00"
|
28
packages/ckermit/makefile.patch
Normal file
28
packages/ckermit/makefile.patch
Normal file
@ -0,0 +1,28 @@
|
||||
--- a/makefile
|
||||
+++ b/makefile
|
||||
@@ -1488,11 +1488,12 @@
|
||||
# $(CC) -o ck_off_t ck_off_t.$(EXT)
|
||||
|
||||
wart: ckwart.$(EXT)
|
||||
- $(CC) $(LNKFLAGS) -o wart ckwart.$(EXT) $(LIBS)
|
||||
+ $(CC_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o wart ckwart.$(EXT) $(LIBS)
|
||||
|
||||
ckcmdb.$(EXT): ckcmdb.c ckcdeb.h ckcsym.h ckclib.h
|
||||
|
||||
ckwart.$(EXT): ckwart.c
|
||||
+ $(CC_FOR_BUILD) -c $<
|
||||
|
||||
ckudia.$(EXT): ckudia.c ckcker.h ckcdeb.h ckucmd.h ckcasc.h ckcsym.h ckcsig.h \
|
||||
ckcnet.h ckctel.h ckclib.h
|
||||
@@ -6051,8 +6052,9 @@
|
||||
@echo 'Making C-Kermit $(CKVER) for Linux 1.2 or later...'
|
||||
@echo 'IMPORTANT: Read the comments in the linux section of the'
|
||||
@echo 'makefile if you have trouble.'
|
||||
- $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
|
||||
- "CFLAGS = -O -DLINUX -pipe -funsigned-char -DFNFLOAT -DCK_POSIX_SIG \
|
||||
+ $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = $(CC)" "CC2 = $(CC)" \
|
||||
+ "CFLAGS = $(CFLAGS) $(CPPFLAGS) -DLINUX -pipe \
|
||||
+ -funsigned-char -DFNFLOAT -DCK_POSIX_SIG \
|
||||
-DCK_NEWTERM -DTCPSOCKET -DLINUXFSSTND -DNOCOTFMC -DPOSIX \
|
||||
-DUSE_STRERROR $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
|
||||
"LIBS = $(LIBS) -lm"
|
Loading…
Reference in New Issue
Block a user