summaryrefslogtreecommitdiff
path: root/package/rrs
diff options
context:
space:
mode:
authorwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
committerwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
commit219a6dab8995aad9ac4860cc1a84d6f3509a03a4 (patch)
treeb9c0f3c43aebba2fcfef777592d0add39f2072f4 /package/rrs
Initial import
Diffstat (limited to 'package/rrs')
-rw-r--r--package/rrs/Config.in48
-rw-r--r--package/rrs/Makefile67
-rw-r--r--package/rrs/ipkg/rrs-nossl.control5
-rw-r--r--package/rrs/ipkg/rrs.control5
-rw-r--r--package/rrs/patches/rrs-1.70-shell.patch12
5 files changed, 137 insertions, 0 deletions
diff --git a/package/rrs/Config.in b/package/rrs/Config.in
new file mode 100644
index 000000000..6fe48d0fd
--- /dev/null
+++ b/package/rrs/Config.in
@@ -0,0 +1,48 @@
+config ADK_COMPILE_RRS
+ tristate
+ default n
+ depends ADK_PACKAGE_RRS || ADK_PACKAGE_RRS_NOSSL
+
+config ADK_PACKAGE_RRS
+ prompt "rrs............................... A reverse (connecting) remote shell, with SSL support"
+ tristate
+ default n
+ depends on ADK_CXX
+ select ADK_COMPILE_RRS
+ select ADK_PACKAGE_ZLIB
+ select ADK_PACKAGE_LIBOPENSSL
+ help
+ A reverse (connecting) remote shell, built with SSL support.
+
+ http://www.cycom.se/dl/rrs/
+
+config ADK_PACKAGE_RRS_NOSSL
+ prompt "rrs-nossl......................... A reverse (connecting) remote shell, without SSL support"
+ tristate
+ default n
+ depends on ADK_CXX
+ select ADK_COMPILE_RRS
+ select ADK_PACKAGE_ZLIB
+ help
+ A reverse (connecting) remote shell, built without SSL support.
+
+ http://www.cycom.se/dl/rrs/
+
+choice
+prompt "C++ library to use"
+depends on ADK_PACKAGE_RRS
+default ADK_COMPILE_RRS_WITH_STDCXX if ADK_TARGET_LIB_GLIBC
+default ADK_COMPILE_RRS_WITH_UCLIBCXX if ADK_TARGET_LIB_UCLIBC
+
+config ADK_COMPILE_RRS_WITH_STDCXX
+ bool "Standard C++ library"
+ select ADK_PACKAGE_LIBSTDCXX
+ help
+
+config ADK_COMPILE_RRS_WITH_UCLIBCXX
+ bool "Embedded uClibc++ library"
+ select ADK_PACKAGE_UCLIBCXX
+ help
+
+endchoice
+
diff --git a/package/rrs/Makefile b/package/rrs/Makefile
new file mode 100644
index 000000000..283ca4ccd
--- /dev/null
+++ b/package/rrs/Makefile
@@ -0,0 +1,67 @@
+# $Id$
+#-
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include ${TOPDIR}/rules.mk
+
+PKG_NAME:= rrs
+PKG_VERSION:= 1.70
+PKG_RELEASE:= 2
+PKG_MD5SUM:= b400d03c0e39e3e78a7327ba78f789f0
+MASTER_SITES:= http://www.cycom.se/uploads/36/19/
+PKG_DEPEND:= libopenssl zlib
+PKG_DEPEND_NOSSL:= zlib
+ifeq ($(ADK_COMPILE_RRS_WITH_UCLIBCXX),y)
+PKG_DEPEND+= uclibc++
+PKG_DEPEND_NOSSL+= uclibc++
+else
+PKG_DEPEND+= libstdcxx
+PKG_DEPEND_NOSSL+= libstdcxx
+endif
+
+include ${TOPDIR}/mk/package.mk
+
+$(eval $(call PKG_template,RRS,rrs,${PKG_VERSION}-${PKG_RELEASE},${ARCH},${PKG_DEPEND}))
+$(eval $(call PKG_template,RRS_NOSSL,rrs-nossl,${PKG_VERSION}-${PKG_RELEASE},${ARCH},${PKG_DEPEND_NOSSL}))
+
+ifeq ($(ADK_COMPILE_RRS_WITH_UCLIBCXX),y)
+PKG_CFLAGS=-fno-builtin -fno-rtti -nostdinc++
+PKG_LDFLAGS=-nodefaultlibs -luClibc++ -lc -lm
+else
+PKG_CFLAGS=
+PKG_LDFLAGS=-shared
+endif
+
+
+do-configure:
+ifneq (${ADK_PACKAGE_RRS},)
+ ${MAKE} -C ${WRKBUILD} \
+ CC="${TARGET_CC}" \
+ CFLAGS="${TARGET_CFLAGS} -I${STAGING_DIR}/usr/include ${PKG_FLAGS}" \
+ LDFLAGS="-L${STAGING_DIR}/usr/lib -L${STAGING_DIR}/lib ${PKG_LDFLAGS} -lutil -lssl -lcrypto -lz" \
+ generic
+ { cd ${WRKBUILD}; mv rrs rrs-ssl; }
+ -${MAKE} -C ${WRKBUILD} \
+ clean
+endif
+ifneq (${ADK_PACKAGE_RRS_NOSSL},)
+ ${MAKE} -C ${WRKBUILD} \
+ CC="${TARGET_CC}" \
+ CFLAGS="${TARGET_CFLAGS} -I${STAGING_DIR}/usr/include ${PKG_FLAGS}" \
+ LDFLAGSNOSSL="-L${STAGING_DIR}/usr/lib -L${STAGING_DIR}/lib ${PKG_LDFLAGS} -lutil" \
+ generic-nossl
+ { cd ${WRKBUILD}; mv rrs rrs-nossl; }
+endif
+
+do-install:
+ifneq (${ADK_PACKAGE_RRS},)
+ ${INSTALL_DIR} ${IDIR_RRS}/usr/bin
+ ${INSTALL_BIN} ${WRKBUILD}/rrs-ssl ${IDIR_RRS}/usr/bin/rrs
+endif
+ifneq (${ADK_PACKAGE_RRS_NOSSL},)
+ ${INSTALL_DIR} ${IDIR_RRS_NOSSL}/usr/bin
+ ${INSTALL_BIN} ${WRKBUILD}/rrs-nossl ${IDIR_RRS_NOSSL}/usr/bin/rrs
+endif
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/rrs/ipkg/rrs-nossl.control b/package/rrs/ipkg/rrs-nossl.control
new file mode 100644
index 000000000..a61cd7049
--- /dev/null
+++ b/package/rrs/ipkg/rrs-nossl.control
@@ -0,0 +1,5 @@
+Package: rrs-nossl
+Priority: optional
+Section: net
+Description: A reverse (connecting) remote shell, without SSL support.
+
diff --git a/package/rrs/ipkg/rrs.control b/package/rrs/ipkg/rrs.control
new file mode 100644
index 000000000..2652d7603
--- /dev/null
+++ b/package/rrs/ipkg/rrs.control
@@ -0,0 +1,5 @@
+Package: rrs
+Priority: optional
+Section: net
+Description: A reverse (connecting) remote shell, with SSL support.
+
diff --git a/package/rrs/patches/rrs-1.70-shell.patch b/package/rrs/patches/rrs-1.70-shell.patch
new file mode 100644
index 000000000..822ce7c18
--- /dev/null
+++ b/package/rrs/patches/rrs-1.70-shell.patch
@@ -0,0 +1,12 @@
+diff -ruN rrs-1.70-old/rrs.c rrs-1.70-new/rrs.c
+--- rrs-1.70-old/rrs.c 2004-05-30 02:32:03.000000000 +0200
++++ rrs-1.70-new/rrs.c 2005-10-12 12:41:24.000000000 +0200
+@@ -920,7 +920,7 @@
+ close(slave_fd);
+ signal(SIGHUP, SIG_DFL);
+ signal(SIGCHLD, SIG_DFL);
+- execl("/bin/sh", "", NULL);
++ execl("/bin/sh", "/bin/sh", NULL);
+ /* should not return */
+ exit(1);
+ } else if (pid > 0) {