void-packages/srcpkgs/thttpd/template

37 lines
985 B
Bash

# Template file for 'thttpd'
pkgname=thttpd
version=2.26
revision=3
replaces="runit-void<20141013_2"
build_style=gnu-configure
build_pie=yes
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=4693d7c421fe1bd25553a8891cbb447d2bab3e0df01c029dadd79596b9bdb4c5
pre_configure() {
sed "s,-o bin -g bin,,g" -i Makefile.in
}
do_build() {
make ${makejobs} 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
}