From 46afb5f35fe153634b9bf5613b62500c0d9cd0df Mon Sep 17 00:00:00 2001 From: Leonid Plyushch Date: Mon, 18 Nov 2019 21:38:04 +0200 Subject: [PATCH] move from unstable: spiped --- packages/spiped/Makefile.patch | 61 ++++++++++++++++++++++++++++++++++ packages/spiped/build.sh | 22 ++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 packages/spiped/Makefile.patch create mode 100644 packages/spiped/build.sh diff --git a/packages/spiped/Makefile.patch b/packages/spiped/Makefile.patch new file mode 100644 index 000000000..f12279949 --- /dev/null +++ b/packages/spiped/Makefile.patch @@ -0,0 +1,61 @@ +diff --git a/Makefile b/Makefile +index ff07626..da5105e 100644 +--- a/Makefile ++++ b/Makefile +@@ -3,7 +3,6 @@ + PROGS= spiped spipe + TESTS= tests/nc-client tests/nc-server tests/valgrind + BINDIR_DEFAULT= /usr/local/bin +-CFLAGS_DEFAULT= -O2 + + all: cpusupport-config.h + export CFLAGS="$${CFLAGS:-${CFLAGS_DEFAULT}}"; \ +diff --git a/spipe/Makefile b/spipe/Makefile +index c55db18..ed2bee5 100644 +--- a/spipe/Makefile ++++ b/spipe/Makefile +@@ -4,14 +4,13 @@ PROG=spipe + MAN1=spipe.1 + SRCS=main.c pushbits.c proto_conn.c proto_crypt.c proto_handshake.c proto_pipe.c sha256.c elasticarray.c ptrheap.c timerqueue.c asprintf.c entropy.c getopt.c insecure_memzero.c monoclock.c noeintr.c sock.c warnp.c cpusupport_x86_aesni.c events_immediate.c events_network.c events_network_selectstats.c events_timer.c events.c network_connect.c network_read.c network_write.c crypto_aes.c crypto_aes_aesni.c crypto_aesctr.c crypto_dh.c crypto_dh_group14.c crypto_entropy.c crypto_verify_bytes.c + IDIRS=-I../proto -I../libcperciva/alg -I../libcperciva/datastruct -I../libcperciva/util -I../libcperciva/cpusupport -I../libcperciva/events -I../libcperciva/network -I../libcperciva/crypto +-LDADD_REQ=-lcrypto -lpthread ++LDADD_REQ=-lcrypto + + all: ${PROG} + + install:${PROG} + mkdir -p ${BINDIR} + cp ${PROG} ${BINDIR}/_inst.${PROG}.$$$$_ && \ +- strip ${BINDIR}/_inst.${PROG}.$$$$_ && \ + chmod 0555 ${BINDIR}/_inst.${PROG}.$$$$_ && \ + mv -f ${BINDIR}/_inst.${PROG}.$$$$_ ${BINDIR}/${PROG} + if ! [ -z "${MAN1DIR}" ]; then \ +diff --git a/spiped/Makefile b/spiped/Makefile +index 99f0b47..fdcf0ca 100644 +--- a/spiped/Makefile ++++ b/spiped/Makefile +@@ -4,14 +4,13 @@ PROG=spiped + MAN1=spiped.1 + SRCS=main.c dispatch.c proto_conn.c proto_crypt.c proto_handshake.c proto_pipe.c sha256.c elasticarray.c ptrheap.c timerqueue.c dnsthread.c graceful_shutdown.c asprintf.c daemonize.c entropy.c getopt.c insecure_memzero.c monoclock.c noeintr.c sock.c sock_util.c warnp.c cpusupport_x86_aesni.c events_immediate.c events_network.c events_network_selectstats.c events_timer.c events.c network_accept.c network_connect.c network_read.c network_write.c crypto_aes.c crypto_aes_aesni.c crypto_aesctr.c crypto_dh.c crypto_dh_group14.c crypto_entropy.c crypto_verify_bytes.c + IDIRS=-I../proto -I../libcperciva/alg -I../libcperciva/datastruct -I../lib/dnsthread -I../lib/util -I../libcperciva/util -I../libcperciva/cpusupport -I../libcperciva/events -I../libcperciva/network -I../libcperciva/crypto +-LDADD_REQ=-lcrypto -lpthread ++LDADD_REQ=-lcrypto + + all: ${PROG} + + install:${PROG} + mkdir -p ${BINDIR} + cp ${PROG} ${BINDIR}/_inst.${PROG}.$$$$_ && \ +- strip ${BINDIR}/_inst.${PROG}.$$$$_ && \ + chmod 0555 ${BINDIR}/_inst.${PROG}.$$$$_ && \ + mv -f ${BINDIR}/_inst.${PROG}.$$$$_ ${BINDIR}/${PROG} + if ! [ -z "${MAN1DIR}" ]; then \ +@@ -27,7 +26,7 @@ clean: + rm -f ${PROG} ${SRCS:.c=.o} + + ${PROG}:${SRCS:.c=.o} +- ${CC} -o ${PROG} ${SRCS:.c=.o} ${LDADD_EXTRA} ${LDADD_REQ} ${LDADD_POSIX} ++ ${CC} -o ${PROG} ${SRCS:.c=.o} -L${TERMUX_PREFIX}/lib ${LDADD_EXTRA} ${LDADD_REQ} ${LDADD_POSIX} + + main.o: main.c ../libcperciva/util/asprintf.h ../libcperciva/util/daemonize.h ../libcperciva/events/events.h ../libcperciva/util/getopt.h ../lib/util/graceful_shutdown.h ../libcperciva/util/parsenum.h ../libcperciva/util/sock.h ../libcperciva/util/warnp.h dispatch.h ../proto/proto_crypt.h ../libcperciva/crypto/crypto_dh.h + ${CC} ${CFLAGS} ${CFLAGS_POSIX} -D_POSIX_C_SOURCE=200809L -DCPUSUPPORT_CONFIG_FILE=\"cpusupport-config.h\" -I.. ${IDIRS} -c main.c -o main.o diff --git a/packages/spiped/build.sh b/packages/spiped/build.sh new file mode 100644 index 000000000..8b98ec38d --- /dev/null +++ b/packages/spiped/build.sh @@ -0,0 +1,22 @@ +TERMUX_PKG_HOMEPAGE=https://www.tarsnap.com/spiped.html +TERMUX_PKG_DESCRIPTION="a utility for creating symmetrically encrypted and authenticated pipes between socket addresses" +TERMUX_PKG_LICENSE="BSD" +TERMUX_PKG_MAINTAINER="Leonid Plyushch " +TERMUX_PKG_VERSION=1.6.0 +TERMUX_PKG_REVISION=8 +TERMUX_PKG_SRCURL=https://github.com/Tarsnap/spiped/archive/$TERMUX_PKG_VERSION.tar.gz +TERMUX_PKG_SHA256=c80a49b131aeb017c06dcc10e2461c25a333e1e32ed99a0bb6af169014306815 +TERMUX_PKG_DEPENDS="openssl" +TERMUX_PKG_BUILD_IN_SRC=true + +termux_step_make () { + CFLAGS+=" $CPPFLAGS" + env LDADD_EXTRA="$LDFLAGS" \ + make -j "$TERMUX_MAKE_PROCESSES" BINDIR="$TERMUX_PREFIX/bin" \ + MAN1DIR="$TERMUX_PREFIX/share/man/man1" +} + +termux_step_make_install() { + make install BINDIR="$TERMUX_PREFIX/bin" \ + MAN1DIR="$TERMUX_PREFIX/share/man/man1" +}