-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
template
43 lines (35 loc) · 1.05 KB
/
template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Template file for 'thttpd'
pkgname=thttpd
version=2.29
revision=3
build_style=gnu-configure
short_desc="Tiny/turbo/throttling HTTP server"
maintainer="Orphaned <orphan@voidlinux.org>"
license="BSD-2-Clause"
homepage="http://www.acme.com/software/thttpd/"
distfiles="http://www.acme.com/software/thttpd/thttpd-${version}.tar.gz"
checksum=99c09f47da326b1e7b5295c45549d2b65534dce27c44812cf7eef1441681a397
if [ "$XBPS_TARGET_LIBC" = "glibc" ]; then
makedepends+=" libxcrypt-devel"
fi
pre_configure() {
vsed -i Makefile.in -e "s,-o bin -g bin,,g"
}
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/libexec/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
}