diff options
Diffstat (limited to 'meta-webserver/recipes-httpd/hiawatha')
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 | |||
13 | PATH=/sbin:/bin:/usr/sbin:/usr/bin | ||
14 | DAEMON=sed_sbin_path/hiawatha | ||
15 | NAME=hiawatha | ||
16 | DESC="Hiawatha Web Server" | ||
17 | OPTS="" | ||
18 | |||
19 | case "$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 | ;; | ||
42 | esac | ||
43 | |||
44 | exit 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] | ||
2 | Description=Hiawatha Web Server | ||
3 | After=network.target remote-fs.target nss-lookup.target | ||
4 | |||
5 | [Service] | ||
6 | Type=simple | ||
7 | SyslogIdentifier=hiawatha | ||
8 | ExecStartPre=/usr/sbin/hiawatha -k ; /usr/sbin/wigwam | ||
9 | ExecStart= /usr/sbin/hiawatha -d | ||
10 | TimeoutSec=10 | ||
11 | #(doesn't like this setting. Can't find files) PrivateTmp=true | ||
12 | LimitNOFILE=infinity | ||
13 | CapabilityBoundingSet=CAP_NET_BIND_SERVICE CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER CAP_FSETID CAP_SETGID CAP_SETUID | ||
14 | |||
15 | [Install] | ||
16 | WantedBy=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 @@ | |||
1 | SUMMARY = "Lightweight secure web server" | ||
2 | HOMEPAGE = "http://www.hiawatha-webserver.org" | ||
3 | LICENSE = "GPLv2" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe" | ||
5 | DEPENDS = "libxml2 libxslt" | ||
6 | |||
7 | SECTION = "net" | ||
8 | |||
9 | SRC_URI = "http://hiawatha-webserver.org/files/${BP}.tar.gz \ | ||
10 | file://hiawatha-init \ | ||
11 | file://hiawatha.service " | ||
12 | |||
13 | SRC_URI[md5sum] = "a77f044634884c4cc5d21dab44e822a3" | ||
14 | SRC_URI[sha256sum] = "5d9cdec51c618bb3efab747030e593d9bd49dfaf3236254c8e0cb60715716dbf" | ||
15 | |||
16 | INITSCRIPT_NAME = "hiawatha" | ||
17 | INITSCRIPT_PARAMS = "defaults 70" | ||
18 | |||
19 | SYSTEMD_SERVICE_${PN} = "hiawatha.service" | ||
20 | |||
21 | inherit cmake update-rc.d systemd | ||
22 | |||
23 | EXTRA_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 | |||
41 | do_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 | |||
60 | CONFFILES_${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 | " | ||