View | Details | Raw Unified | Return to bug 185275 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-32 / +13 lines)
Lines 10-29 Link Here
10
MAINTAINER=	frank@pinky.sax.de
10
MAINTAINER=	frank@pinky.sax.de
11
COMMENT=	A small and fast caching web proxy
11
COMMENT=	A small and fast caching web proxy
12
12
13
MAN1=		polipo.1
13
LICENSE=	MIT
14
LICENSE_FILE=	${WRKSRC}/COPYING
14
15
15
USE_RC_SUBR=	polipo
16
USE_RC_SUBR=	polipo
16
17
17
NO_STAGE=	yes
18
.include <bsd.port.pre.mk>
18
.include <bsd.port.pre.mk>
19
19
20
.if defined(NO_PTEXINFO)
21
ALL_TARGET=	polipo
22
NOPORTDOCS=	yes
23
.else
24
INFO=		polipo
20
INFO=		polipo
25
.endif
26
27
DOCSDIR=	${DATADIR}/www/doc
21
DOCSDIR=	${DATADIR}/www/doc
28
PORTDOCS=	*
22
PORTDOCS=	*
29
23
Lines 42-71 Link Here
42
PLOGFILE?=	/var/log/polipo
36
PLOGFILE?=	/var/log/polipo
43
MAKE_ENV+=	DISK_CACHE_ROOT=${PCACHEDIR}
37
MAKE_ENV+=	DISK_CACHE_ROOT=${PCACHEDIR}
44
38
45
pre-install: apply-slist
46
	@PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
47
48
do-install:
39
do-install:
49
	${INSTALL_PROGRAM} ${WRKSRC}/polipo ${PREFIX}/bin/
40
	${INSTALL_PROGRAM} ${WRKSRC}/polipo ${STAGEDIR}${PREFIX}/bin/
50
	${MKDIR} ${PREFIX}/etc/periodic/daily/
