From 219a6dab8995aad9ac4860cc1a84d6f3509a03a4 Mon Sep 17 00:00:00 2001 From: wbx Date: Sun, 17 May 2009 14:41:34 +0200 Subject: Initial import --- package/tntnet/Config.in | 37 +++++++++++++++++++ package/tntnet/Makefile | 67 ++++++++++++++++++++++++++++++++++ package/tntnet/files/mime.conf | 22 +++++++++++ package/tntnet/files/tntnet.conf | 49 +++++++++++++++++++++++++ package/tntnet/files/tntnet.properties | 31 ++++++++++++++++ package/tntnet/ipkg/tntnet.conffiles | 3 ++ package/tntnet/ipkg/tntnet.control | 4 ++ package/tntnet/ipkg/tntnet.postinst | 6 +++ 8 files changed, 219 insertions(+) create mode 100644 package/tntnet/Config.in create mode 100644 package/tntnet/Makefile create mode 100644 package/tntnet/files/mime.conf create mode 100644 package/tntnet/files/tntnet.conf create mode 100644 package/tntnet/files/tntnet.properties create mode 100644 package/tntnet/ipkg/tntnet.conffiles create mode 100644 package/tntnet/ipkg/tntnet.control create mode 100644 package/tntnet/ipkg/tntnet.postinst (limited to 'package/tntnet') diff --git a/package/tntnet/Config.in b/package/tntnet/Config.in new file mode 100644 index 000000000..9abab9b82 --- /dev/null +++ b/package/tntnet/Config.in @@ -0,0 +1,37 @@ +config ADK_PACKAGE_TNTNET + prompt "tntnet............................ a modular, multithreaded webapplicationserver" + tristate + default n + depends on ADK_CXX + select ADK_PACKAGE_CXXTOOLS + select ADK_PACKAGE_LIBICONV + select ADK_PACKAGE_LIBPTHREAD + select ADK_PACKAGE_ZLIB + help + Tntnet is a modular, multithreaded webapplicationserver + written from scratch for C++. + + http://www.tntnet.org + +choice +prompt "SSL/TLS Configuration" +depends on ADK_PACKAGE_TNTNET +default ADK_COMPILE_TNTNET_WITH_OPENSSL + +config ADK_COMPILE_TNTNET_WITHOUT_OPENSSL + bool "no ssl encryption support" + help + +config ADK_COMPILE_TNTNET_WITH_OPENSSL + bool "enable openssl encryption support" + depends ADK_PACKAGE_TNTNET + select ADK_PACKAGE_LIBOPENSSL + help + +config ADK_COMPILE_TNTNET_WITH_GNUTLS + bool "enable gnutls encryption support" + depends ADK_PACKAGE_TNTNET + select ADK_PACKAGE_LIBGNUTLS + help + +endchoice diff --git a/package/tntnet/Makefile b/package/tntnet/Makefile new file mode 100644 index 000000000..d53b99500 --- /dev/null +++ b/package/tntnet/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:= tntnet +PKG_VERSION:= 1.6.4 +PKG_RELEASE:= 1 +PKG_MD5SUM:= e2c3c5075a890711a7569730493c0996 +MASTER_SITES:= http://www.tntnet.org/download/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,TNTNET,tntnet,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +ifeq (${ADK_COMPILE_CXXTOOLS_WITH_UCLIBCXX},y) +TCXXFLAGS+= -fno-builtin -nostdinc++ -nodefaultlibs -I${STAGING_DIR}/usr/include/uClibc++ +TLDFLAGS+= -nodefaultlibs -luClibc++ -liconv -lpthread -lcxxtools -lm +DEPENDS= libgcc, uclibc++, cxxtools, zlib, libpthread, libiconv +else +TLDFLAGS+= -liconv -lpthread -lcxxtools -lm -ldl +DEPENDS= libgcc, libstdcxx, cxxtools, zlib, libpthread, libiconv +endif + +CONFIGURE_STYLE:= gnu +CONFIGURE_ARGS+= --without-epoll \ + --without-sdk \ + --without-cgi \ + --without-sendfile +ifeq (${ADK_COMPILE_TNTNET_WITH_OPENSSL},y) +CONFIGURE_ARGS+= --with-ssl=openssl +SSL_DEPS= ", libopenssl" +else ifeq (${ADK_COMPILE_TNTNET_WITH_GNUTLS},y) +CONFIGURE_ARGS+= --with-ssl=gnutls +SSL_DEPS= ", libgnutls" +else +CONFIGURE_ARGS+= --without-ssl +endif +CONFIGURE_ENV+= CXXFLAGS='${TCXXFLAGS}' \ + ac_cv_path_cxxtools_config=${STAGING_DIR}/usr/bin +BUILD_STYLE:= auto +INSTALL_STYLE:= auto + +ifeq (${ADK_COMPILE_CXXTOOLS_WITH_UCLIBCXX},y) +# add workaround because libtool tries to link libstdc++ +post-configure: + ${SED} 's#postdeps="-lstdc.*#postdeps="-lm"#' \ + ${WRKBUILD}/libtool +endif + +post-install: + ${INSTALL_DIR} ${IDIR_TNTNET}/www + ${INSTALL_DIR} ${IDIR_TNTNET}/etc/tntnet + ${INSTALL_DIR} ${IDIR_TNTNET}/usr/bin + ${INSTALL_DIR} ${IDIR_TNTNET}/usr/lib/tntnet + ${INSTALL_DATA} ./files/tntnet.{conf,properties} \ + ${IDIR_TNTNET}/etc/tntnet + ${INSTALL_DATA} ./files/mime.conf \ + ${IDIR_TNTNET}/etc/tntnet + ${CP} ${WRKINST}/usr/bin/tntnet ${IDIR_TNTNET}/usr/bin + ${CP} ${WRKINST}/usr/lib/tntnet/tntnet.so* ${IDIR_TNTNET}/usr/lib/tntnet + ${CP} ${WRKINST}/usr/lib/libtntnet.so.* ${IDIR_TNTNET}/usr/lib + echo Depends: ${DEPENDS}${SSL_DEPS} >>${IDIR_TNTNET}/CONTROL/control + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/tntnet/files/mime.conf b/package/tntnet/files/mime.conf new file mode 100644 index 000000000..bab84a83d --- /dev/null +++ b/package/tntnet/files/mime.conf @@ -0,0 +1,22 @@ +DefaultType text/html +AddType text/plain .txt +AddType text/html .html .htm .xhtml +AddType image/png .png +AddType image/gif .gif +AddType image/bmp .bmp +AddType application/x-tar .tgz +AddType image/jpeg .jpeg .jpg +AddType image/tif .tif .tiff +AddType text/css .css +AddType text/plain .asc +AddType text/rtf .rtf +AddType video/mpeg .mpeg .mpg .mpe +AddType application/x-javascript .js +AddType application/msword .doc .dot +AddType application/pdf .pdf +AddType application/postscript .ps .ai .eps +AddType application/vnd.ms-excel .xls .xlb +AddType application/vnd.ms-powerpoint .ppt .pps .pot +AddType application/zip .zip +AddType application/x-gtar .gtar .tgz .taz +AddType application/x-java-archive .jar diff --git a/package/tntnet/files/tntnet.conf b/package/tntnet/files/tntnet.conf new file mode 100644 index 000000000..c51c47bc2 --- /dev/null +++ b/package/tntnet/files/tntnet.conf @@ -0,0 +1,49 @@ +# tntnet.conf + +PropertyFile /etc/tntnet/tntnet.properties +Listen 0.0.0.0 80 +#SslListen 0.0.0.0 443 /etc/tntnet/tntnet.pem + +Daemon 1 +User tntnet +Group tntnet +CompPath /usr/lib/tntnet + +# set some limit to prevent DoS-attacks +MaxRequestSize 1048576 # 1 MB + +#Dir / +#Chroot /var/safedir +PidFile /var/run/tntnet.pid +MinThreads 2 +MaxThreads 4 +#ThreadStartDelay 0 # in ms +#QueueSize 100 +#CompPath path +#Load webapp # preload webapplication +#BufferSize 16384 +#SocketReadTimeout 200 +#SocketWriteTimeout 10000 +#KeepAliveTimeout 15000 +#KeepAliveMax 100 +#SessionTimeout 300 +#CompLifetime 10 +#MaxRequestTime 600 +#ReportStateTime 1200 + +#include /etc/tntnet.d/*.conf +include /etc/tntnet/mime.conf + +# make demos callable +#MapUrl ^/demos/controls$ redirect@tntnet /demos/controls/ +#MapUrl ^/demos/controls/(.+)\..* $1@controls +#MapUrl ^/demos/controls/$ index@controls index +#MapUrl ^/demos/controls/(.+) index@controls $1 +#MapUrl ^/demos/(.+)\..* $1@$1 $1 +#MapUrl ^/demos/(.+) $1@$1 +#MapUrl ^/demos/tntnet.jpg tntnet@hello + +# configure tntnet as a simple webserver +DocumentRoot /www +MapUrl (.*)/$ static@tntnet /$1/index.html +MapUrl ^/(.*)$ static@tntnet /$1 diff --git a/package/tntnet/files/tntnet.properties b/package/tntnet/files/tntnet.properties new file mode 100644 index 000000000..3e1006411 --- /dev/null +++ b/package/tntnet/files/tntnet.properties @@ -0,0 +1,31 @@ +# sample logging-properties for application tntnet +# put this in tntnet.properties and use: +# log_init("tntnet.properties"); +# in your application to initialize logging +# +# define categories with: +# log_define("some.category") +# this defines a static function, so you must put it outside other functions. +# you can define a category per file or a category per namespace. +# +# print logging-messages with: +# log_fatal("some fatal message"); +# log_error("some error message"); +# log_warn("some warn message"); +# log_info("some info message"); +# log_debug("some debug message"); +# +rootLogger=INFO + +# define logger-categories +logger.tntnet=INFO + +file=/var/log/tntnet.log +maxfilesize=1MB +maxbackupindex=10 +flushdelay=100 # delay write in milliseconds +#host=localhost:1234 # send log-messages with udp +#disabled=1 # disable logging +#logprocess=1 # log in separate process +#logprocesuser=someuser # change to user in log process +#logprocesgroup=somegroup # change to group in log process diff --git a/package/tntnet/ipkg/tntnet.conffiles b/package/tntnet/ipkg/tntnet.conffiles new file mode 100644 index 000000000..def08bf81 --- /dev/null +++ b/package/tntnet/ipkg/tntnet.conffiles @@ -0,0 +1,3 @@ +/etc/tntnet/tntnet.conf +/etc/tntnet/tntnet.properties +/etc/tntnet/mime.conf diff --git a/package/tntnet/ipkg/tntnet.control b/package/tntnet/ipkg/tntnet.control new file mode 100644 index 000000000..788b3b450 --- /dev/null +++ b/package/tntnet/ipkg/tntnet.control @@ -0,0 +1,4 @@ +Package: tntnet +Priority: optional +Section: net +Description: a modular, multithreaded webapplicationserver diff --git a/package/tntnet/ipkg/tntnet.postinst b/package/tntnet/ipkg/tntnet.postinst new file mode 100644 index 000000000..9d462f8d3 --- /dev/null +++ b/package/tntnet/ipkg/tntnet.postinst @@ -0,0 +1,6 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf tntnet +gid=$(get_next_gid) +add_group tntnet $gid +add_user tntnet $(get_next_uid) $gid /www -- cgit v1.2.3