summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-httpd/hiawatha
diff options
context:
space:
mode:
Diffstat (limited to 'meta-webserver/recipes-httpd/hiawatha')
-rw-r--r--meta-webserver/recipes-httpd/hiawatha/files/hiawatha-init44
-rw-r--r--meta-webserver/recipes-httpd/hiawatha/files/hiawatha.service16
-rw-r--r--meta-webserver/recipes-httpd/hiawatha/hiawatha_9.2.bb66
3 files changed, 126 insertions, 0 deletions
diff --git a/meta-webserver/recipes-httpd/hiawatha/files/hiawatha-init b/meta-webserver/recipes-httpd/hiawatha/files/hiawatha-init
new file mode 100644
index 000000000..47fc0877a
--- /dev/null
+++ b/meta-webserver/recipes-httpd/hiawatha/files/hiawatha-init
@@ -0,0 +1,44 @@
1#!/bin/sh
2
3### BEGIN INIT INFO
4# Provides: hiawatha httpd httpd-cgi
5# Required-Start: $syslog $network $remote_fs
6# Required-Stop: $syslog $network $remote_fs
7# Default-Start: 2 3 4 5
8# Default-Stop: 0 1 6
9# Short-Description: Hiawatha webserver
10# Description: Hiawatha, a secure and advanced webserver.
11### END INIT INFO
12
13PATH=/sbin:/bin:/usr/sbin:/usr/bin
14DAEMON=sed_sbin_path/hiawatha
15NAME=hiawatha
16DESC="Hiawatha Web Server"
17OPTS=""
18
19case "$1" in
20 start)
21 echo -n "Starting $DESC: "
22 start-stop-daemon --start -x "$DAEMON" -- $OPTS
23 echo "$NAME."
24 ;;
25 stop)
26 echo -n "Stopping $DESC: "
27 start-stop-daemon --stop -x "$DAEMON"
28 echo "$NAME."
29 ;;
30 restart|force-reload)
31 echo -n "Restarting $DESC: "
32 start-stop-daemon --stop -x "$DAEMON"
33 sleep 1
34 start-stop-daemon --start -x "$DAEMON" -- $OPTS
35 echo "$NAME."
36 ;;
37 *)
38 N=/etc/init.d/$NAME
39 echo "Usage: $N {start|stop|restart|force-reload}" >&2
40 exit 1
41 ;;
42esac
43
44exit 0
diff --git a/meta-webserver/recipes-httpd/hiawatha/files/hiawatha.service b/meta-webserver/recipes-httpd/hiawatha/files/hiawatha.service
new file mode 100644
index 000000000..26cb8d03d
--- /dev/null
+++ b/meta-webserver/recipes-httpd/hiawatha/files/hiawatha.service
@@ -0,0 +1,16 @@
1[Unit]
2Description=Hiawatha Web Server
3After=network.target remote-fs.target nss-lookup.target
4
5[Service]
6Type=simple
7SyslogIdentifier=hiawatha
8ExecStartPre=/usr/sbin/hiawatha -k ; /usr/sbin/wigwam
9ExecStart= /usr/sbin/hiawatha -d
10TimeoutSec=10
11#(doesn't like this setting. Can't find files) PrivateTmp=true
12LimitNOFILE=infinity
13CapabilityBoundingSet=CAP_NET_BIND_SERVICE CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER CAP_FSETID CAP_SETGID CAP_SETUID
14
15[Install]
16WantedBy=multi-user.target
diff --git a/meta-webserver/recipes-httpd/hiawatha/hiawatha_9.2.bb b/meta-webserver/recipes-httpd/hiawatha/hiawatha_9.2.bb
new file mode 100644
index 000000000..b9fa5cde8
--- /dev/null
+++ b/meta-webserver/recipes-httpd/hiawatha/hiawatha_9.2.bb
@@ -0,0 +1,66 @@
1SUMMARY = "Lightweight secure web server"
2HOMEPAGE = "http://www.hiawatha-webserver.org"
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
5DEPENDS = "libxml2 libxslt"
6
7SECTION = "net"
8
9SRC_URI = "http://hiawatha-webserver.org/files/${BP}.tar.gz \
10 file://hiawatha-init \
11 file://hiawatha.service "
12
13SRC_URI[md5sum] = "a77f044634884c4cc5d21dab44e822a3"
14SRC_URI[sha256sum] = "5d9cdec51c618bb3efab747030e593d9bd49dfaf3236254c8e0cb60715716dbf"
15
16INITSCRIPT_NAME = "hiawatha"
17INITSCRIPT_PARAMS = "defaults 70"
18
19SYSTEMD_SERVICE_${PN} = "hiawatha.service"
20
21inherit cmake update-rc.d systemd
22
23EXTRA_OECMAKE = " -DENABLE_IPV6=OFF \
24 -DENABLE_CACHE=OFF \
25 -DENABLE_DEBUG=OFF \
26 -DENABLE_SSL=OFF \
27 -DENABLE_TOOLKIT=OFF \
28 -DENABLE_CHROOT=OFF \
29 -DENABLE_XSLT=ON \
30 -DENABLE_TOMAHAWK=OFF \
31 -DCMAKE_INSTALL_MANDIR=${mandir} \
32 -DCMAKE_INSTALL_BINDIR=${bindir} \
33 -DCMAKE_INSTALL_SBINDIR=${sbindir} \
34 -DCMAKE_INSTALL_SYSCONFDIR=${sysconfdir} \
35 -DCMAKE_INSTALL_LIBDIR=${libdir} \
36 -DLOG_DIR=/var/log/hiawatha \
37 -DPID_DIR=/var/run \
38 -DWEBROOT_DIR=/var/www/hiawatha \
39 -DWORK_DIR=/var/lib/hiawatha "
40
41do_install_append() {
42 # Copy over init script and sed in the correct sbin path
43 sed -i 's,sed_sbin_path,${sbindir},' ${WORKDIR}/hiawatha-init
44 mkdir -p ${D}${sysconfdir}/init.d
45 install -m 0755 ${WORKDIR}/hiawatha-init ${D}${sysconfdir}/init.d/hiawatha
46
47 # configure php-fcgi to have a working configuration
48 # by default if php is installed
49 echo "Server = ${bindir}/php-cgi ; 2 ; 127.0.0.1:2005 ; nobody:nobody ; ${sysconfdir}/php/hiawatha-php5/php.ini" >> ${D}${sysconfdir}/hiawatha/php-fcgi.conf
50
51 if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
52 install -d ${D}/${systemd_unitdir}/system
53 install -m 644 ${WORKDIR}/hiawatha.service ${D}/${systemd_unitdir}/system
54 fi
55
56 rmdir "${D}${localstatedir}/run"
57 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
58}
59
60CONFFILES_${PN} = " \
61 ${sysconfdir}/hiawatha/cgi-wrapper.conf \
62 ${sysconfdir}/hiawatha/hiawatha.conf \
63 ${sysconfdir}/hiawatha/index.xslt \
64 ${sysconfdir}/hiawatha/mimetype.conf \
65 ${sysconfdir}/hiawatha/php-fcgi.conf \
66"