Patchwork [v2] hiawatha: add new recipe

login
register
mail settings
Submitter Jacob Kjaergaard
Date Aug. 9, 2013, 6:41 a.m.
Message ID <1376030472-24943-1-git-send-email-jabk@prevas.dk>
Download mbox | patch
Permalink /patch/265888/
State Accepted
Delegated to: Esben Haabendal
Headers show

Comments

Jacob Kjaergaard - Aug. 9, 2013, 6:41 a.m.
From: Jacob Kjaergaard <jacob@barsoekjaergaard.dk>

hiawatha is a lightweight and https supporting webserver with a small
footprint and a fast cgi engine.

hiawatha uses libpolarssl, so this recipe also provides libpolarsll which
is a dropin replacement for openssl.
---
 recipes/hiawatha/hiawatha.inc        |   80 ++++++++++++++++++++++++++++++++++
 recipes/hiawatha/hiawatha_9.1.oe     |    1 +
 recipes/hiawatha/hiawatha_9.1.oe.sig |    1 +
 3 files changed, 82 insertions(+)
 create mode 100644 recipes/hiawatha/hiawatha.inc
 create mode 100644 recipes/hiawatha/hiawatha_9.1.oe
 create mode 100644 recipes/hiawatha/hiawatha_9.1.oe.sig
Esben Haabendal - Oct. 14, 2013, 8:26 a.m.
Merged to master, thanks.

/Esben

Patch

diff --git a/recipes/hiawatha/hiawatha.inc b/recipes/hiawatha/hiawatha.inc
new file mode 100644
index 0000000..caa1f1d
--- /dev/null
+++ b/recipes/hiawatha/hiawatha.inc
@@ -0,0 +1,80 @@ 
+inherit cmake sysvinit
+
+RECIPE_FLAGS += "hiawatha_sysvinit_start hiawatha_sysvinit_stop"
+DEFAULT_USE_hiawatha_sysvinit_start	= "70"
+DEFAULT_USE_hiawatha_sysvinit_stop	= "0"
+SYSVINIT_SCRIPT_hiawatha		= "hiawatha"
+
+do_install[prefuncs] =+ "do_install_initscript"
+do_install_initscript() {
+  sysvinit_install_script ${S}/extra/debian/init.d/hiawatha hiawatha
+}
+
+SRC_URI="http://www.hiawatha-webserver.org/files/hiawatha-${PV}.tar.gz"
+
+DEPENDS="libc libm libcrypt libpthread"
+RDEPENDS_${PN} += "${DEPENDS}"
+
+RECIPE_FLAGS += "hiawatha_cache hiawatha_debug hiawatha_ipv6 hiawatha_monitor hiawatha_rproxy hiawatha_ssl hiawatha_tomahawk hiawatha_toolkit hiawatha_xslt hiawatha_confdir hiawatha_logdir hiawatha_piddir hiawatha_webrootdir hiawatha_workdir "
+DEFAULT_USE_hiawatha_cache="1"
+DEFAULT_USE_hiawatha_debug="0"
+DEFAULT_USE_hiawatha_ipv6="1"
+DEFAULT_USE_hiawatha_monitor="0"
+DEFAULT_USE_hiawatha_rproxy="1"
+DEFAULT_USE_hiawatha_ssl="1" 
+DEFAULT_USE_hiawatha_tomahawk="0" 
+DEFAULT_USE_hiawatha_toolkit="1" 
+DEFAULT_USE_hiawatha_xslt="0"
+
+ENABLE_cache				="-DENABLE_CACHE=off"
+ENABLE_cache:USE_hiawatha_cache		="-DENABLE_CACHE=ON"
+ENABLE_debug				="-DENABLE_DEBUG=off"
+ENABLE_debug:USE_hiawatha_debug		="-DENABLE_DEBUG=ON"
+ENABLE_ipv6				="-DENABLE_IPV6=off"
+ENABLE_ipv6:USE_hiawatha_ipv6		="-DENABLE_IPV6=ON"
+ENABLE_monitor				="-DENABLE_MONITOR=off"
+ENABLE_monitor:USE_hiawatha_monitor	="-DENABLE_MONITOR=ON"
+ENABLE_rproxy				="-DENABLE_RPROXY=off"
+ENABLE_rproxy:USE_hiawatha_rproxy	="-DENABLE_RPROXY=ON"
+ENABLE_ssl				="-DENABLE_SSL=off"
+ENABLE_ssl:USE_hiawatha_ssl		="-DENABLE_SSL=ON"
+ENABLE_tomahawk				="-DENABLE_TOMAHAWK=off"
+ENABLE_tomahawk:USE_hiawatha_tomahawk	="-DENABLE_TOMAHAWK=ON"
+ENABLE_toolkit				="-DENABLE_TOOLKIT=off"
+ENABLE_toolkit:USE_hiawatha_toolkit	="-DENABLE_TOOLKIT=ON"
+ENABLE_xslt				="-DENABLE_XSLT=off"
+ENABLE_xslt:USE_hiawatha_xslt		="-DENABLE_XSLT=ON"
+
+EXTRA_OE_CMAKE_CONF="\
+${ENABLE_cache} \
+${ENABLE_debug} \
+${ENABLE_ipv6} \
+${ENABLE_monitor} \
+${ENABLE_rproxy} \
+${ENABLE_ssl} \
+${ENABLE_tomahawk} \
+${ENABLE_toolkit} \
+${ENABLE_xslt} \
+-DWEBROOT_DIR=${localstatedir}/www \
+-DPID_DIR=${localstatedir}/pid \
+-DCONFIG_DIR=${sysconfdir} \
+-DLOG_DIR=${localstatedir}/log \
+-DWORK_DIR=/tmp \
+"
+
+do_install[postfuncs] += "do_install_libpolarssl"
+
+do_install_libpolarssl() {
+ mv ${D}/usr/lib/hiawatha/* ${D}${libdir}/.
+}
+
+PACKAGES =+ "${PN}-conf"
+FILES_${PN}-conf = "${sysconfdir}/hiawatha.conf"
+RDEPENDS_${PN} += "${PN}-conf"
+
+inherit auto-package-libs auto-package-utils
+AUTO_PACKAGE_LIBS = "polarssl"
+RDEPENDS_${PN} += "libpolarssl"
+
+AUTO_PACKAGE_UTILS = "ssi-cgi hiawatha wigwam cgi-wrapper"
+RDEPENDS_${PN} += "${AUTO_PACKAGE_UTILS_PACKAGES}"
diff --git a/recipes/hiawatha/hiawatha_9.1.oe b/recipes/hiawatha/hiawatha_9.1.oe
new file mode 100644
index 0000000..cafb3a4
--- /dev/null
+++ b/recipes/hiawatha/hiawatha_9.1.oe
@@ -0,0 +1 @@ 
+require hiawatha.inc
diff --git a/recipes/hiawatha/hiawatha_9.1.oe.sig b/recipes/hiawatha/hiawatha_9.1.oe.sig
new file mode 100644
index 0000000..42be80f
--- /dev/null
+++ b/recipes/hiawatha/hiawatha_9.1.oe.sig
@@ -0,0 +1 @@ 
+2fd6e3d6d16ff3464f650fb17a274cfb852943de  hiawatha-9.1.tar.gz