From 219a6dab8995aad9ac4860cc1a84d6f3509a03a4 Mon Sep 17 00:00:00 2001 From: wbx Date: Sun, 17 May 2009 14:41:34 +0200 Subject: Initial import --- package/axtls/Config.in | 17 +++++ package/axtls/Config.in.lib | 11 ++++ package/axtls/Makefile | 43 +++++++++++++ package/axtls/files/axhttpd.init | 30 +++++++++ package/axtls/files/config | 102 ++++++++++++++++++++++++++++++ package/axtls/ipkg/axhttpd.control | 5 ++ package/axtls/ipkg/axhttpd.postinst | 3 + package/axtls/ipkg/libaxtls.control | 5 ++ package/axtls/patches/001-opt_flags.patch | 33 ++++++++++ package/axtls/patches/patch-httpd_main_c | 21 ++++++ 10 files changed, 270 insertions(+) create mode 100644 package/axtls/Config.in create mode 100644 package/axtls/Config.in.lib create mode 100644 package/axtls/Makefile create mode 100644 package/axtls/files/axhttpd.init create mode 100644 package/axtls/files/config create mode 100644 package/axtls/ipkg/axhttpd.control create mode 100644 package/axtls/ipkg/axhttpd.postinst create mode 100644 package/axtls/ipkg/libaxtls.control create mode 100644 package/axtls/patches/001-opt_flags.patch create mode 100644 package/axtls/patches/patch-httpd_main_c (limited to 'package/axtls') diff --git a/package/axtls/Config.in b/package/axtls/Config.in new file mode 100644 index 000000000..5d1459da9 --- /dev/null +++ b/package/axtls/Config.in @@ -0,0 +1,17 @@ +config ADK_COMPILE_AXTLS + tristate + default n + depends ADK_PACKAGE_LIBAXTLS || ADK_PACKAGE_AXHTTPD + +config ADK_PACKAGE_AXHTTPD + prompt "axhttpd........................... small embedded webserver" + tristate + default n + select ADK_COMPILE_AXTLS + select ADK_PACKAGE_LIBAXTLS + help + axhttpd is a small embedded web server using the axTLS library. + + http://www.axtls.co.nr/ + + diff --git a/package/axtls/Config.in.lib b/package/axtls/Config.in.lib new file mode 100644 index 000000000..d7b64aa44 --- /dev/null +++ b/package/axtls/Config.in.lib @@ -0,0 +1,11 @@ +config ADK_PACKAGE_LIBAXTLS + prompt "libaxtls.......................... Embedded client/server TLSv1 SSL library" + tristate + default n + select ADK_COMPILE_AXTLS + help + Embedded client/server TLSv1 SSL library + + http://www.axtls.co.nr/ + + diff --git a/package/axtls/Makefile b/package/axtls/Makefile new file mode 100644 index 000000000..2ac2611a3 --- /dev/null +++ b/package/axtls/Makefile @@ -0,0 +1,43 @@ +# $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:= axtls +PKG_VERSION:= 1.1.0 +PKG_RELEASE:= 8 +PKG_MD5SUM:= 4a834edc93f46fdca4f9c93ec665376e +DISTFILES:= axTLS-${PKG_VERSION}.tar.gz +MASTER_SITES:= ${MASTER_SITE_SOURCEFORGE:=axtls/} +WRKDIST= ${WRKDIR}/axTLS + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,LIBAXTLS,libaxtls,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) +$(eval $(call PKG_template,AXHTTPD,axhttpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) + +BUILD_STYLE= auto +XAKE_FLAGS+= STRIP='' \ + CC='${TARGET_CC}' \ + OPT_CFLAGS='${TARGET_CFLAGS}' \ + OPT_LDFLAGS="" + +do-configure: + ${CP} ./files/config ${WRKBUILD}/config/.config + ${MAKE} -C ${WRKBUILD} oldconfig + +do-install: + # axtls library + ${INSTALL_DIR} ${IDIR_LIBAXTLS}/usr/lib + $(CP) $(WRKBUILD)/_stage/libaxtls.so.* $(IDIR_LIBAXTLS)/usr/lib/ + # awhttpd server + ${INSTALL_DIR} ${IDIR_AXHTTPD}/etc/init.d + ${INSTALL_DIR} ${IDIR_AXHTTPD}/www + ${INSTALL_DIR} ${IDIR_AXHTTPD}/usr/sbin + ${INSTALL_BIN} $(WRKBUILD)/_stage/axhttpd $(IDIR_AXHTTPD)/usr/sbin/ + $(INSTALL_BIN) ./files/axhttpd.init \ + $(IDIR_AXHTTPD)/etc/init.d/axhttpd + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/axtls/files/axhttpd.init b/package/axtls/files/axhttpd.init new file mode 100644 index 000000000..70ccc48d5 --- /dev/null +++ b/package/axtls/files/axhttpd.init @@ -0,0 +1,30 @@ +#!/bin/sh +#FWINIT 80 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${axhttpd:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + if [ ! -d /www -a ! -h /www ]; then + echo "axhttpd not started. create /www first" + exit 0 + fi + /usr/sbin/axhttpd >>/var/log/axhttpd.access + ;; +stop) + killall axhttpd + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/axtls/files/config b/package/axtls/files/config new file mode 100644 index 000000000..caa5dc35a --- /dev/null +++ b/package/axtls/files/config @@ -0,0 +1,102 @@ +# +# Automatically generated make config: don't edit +# +HAVE_DOT_CONFIG=y +CONFIG_PLATFORM_LINUX=y +# CONFIG_PLATFORM_CYGWIN is not set +# CONFIG_PLATFORM_SOLARIS is not set +# CONFIG_PLATFORM_WIN32 is not set + +# +# General Configuration +# +PREFIX="/usr" +CONFIG_DEBUG=y +# CONFIG_VISUAL_STUDIO_6_0 is not set +# CONFIG_VISUAL_STUDIO_7_0 is not set +# CONFIG_VISUAL_STUDIO_8_0 is not set +CONFIG_VISUAL_STUDIO_6_0_BASE="" +CONFIG_VISUAL_STUDIO_7_0_BASE="" +CONFIG_VISUAL_STUDIO_8_0_BASE="" +CONFIG_EXTRA_CFLAGS_OPTIONS="" +CONFIG_EXTRA_LDFLAGS_OPTIONS="" + +# +# SSL Library +# +# CONFIG_SSL_SERVER_ONLY is not set +# CONFIG_SSL_CERT_VERIFICATION is not set +CONFIG_SSL_ENABLE_CLIENT=y +# CONFIG_SSL_FULL_MODE is not set +# CONFIG_SSL_SKELETON_MODE is not set +# CONFIG_SSL_PROT_LOW is not set +CONFIG_SSL_PROT_MEDIUM=y +# CONFIG_SSL_PROT_HIGH is not set +CONFIG_SSL_USE_DEFAULT_KEY=y +CONFIG_SSL_ENABLE_V23_HANDSHAKE=y +CONFIG_SSL_HAS_PEM=y +CONFIG_SSL_USE_PKCS12=y +CONFIG_SSL_EXPIRY_TIME=24 +CONFIG_X509_MAX_CA_CERTS=4 +CONFIG_SSL_MAX_CERTS=2 +# CONFIG_SSLCTX_MUTEXING is not set +CONFIG_USE_DEV_URANDOM=y +# CONFIG_WIN32_USE_CRYPTO_LIB is not set +# CONFIG_PERFORMANCE_TESTING is not set +# CONFIG_SSL_TEST is not set +CONFIG_AXHTTPD=y + +# +# Axhttpd Configuration +# +# CONFIG_HTTP_STATIC_BUILD is not set +CONFIG_HTTP_HTTPS_PORT=443 +CONFIG_HTTP_SESSION_CACHE_SIZE=5 +CONFIG_HTTP_WEBROOT="/www" +CONFIG_HTTP_PORT=80 +CONFIG_HTTP_TIMEOUT=0 +CONFIG_HTTP_HAS_CGI=y +CONFIG_HTTP_CGI_EXTENSION=".cgi" +CONFIG_HTTP_DIRECTORIES=y +# CONFIG_HTTP_PERM_CHECK is not set +# CONFIG_HTTP_HAS_IPV6 is not set +CONFIG_HTTP_ALL_MIME_TYPES=y +CONFIG_HTTP_VERBOSE=y +CONFIG_HTTP_IS_DAEMON=y + +# +# Language Bindings +# +# CONFIG_BINDINGS is not set +# CONFIG_CSHARP_BINDINGS is not set +# CONFIG_VBNET_BINDINGS is not set +CONFIG_DOT_NET_FRAMEWORK_BASE="" +# CONFIG_JAVA_BINDINGS is not set +CONFIG_JAVA_HOME="" +# CONFIG_PERL_BINDINGS is not set +CONFIG_PERL_CORE="" +CONFIG_PERL_LIB="" + +# +# Samples +# +# CONFIG_SAMPLES is not set +# CONFIG_C_SAMPLES is not set +# CONFIG_CSHARP_SAMPLES is not set +# CONFIG_VBNET_SAMPLES is not set +# CONFIG_JAVA_SAMPLES is not set +# CONFIG_PERL_SAMPLES is not set + +# +# BigInt Options +# +# CONFIG_BIGINT_CLASSICAL is not set +# CONFIG_BIGINT_MONTGOMERY is not set +CONFIG_BIGINT_BARRETT=y +# CONFIG_BIGINT_CRT is not set +# CONFIG_BIGINT_KARATSUBA is not set +MUL_KARATSUBA_THRESH=0 +SQU_KARATSUBA_THRESH=0 +# CONFIG_BIGINT_SLIDING_WINDOW is not set +# CONFIG_BIGINT_SQUARE is not set +# CONFIG_BIGINT_CHECK_ON is not set diff --git a/package/axtls/ipkg/axhttpd.control b/package/axtls/ipkg/axhttpd.control new file mode 100644 index 000000000..e19f3fc4c --- /dev/null +++ b/package/axtls/ipkg/axhttpd.control @@ -0,0 +1,5 @@ +Package: axhttpd +Priority: optional +Section: net +Depends: libaxtls +Description: small embedded webserver diff --git a/package/axtls/ipkg/axhttpd.postinst b/package/axtls/ipkg/axhttpd.postinst new file mode 100644 index 000000000..d19a62e8a --- /dev/null +++ b/package/axtls/ipkg/axhttpd.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf axhttpd diff --git a/package/axtls/ipkg/libaxtls.control b/package/axtls/ipkg/libaxtls.control new file mode 100644 index 000000000..b9c9d4be4 --- /dev/null +++ b/package/axtls/ipkg/libaxtls.control @@ -0,0 +1,5 @@ +Package: libaxtls +Priority: optional +Section: libs +Description: an embedded client/server TLSv1 SSL implementation +Depends: diff --git a/package/axtls/patches/001-opt_flags.patch b/package/axtls/patches/001-opt_flags.patch new file mode 100644 index 000000000..a27b3a449 --- /dev/null +++ b/package/axtls/patches/001-opt_flags.patch @@ -0,0 +1,33 @@ +diff -ruN axTLS-0.95-old/config/makefile.conf axTLS-0.95-new/config/makefile.conf +--- axTLS-0.95-old/config/makefile.conf 2006-02-28 02:50:28.000000000 +0100 ++++ axTLS-0.95-new/config/makefile.conf 2006-05-18 22:24:02.000000000 +0200 +@@ -87,20 +87,23 @@ + endif + + ifdef CONFIG_DEBUG +-CFLAGS += -g ++OPT_CFLAGS = -g + else +-LDFLAGS += -s ++OPT_LDFLAGS = -s + ifdef CONFIG_PLATFORM_SOLARIS +-CFLAGS += -O ++OPT_CFLAGS = -O + else +-CFLAGS += -O3 ++OPT_CFLAGS = -O3 + endif + + endif # CONFIG_DEBUG + endif # WIN32 + +-CFLAGS+=$(subst ",, $(strip $(CONFIG_EXTRA_CFLAGS_OPTIONS))) +-LDFLAGS+=$(subst ",, $(strip $(CONFIG_EXTRA_LDFLAGS_OPTIONS))) ++EXTRA_CFLAGS=$(subst ",, $(strip $(CONFIG_EXTRA_CFLAGS_OPTIONS))) ++EXTRA_LDFLAGS=$(subst ",, $(strip $(CONFIG_EXTRA_LDFLAGS_OPTIONS))) ++ ++CFLAGS += $(OPT_CFLAGS) $(EXTRA_CFLAGS) ++LDFLAGS += $(OPT_LDFLAGS) $(EXTRA_LDFLAGS) + + endif # not 'clean' + diff --git a/package/axtls/patches/patch-httpd_main_c b/package/axtls/patches/patch-httpd_main_c new file mode 100644 index 000000000..b4017803e --- /dev/null +++ b/package/axtls/patches/patch-httpd_main_c @@ -0,0 +1,21 @@ +$Id$ +--- axTLS.orig/httpd/main.c 2007-01-31 22:35:53.000000000 +0100 ++++ axTLS/httpd/main.c 2007-02-10 12:15:20.000000000 +0100 +@@ -98,11 +98,12 @@ int main(int argc, char *argv[]) + WSADATA wsaData; + WSAStartup(wVersionRequested,&wsaData); + #else +- if (getuid() == 0) /* change our uid if we are root */ +- { +- setgid(32767); +- setuid(32767); +- } ++ /* we can't bind to port 80/443 if we are nobody ?! */ ++ //if (getuid() == 0) /* change our uid if we are root */ ++ //{ ++ // setgid(32767); ++ // setuid(32767); ++ //} + + signal(SIGQUIT, die); + signal(SIGPIPE, SIG_IGN); -- cgit v1.2.3