2015-01-16 12:41:11 +01:00
|
|
|
# $NetBSD: Makefile,v 1.40 2015/01/16 11:41:11 adam Exp $
|
2009-04-20 23:27:40 +02:00
|
|
|
|
2015-01-16 12:41:11 +01:00
|
|
|
DISTNAME= squid-3.4.11
|
2009-04-20 23:27:40 +02:00
|
|
|
CATEGORIES= www
|
2013-02-10 19:16:53 +01:00
|
|
|
MASTER_SITES= http://www.squid-cache.org/Versions/v3/${PKGVERSION_NOREV:R}/ \
|
2013-12-10 15:48:26 +01:00
|
|
|
ftp://ftp.squid-cache.org/pub/squid/ \
|
|
|
|
http://ftp.nluug.nl/internet/squid/
|
2013-02-10 19:16:53 +01:00
|
|
|
EXTRACT_SUFX= .tar.xz
|
2009-04-20 23:27:40 +02:00
|
|
|
|
2013-05-23 17:28:45 +02:00
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
2009-04-20 23:27:40 +02:00
|
|
|
HOMEPAGE= http://www.squid-cache.org/
|
|
|
|
COMMENT= Post-Harvest_cached WWW proxy cache and accelerator
|
2009-05-19 10:59:00 +02:00
|
|
|
LICENSE= gnu-gpl-v2
|
2009-04-20 23:27:40 +02:00
|
|
|
|
|
|
|
USE_LANGUAGES= c c++
|
2013-06-07 14:28:39 +02:00
|
|
|
USE_TOOLS+= perl:run gmake
|
2009-04-20 23:27:40 +02:00
|
|
|
GNU_CONFIGURE= yes
|
2013-12-10 15:48:26 +01:00
|
|
|
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
|
|
|
|
CONFIGURE_ARGS+= --localstatedir=${SQUID_DATADIR}
|
|
|
|
CONFIGURE_ARGS+= --datarootdir=${PREFIX}/share/squid
|
2011-02-28 19:55:53 +01:00
|
|
|
CONFIGURE_ARGS+= --disable-strict-error-checking
|
2013-02-10 19:16:53 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-auth
|
2013-12-10 15:48:26 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-cachemgr-hostname=localhost
|
|
|
|
CONFIGURE_ARGS+= --enable-delay-pools
|
2011-05-11 06:26:15 +02:00
|
|
|
CONFIGURE_ARGS+= --enable-icap-client
|
2013-12-10 15:48:26 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-icmp
|
|
|
|
CONFIGURE_ARGS+= --enable-poll
|
|
|
|
CONFIGURE_ARGS+= --enable-removal-policies=lru,heap
|
|
|
|
CONFIGURE_ARGS+= --enable-storeio=${SQUID_BACKENDS:Q}
|
|
|
|
CONFIGURE_ARGS+= --with-aio
|
2009-04-20 23:27:40 +02:00
|
|
|
CONFIGURE_ARGS+= --with-default-user=${SQUID_USER}
|
2009-05-05 00:29:41 +02:00
|
|
|
CONFIGURE_ARGS+= --with-pidfile=${VARBASE}/run/squid.pid
|
|
|
|
|
2013-12-29 13:10:45 +01:00
|
|
|
# Explicitly disable using CPU optimized instruction
|
|
|
|
CONFIGURE_ARGS+= --disable-arch-native
|
|
|
|
|
2013-12-03 16:23:51 +01:00
|
|
|
BUILD_DEFS+= VARBASE
|
2013-12-10 15:48:26 +01:00
|
|
|
MAKE_ENV+= INSTALL_SCRIPT=${INSTALL_SCRIPT:Q}
|
|
|
|
MAKE_ENV+= PKG_PREFIX=${PREFIX} VARBASE=${VARBASE}
|
2013-12-11 15:55:02 +01:00
|
|
|
REPLACE_PERL+= helpers/ssl/cert_valid.pl tools/helper-mux.pl
|
2013-02-10 19:16:53 +01:00
|
|
|
|
2013-12-10 15:48:26 +01:00
|
|
|
EGFILES= src/mime.conf.default src/squid.conf.default \
|
|
|
|
helpers/basic_auth/MSNT/msntauth.conf.default \
|
|
|
|
errors/errorpage.css tools/cachemgr.conf
|
|
|
|
EGDIR= share/examples/squid
|
|
|
|
.for f in cachemgr.conf errorpage.css mime.conf squid.conf msntauth.conf
|
|
|
|
CONF_FILES+= ${PREFIX}/${EGDIR}/${f} ${PKG_SYSCONFDIR}/${f}
|
|
|
|
.endfor
|
|
|
|
OWN_DIRS= ${SQUID_DATADIR}
|
|
|
|
OWN_DIRS_PERMS+=${SQUID_DATADIR}/cache ${SQUID_USER} ${SQUID_GROUP} 0750 \
|
|
|
|
${SQUID_DATADIR}/logs ${SQUID_USER} ${SQUID_GROUP} 0750
|
2009-04-20 23:27:40 +02:00
|
|
|
|
2013-12-10 15:48:26 +01:00
|
|
|
.include "Makefile.common"
|
2013-02-10 19:16:53 +01:00
|
|
|
.include "options.mk"
|
2009-04-20 23:27:40 +02:00
|
|
|
|
2013-03-19 02:43:05 +01:00
|
|
|
.if !empty(MACHINE_PLATFORM:MNetBSD-[0-5]*-i386)
|
|
|
|
GNU_ARCH.i386= i486
|
|
|
|
CFLAGS+= -march=i486
|
|
|
|
.endif
|
|
|
|
|
2014-06-28 01:07:44 +02:00
|
|
|
# Incorrect check for <netinet/ip_icmp.h> on FreeBSD:
|
|
|
|
.if $(OPSYS) == "FreeBSD"
|
|
|
|
CONFIGURE_ENV+= ac_cv_header_netinet_ip_icmp_h=yes
|
|
|
|
.endif
|
|
|
|
|
2014-02-07 06:28:19 +01:00
|
|
|
INSTALLATION_DIRS= ${EGDIR}
|
|
|
|
|
2013-12-10 15:48:26 +01:00
|
|
|
SPECIAL_PERMS+= libexec/pinger ${SETUID_ROOT_PERMS}
|
|
|
|
|
|
|
|
RCD_SCRIPTS= squid
|
|
|
|
RCD_SCRIPT_SRC.squid= files/squid.sh
|
|
|
|
|
|
|
|
SUBST_CLASSES+= confs
|
|
|
|
SUBST_STAGE.confs= pre-configure
|
|
|
|
SUBST_FILES.confs= src/cf.data.pre
|
|
|
|
SUBST_SED.confs= -e "s/@USER@/${SQUID_USER}/"
|
|
|
|
SUBST_MESSAGE.confs= Fixing configuration files.
|
|
|
|
|
2009-04-20 23:27:40 +02:00
|
|
|
post-build:
|
2011-04-15 11:48:56 +02:00
|
|
|
cd ${WRKSRC}/src && ${CP} -pf squid.conf.documented squid.conf.default
|
2009-04-20 23:27:40 +02:00
|
|
|
|
2013-12-10 15:48:26 +01:00
|
|
|
post-install:
|
|
|
|
.for f in ${EGFILES}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/${f} \
|
|
|
|
${DESTDIR}${PREFIX}/${EGDIR}/`basename ${f} .default`
|
|
|
|
.endfor
|
|
|
|
|
2009-04-20 23:27:40 +02:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|