void-packages/srcpkgs/thttpd/template

38 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
}