blob: d6c449b5db03154ccb005cdc59926bff9acac764 [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001SUMMARY = "Lightweight secure web server"
2HOMEPAGE = "http://www.hiawatha-webserver.org"
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08005DEPENDS = "libxml2 libxslt virtual/crypt"
Brad Bishop316dfdd2018-06-25 12:45:53 -04006
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] = "581aa71c831172ba06910deda717302f"
14SRC_URI[sha256sum] = "363e99d84a85dafbb74bcc30b3e30286053ec2abbc7afe08cd87193611735f74"
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 \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080026 -DENABLE_TLS=OFF \
Brad Bishop316dfdd2018-06-25 12:45:53 -040027 -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 -DCMAKE_INSTALL_FULL_LOCALSTATEDIR=${localstatedir}"
37
38do_install_append() {
39 # Copy over init script and sed in the correct sbin path
40 sed -i 's,sed_sbin_path,${sbindir},' ${WORKDIR}/hiawatha-init
41 mkdir -p ${D}${sysconfdir}/init.d
42 install -m 0755 ${WORKDIR}/hiawatha-init ${D}${sysconfdir}/init.d/hiawatha
43
44 # configure php-fcgi to have a working configuration
45 # by default if php is installed
46 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
47
48 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
49 install -d ${D}/${systemd_unitdir}/system
50 install -m 644 ${WORKDIR}/hiawatha.service ${D}/${systemd_unitdir}/system
51 fi
52
53 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" "${D}${localstatedir}/run"
54}
55
56CONFFILES_${PN} = " \
57 ${sysconfdir}/hiawatha/cgi-wrapper.conf \
58 ${sysconfdir}/hiawatha/hiawatha.conf \
59 ${sysconfdir}/hiawatha/index.xslt \
60 ${sysconfdir}/hiawatha/mimetype.conf \
61 ${sysconfdir}/hiawatha/php-fcgi.conf \
62"
63
64FILES_${PN}-dev = "${libdir}/hiawatha/*${SOLIBSDEV}"