Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | SUMMARY = "A simple, small, portable, fast, and secure HTTP server" |
| 2 | DESCRIPTION = "A simple, small, portable, fast, and secure HTTP server (supported fork of thttpd)." |
| 3 | HOMEPAGE = "http://opensource.dyc.edu/sthttpd" |
| 4 | LICENSE = "BSD-2-Clause" |
| 5 | LIC_FILES_CHKSUM = "file://src/thttpd.c;beginline=1;endline=26;md5=0c5762c2c34dcbe9eb18815516502872" |
| 6 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 7 | DEPENDS += "base-passwd virtual/crypt" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 8 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 9 | SRCREV = "2845bf5bff2b820d2336c8c8061cbfc5f271e720" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 10 | SRC_URI = "git://github.com/blueness/${BPN};branch=master;protocol=https \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 11 | file://thttpd.service \ |
| 12 | file://thttpd.conf \ |
| 13 | file://init" |
| 14 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 15 | UPSTREAM_CHECK_URI = "https://github.com/blueness/sthttpd/releases/" |
| 16 | UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+).tar.gz" |
| 17 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 18 | S = "${WORKDIR}/git" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 19 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 20 | inherit autotools update-rc.d systemd update-alternatives |
| 21 | |
| 22 | ALTERNATIVE_PRIORITY = "100" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 23 | ALTERNATIVE:${PN}-doc = "htpasswd.1" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 24 | ALTERNATIVE_LINK_NAME[htpasswd.1] = "${mandir}/man1/htpasswd.1" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 25 | |
| 26 | SRV_DIR ?= "${servicedir}/www" |
| 27 | |
| 28 | # Note that `${sbindir}/makeweb' is installed setgid to this group, |
| 29 | # but ${SRV_DIR} is not installed chgrp'd to the group by default. |
| 30 | WEBGROUP ?= "www-data" |
| 31 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 32 | do_configure:prepend () { |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 33 | export WEBDIR=${SRV_DIR} |
| 34 | export WEBGROUP=${WEBGROUP} |
| 35 | } |
| 36 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 37 | do_install:append () { |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 38 | install -d ${D}${sysconfdir}/init.d |
| 39 | install -c -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/thttpd |
| 40 | install -c -m 755 ${WORKDIR}/thttpd.conf ${D}${sysconfdir} |
| 41 | sed -i -e 's,@@CONFFILE,${sysconfdir}/thttpd.conf,g' ${D}${sysconfdir}/init.d/thttpd |
| 42 | sed -i -e 's,@@SRVDIR,${SRV_DIR},g' ${D}${sysconfdir}/thttpd.conf |
| 43 | sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/thttpd |
| 44 | |
| 45 | install -d ${D}${systemd_unitdir}/system |
| 46 | install -m 0644 ${WORKDIR}/thttpd.service ${D}${systemd_unitdir}/system |
| 47 | sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${systemd_unitdir}/system/thttpd.service |
| 48 | sed -i 's!/var/!${localstatedir}/!g' ${D}${systemd_unitdir}/system/thttpd.service |
| 49 | sed -i -e 's,@@CONFFILE,${sysconfdir}/thttpd.conf,g' ${D}${systemd_unitdir}/system/thttpd.service |
| 50 | } |
| 51 | |
| 52 | INITSCRIPT_NAME = "thttpd" |
| 53 | INITSCRIPT_PARAMS = "defaults" |
| 54 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 55 | SYSTEMD_SERVICE:${PN} = "thttpd.service" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 56 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 57 | FILES:${PN} += "${SRV_DIR}" |
| 58 | FILES:${PN}-dbg += "${SRV_DIR}/cgi-bin/.debug" |