void-packages/srcpkgs/darkhttpd/template
Peter Wang d8af651344 darkhttpd: fix service, read from conf file
The darkhttpd process would be backgrounded if /bin/sh does not support
"&>" syntax. If /bin/sh does support "&>" the log file would be started
afresh each time.

Let the directory to be served and other options be set in a conf file.
2019-01-05 13:43:30 +11:00

27 lines
767 B
Bash

# Template file for 'darkhttpd'
pkgname=darkhttpd
version=1.12
revision=3
short_desc="Small and secure static webserver"
maintainer="Andrea Brancaleoni <abc@pompel.me>"
license="ISC"
homepage="https://unix4lyfe.org/darkhttpd/"
distfiles="https://unix4lyfe.org/darkhttpd/darkhttpd-${version}.tar.bz2"
checksum=a50417b622b32b5f421b3132cb94ebeff04f02c5fb87fba2e31147d23de50505
CFLAGS="$CFLAGS $LDFLAGS"
# Create darkhttpd system user/group
system_accounts="_${pkgname}"
make_dirs="/srv/www/${pkgname} 0755 _${pkgname} _${pkgname}
/var/log/${pkgname} 0755 _${pkgname} _${pkgname}"
do_build() {
${CC} ${CFLAGS} ${LDFLAGS} ${LIBS} ${pkgname}.c -o ${pkgname}
}
do_install() {
vsv ${pkgname}
vbin ${pkgname}
sed -n '0,/^$/p' darkhttpd.c > LICENSE
vlicense LICENSE
}