41
	${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/daily/
51
	${INSTALL_SCRIPT} ${WRKDIR}/400.polipo ${PREFIX}/etc/periodic/daily/
42
	${INSTALL_SCRIPT} ${WRKDIR}/400.polipo ${STAGEDIR}${PREFIX}/etc/periodic/daily/
52
	${INSTALL_MAN} ${WRKSRC}/polipo.man ${PREFIX}/man/man1/polipo.1
43
	${INSTALL_MAN} ${WRKSRC}/polipo.man ${STAGEDIR}${PREFIX}/man/man1/polipo.1
53
	${MKDIR} ${PCONFIGDIR}
44
	${MKDIR} ${STAGEDIR}${PCONFIGDIR}
54
	${INSTALL_DATA} ${WRKSRC}/config.sample ${PCONFIGDIR}
45
	${INSTALL_DATA} ${WRKSRC}/config.sample ${STAGEDIR}${PCONFIGDIR}
55
	${INSTALL_DATA} ${WRKSRC}/forbidden.sample ${PCONFIGDIR}
46
	${INSTALL_DATA} ${WRKSRC}/forbidden.sample ${STAGEDIR}${PCONFIGDIR}
56
	${CHGRP} -R ${PGRP} ${PCONFIGDIR}
47
	${INSTALL_DATA} ${WRKSRC}/polipo.info ${STAGEDIR}${PREFIX}/info/
57
.if !defined(NO_PTEXINFO)
48
	${MKDIR} ${STAGEDIR}${DOCSDIR}
58
	${INSTALL_DATA} ${WRKSRC}/polipo.info ${PREFIX}/info/
49
	${INSTALL_DATA} ${WRKSRC}/html/* ${STAGEDIR}${DOCSDIR}
59
.endif
50
	${INSTALL_DATA} ${WRKSRC}/localindex.html ${STAGEDIR}${DATADIR}/www/index.html
60
.if !defined(NOPORTDOCS)
61
	${MKDIR} ${DOCSDIR}
62
	${INSTALL_DATA} ${WRKSRC}/html/* ${DOCSDIR}
63
	${INSTALL_DATA} ${WRKSRC}/localindex.html ${DATADIR}/www/index.html
64
	${CHGRP} -R ${PGRP} ${DATADIR}
65
.endif
66
51
67
post-install:
68
	@PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
69
	@${CAT} ${PKGMESSAGE}
70
71
.include <bsd.port.post.mk>
52
.include <bsd.port.post.mk>
(-)files/pkg-install.in (-4 / +10 lines)
Lines 44-52 Link Here
44
elif [ "$2" = "POST-INSTALL" ]; then
44
elif [ "$2" = "POST-INSTALL" ]; then
45
45
46
	if [ ! -d "%%DESTDIR%%$POLIPOCACHE" ]; then
46
	if [ ! -d "%%DESTDIR%%$POLIPOCACHE" ]; then
47
		CACHEPARENT=`dirname ${POLIPOCACHE}`
47
		mkdir -p "%%DESTDIR%%$POLIPOCACHE" || exit 1
48
		mkdir -p "%%DESTDIR%%$POLIPOCACHE" || exit 1
48
		chown "$POLIPOUSER:$POLIPOGROUP" "%%DESTDIR%%$POLIPOCACHE" || exit 1
49
		chown "$POLIPOUSER:$POLIPOGROUP" "%%DESTDIR%%$POLIPOCACHE" || exit 1
49
		chmod 0770 "%%DESTDIR%%$POLIPOCACHE" || exit 1
50
		chmod o+x "%%DESTDIR%%$CACHEPARENT" || exit 1
51
		chmod ug=rwx,o= "%%DESTDIR%%$POLIPOCACHE" || exit 1
50
	fi
52
	fi
51
53
52
	if [ ! -d "%%DESTDIR%%$PPIDDIR" ]; then
54
	if [ ! -d "%%DESTDIR%%$PPIDDIR" ]; then
Lines 58-69 Link Here
58
	if [ ! -f "%%DESTDIR%%$POLIPOLOG" ]; then
60
	if [ ! -f "%%DESTDIR%%$POLIPOLOG" ]; then
59
		touch "%%DESTDIR%%$POLIPOLOG" || exit 1
61
		touch "%%DESTDIR%%$POLIPOLOG" || exit 1
60
		chown "$POLIPOUSER" "%%DESTDIR%%$POLIPOLOG" || exit 1
62
		chown "$POLIPOUSER" "%%DESTDIR%%$POLIPOLOG" || exit 1
61
		chmod 0640 "%%DESTDIR%%$POLIPOLOG" || exit 1
63
		chmod u=rw,g=r,o= "%%DESTDIR%%$POLIPOLOG" || exit 1
62
	fi
64
	fi
63
65
64
66
                  ---------------------------------------------------------------------------
65
	if ! fgrep "${POLIPOLOG}" "%%DESTDIR%%/etc/newsyslog.conf" 2>/dev/null 1>&2; then
67
	if ! fgrep "${POLIPOLOG}" "%%DESTDIR%%/etc/newsyslog.conf" 2>/dev/null 1>&2; then
66
	echo "${POLIPOLOG}		${POLIPOUSER}:		640  3     100	*     J     $POLIPOPID 30" >> "%%DESTDIR%%/etc/newsyslog.conf" || exit 1
68
	    echo "Add a line to /etc/newsyslog.conf (or /usr/local/etc/newsyslog.d/polipo if"
69
	    echo "supported on your system) to enable automatic log file rotation:"
70
	    echo
71
	    echo "${POLIPOLOG} ${POLIPOUSER}: 640 3 100 * J ${POLIPOPID} 30"
72
	    echo
67
	fi
73
	fi
68
74
69
fi
75
fi
(-)pkg-plist (-1 / +5 lines)
Lines 2-7 Link Here
2
etc/polipo/config.sample
2
etc/polipo/config.sample
3
etc/polipo/forbidden.sample
3
etc/polipo/forbidden.sample
4
etc/periodic/daily/400.polipo
4
etc/periodic/daily/400.polipo
5
%%PORTDOCS%%%%DATADIR%%/www/index.html
5
man/man1/polipo.1.gz
6
%%DATADIR%%/www/index.html
7
@dirrmtry %%DATADIR%%/www
8
@dirrmtry %%DATADIR%%
9
@dirrmtry etc/polipo
6
@dirrmtry etc/periodic/daily
10
@dirrmtry etc/periodic/daily
7
@dirrmtry etc/periodic
11
@dirrmtry etc/periodic

Return to bug 185275