mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-21 00:25:50 +00:00
www/polipo: stage and various fixes
- Add stage support - Add LICENSE - Fix man pages handling - Fix cache dir handling PR: 185275 Submitted by: Frank Behrens <frank@pinky.sax.de> Reviewed by: marino (mentor) Approved by: swills (mentor), blanker (portmgr)
This commit is contained in:
parent
4976906e3a
commit
7fa83057a8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=361633
@ -8,21 +8,14 @@ MASTER_SITES= http://freehaven.net/~chrisd/polipo/ \
|
||||
http://www.sax.de/~frank/polipo4bsd/files/
|
||||
|
||||
MAINTAINER= frank@pinky.sax.de
|
||||
COMMENT= A small and fast caching web proxy
|
||||
COMMENT= Small and fast caching web proxy
|
||||
|
||||
MAN1= polipo.1
|
||||
LICENSE= MIT
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
|
||||
USE_RC_SUBR= polipo
|
||||
|
||||
NO_STAGE= yes
|
||||
|
||||
.if defined(NO_PTEXINFO)
|
||||
ALL_TARGET= polipo
|
||||
NOPORTDOCS= yes
|
||||
.else
|
||||
USES= makeinfo
|
||||
INFO= polipo
|
||||
.endif
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
@ -33,6 +26,7 @@ SUB_FILES= pkg-message pkg-install pkg-deinstall 400.polipo
|
||||
SUB_LIST+= USER=${PUSER} GROUP=${PGRP} DESTDIR=${DESTDIR} PCONFIGDIR=${PCONFIGDIR} \
|
||||
PCACHEDIR=${PCACHEDIR} PPIDDIR=${PPIDDIR} PPIDFILE=${PPIDFILE} \
|
||||
PLOGFILE=${PLOGFILE}
|
||||
PLIST_SUB+= RESETPREFIX=${PREFIX}
|
||||
|
||||
# polipo installation options, propagated to install scripts
|
||||
PUSER?= polipo
|
||||
@ -44,30 +38,19 @@ PPIDFILE= ${PPIDDIR}polipo.pid
|
||||
PLOGFILE?= /var/log/polipo
|
||||
MAKE_ENV+= DISK_CACHE_ROOT=${PCACHEDIR}
|
||||
|
||||
pre-install: apply-slist
|
||||
@PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/polipo ${PREFIX}/bin/
|
||||
${MKDIR} ${PREFIX}/etc/periodic/daily/
|
||||
${INSTALL_SCRIPT} ${WRKDIR}/400.polipo ${PREFIX}/etc/periodic/daily/
|
||||
${INSTALL_MAN} ${WRKSRC}/polipo.man ${PREFIX}/man/man1/polipo.1
|
||||
${MKDIR} ${PCONFIGDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/config.sample ${PCONFIGDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/forbidden.sample ${PCONFIGDIR}
|
||||
${CHGRP} -R ${PGRP} ${PCONFIGDIR}
|
||||
.if !defined(NO_PTEXINFO)
|
||||
${INSTALL_DATA} ${WRKSRC}/polipo.info ${PREFIX}/info/
|
||||
.endif
|
||||
.if !defined(NOPORTDOCS)
|
||||
${MKDIR} ${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/html/* ${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/localindex.html ${DATADIR}/www/index.html
|
||||
${CHGRP} -R ${PGRP} ${DATADIR}
|
||||
.endif
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/polipo ${STAGEDIR}${PREFIX}/bin/
|
||||
${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/daily/
|
||||
${INSTALL_SCRIPT} ${WRKDIR}/400.polipo ${STAGEDIR}${PREFIX}/etc/periodic/daily/
|
||||
${INSTALL_MAN} ${WRKSRC}/polipo.man ${STAGEDIR}${PREFIX}/man/man1/polipo.1
|
||||
${MKDIR} ${STAGEDIR}${PCONFIGDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/config.sample ${WRKSRC}/forbidden.sample ${STAGEDIR}${PCONFIGDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/polipo.info ${STAGEDIR}${PREFIX}/${INFO_PATH}
|
||||
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/html/* ${STAGEDIR}${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/localindex.html ${STAGEDIR}${DATADIR}/www/index.html
|
||||
|
||||
post-install:
|
||||
@PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
${MKDIR} ${STAGEDIR}${PCACHEDIR}
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -46,7 +46,7 @@ elif [ "$2" = "POST-INSTALL" ]; then
|
||||
if [ ! -d "%%DESTDIR%%$POLIPOCACHE" ]; then
|
||||
mkdir -p "%%DESTDIR%%$POLIPOCACHE" || exit 1
|
||||
chown "$POLIPOUSER:$POLIPOGROUP" "%%DESTDIR%%$POLIPOCACHE" || exit 1
|
||||
chmod 0770 "%%DESTDIR%%$POLIPOCACHE" || exit 1
|
||||
chmod ug=rwx,o= "%%DESTDIR%%$POLIPOCACHE" || exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "%%DESTDIR%%$PPIDDIR" ]; then
|
||||
@ -58,14 +58,25 @@ elif [ "$2" = "POST-INSTALL" ]; then
|
||||
if [ ! -f "%%DESTDIR%%$POLIPOLOG" ]; then
|
||||
touch "%%DESTDIR%%$POLIPOLOG" || exit 1
|
||||
chown "$POLIPOUSER" "%%DESTDIR%%$POLIPOLOG" || exit 1
|
||||
chmod 0640 "%%DESTDIR%%$POLIPOLOG" || exit 1
|
||||
chmod u=rw,g=r,o= "%%DESTDIR%%$POLIPOLOG" || exit 1
|
||||
fi
|
||||
|
||||
|
||||
if ! fgrep "${POLIPOLOG}" "%%DESTDIR%%/etc/newsyslog.conf" 2>/dev/null 1>&2; then
|
||||
echo "${POLIPOLOG} ${POLIPOUSER}: 640 3 100 * J $POLIPOPID 30" >> "%%DESTDIR%%/etc/newsyslog.conf" || exit 1
|
||||
echo "Add a line to /etc/newsyslog.conf (or /usr/local/etc/newsyslog.d/polipo if"
|
||||
echo "supported on your system) to enable automatic log file rotation:"
|
||||
echo
|
||||
echo "${POLIPOLOG} ${POLIPOUSER}: 640 3 100 * J ${POLIPOPID} 30"
|
||||
echo
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
OSVER=`uname -r | sed -e 's/\..*//'`
|
||||
if [ ${OSVER} = "8" -o ${OSVER} = "9" ]; then
|
||||
CACHEPARENT=`dirname ${POLIPOCACHE}`
|
||||
echo "You will need to manually run:"
|
||||
echo " chmod o+x %%DESTDIR%%$CACHEPARENT"
|
||||
echo "to ensure the cache is useable."
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
@ -1,7 +1,14 @@
|
||||
bin/polipo
|
||||
etc/polipo/config.sample
|
||||
etc/polipo/forbidden.sample
|
||||
@sample etc/polipo/config.sample
|
||||
@sample etc/polipo/forbidden.sample
|
||||
etc/periodic/daily/400.polipo
|
||||
%%PORTDOCS%%%%DATADIR%%/www/index.html
|
||||
man/man1/polipo.1.gz
|
||||
%%DATADIR%%/www/index.html
|
||||
@dirrmtry %%DATADIR%%/www
|
||||
@dirrmtry %%DATADIR%%
|
||||
@dirrmtry etc/polipo
|
||||
@dirrmtry etc/periodic/daily
|
||||
@dirrmtry etc/periodic
|
||||
@cwd /
|
||||
@dirrmtry var/cache/polipo
|
||||
@cwd %%RESETPREFIX%%
|
||||
|
Loading…
Reference in New Issue
Block a user