blob: 703492167f76d1dc72256ed90980816168e6fc56 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001SUMMARY = "A simple, small, portable, fast, and secure HTTP server"
2DESCRIPTION = "A simple, small, portable, fast, and secure HTTP server (supported fork of thttpd)."
3HOMEPAGE = "http://opensource.dyc.edu/sthttpd"
4LICENSE = "BSD-2-Clause"
5LIC_FILES_CHKSUM = "file://src/thttpd.c;beginline=1;endline=26;md5=0c5762c2c34dcbe9eb18815516502872"
6
7SRC_URI = "http://opensource.dyc.edu/pub/sthttpd/sthttpd-${PV}.tar.gz \
8 file://thttpd.service \
9 file://thttpd.conf \
10 file://init"
11
12SRC_URI[md5sum] = "e645a85a97d3cb883011a35bc2211815"
13SRC_URI[sha256sum] = "78e87979140cbda123c81b4051552242dbbffb5dec1a17e5f95ec4826b1eaddb"
14
15S = "${WORKDIR}/sthttpd-${PV}"
16
17inherit autotools update-rc.d systemd
18
19SRV_DIR ?= "${servicedir}/www"
20
21EXTRA_OEMAKE += "'WEBDIR=${SRV_DIR}'"
22
23do_install_append () {
24 install -d ${D}${sysconfdir}/init.d
25 install -c -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/thttpd
26 install -c -m 755 ${WORKDIR}/thttpd.conf ${D}${sysconfdir}
27 sed -i -e 's,@@CONFFILE,${sysconfdir}/thttpd.conf,g' ${D}${sysconfdir}/init.d/thttpd
28 sed -i -e 's,@@SRVDIR,${SRV_DIR},g' ${D}${sysconfdir}/thttpd.conf
29 sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/thttpd
30
31 install -d ${D}${systemd_unitdir}/system
32 install -m 0644 ${WORKDIR}/thttpd.service ${D}${systemd_unitdir}/system
33 sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${systemd_unitdir}/system/thttpd.service
34 sed -i 's!/var/!${localstatedir}/!g' ${D}${systemd_unitdir}/system/thttpd.service
35 sed -i -e 's,@@CONFFILE,${sysconfdir}/thttpd.conf,g' ${D}${systemd_unitdir}/system/thttpd.service
36}
37
38INITSCRIPT_NAME = "thttpd"
39INITSCRIPT_PARAMS = "defaults"
40
41SYSTEMD_SERVICE_${PN} = "thttpd.service"
42
43FILES_${PN} += "${SRV_DIR}"
44FILES_${PN}-dbg += "${SRV_DIR}/cgi-bin/.debug"
45