summaryrefslogtreecommitdiff
path: root/www/wwwoffle/Makefile
blob: ab2488b7c71f8443b218a3530f52f65dd8fef3af (plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
# $NetBSD: Makefile,v 1.25 2001/02/17 17:22:48 wiz Exp $

DISTNAME=	wwwoffle-2.6
CATEGORIES=	www
MASTER_SITES=	http://www.gedanken.demon.co.uk/download-wwwoffle/ \
		ftp://ftp.demon.co.uk/pub/unix/httpd/ \
		${MASTER_SITE_SUNSITE:=apps/www/servers/}
EXTRACT_SUFX=	.tgz

PATCHFILES+=	wwwoffle-26-v6-20001121b.diff.gz
PATCH_SITES+=	ftp://ftp.kame.net/pub/kame/misc/
PATCH_DIST_STRIP=	-p1

MAINTAINER=	packages@netbsd.org
HOMEPAGE=	http://www.gedanken.demon.co.uk/wwwoffle/
COMMENT=	WWW proxy with support for offline browsing

USE_GMAKE=	yes
NO_CONFIGURE=	yes

PLIST_SUBST+=	GTAR=${GTAR}

BUILD_DEFS+=	USE_INET6

.include "../../mk/bsd.prefs.mk"

.if ${OPSYS} == "SunOS"
MAKE_ENV+=	LIBRARY="-lnsl -lsocket"
.endif

post-build:
	@${SED} -e 's#@PREFIX@#${PREFIX}#g' <${FILESDIR}/wwwoffle.sh \
	  >${WRKDIR}/wwwoffle.sh

pre-install:
	${MKDIR} ${PREFIX}/etc/wwwoffle
	if [ -d /var/wwwoffle ]; then \
	  ${RM} -rf /var/wwwoffle/html.old; \
	  ${MKDIR} /var/wwwoffle/http; \
	fi

post-install:
	if [ -f ${PREFIX}/etc/wwwoffle/wwwoffle.conf.install ]; then \
	  ${MV} ${PREFIX}/etc/wwwoffle/wwwoffle.conf.install \
		${PREFIX}/etc/wwwoffle/wwwoffle.conf.default; \
	else \
	  ${CP} -p ${PREFIX}/etc/wwwoffle/wwwoffle.conf \
	    ${PREFIX}/etc/wwwoffle/wwwoffle.conf.default; \
	fi
	${INSTALL_SCRIPT} ${WRKDIR}/wwwoffle.sh ${PREFIX}/etc/rc.d/wwwoffle
	${CHOWN} -R -h ${BINOWN}:${BINGRP} /var/wwwoffle
	# directories other than html are automatically created at run time
	${GTAR} czCf / ${PREFIX}/libdata/wwwoffle-spool.tar.gz	\
	  var/wwwoffle/html var/wwwoffle/outgoing

.include "../../mk/bsd.pkg.mk"