void-packages/srcpkgs/thttpd/template
maxice8 3f75f52424 thttpd: update to 2.28.
Closes: #11426 [via git-merge-pr]
2018-03-06 20:00:49 -08:00

37 lines
982 B
Bash

# Template file for 'thttpd'
pkgname=thttpd
version=2.28
revision=1
build_style=gnu-configure
short_desc="Tiny/turbo/throttling HTTP server"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="BSD"
homepage="http://www.acme.com/software/thttpd/"
distfiles="http://www.acme.com/software/thttpd/thttpd-${version}.tar.gz"
checksum=8552f929d4ede26cb193411c1208168e169dda24ee9eb1da8f8da4f4f8e10328
pre_configure() {
sed "s,-o bin -g bin,,g" -i Makefile.in
}
do_build() {
make CC=$CC LD=$CC CCOPT="$CFLAGS -D_DEFAULT_SOURCE"
}
do_install() {
vmkdir usr/bin
vmkdir usr/share/man/man1
vmkdir usr/share/man/man8
make WEBGROUP=$(whoami) \
WEBDIR=${DESTDIR}/usr/share/thttpd \
BINDIR=${DESTDIR}/usr/bin \
MANDIR=${DESTDIR}/usr/share/man install
vsv thttpd
# Rename htpasswd to not conflict with apache.
mv ${DESTDIR}/usr/bin/{htpasswd,thttpd-htpasswd}
mv ${DESTDIR}/usr/share/man/man1/{htpasswd,thttpd-htpasswd}.1
sed -n '3,25p' < thttpd.c > LICENSE
vlicense LICENSE
}